Skip to content

Running switchmode with KVM instance

Kyuho Jeong edited this page Sep 3, 2015 · 15 revisions

Create KVM instance and boot-up the instance.

Connect to inside of instance. And turn on eth0.

sudo ifconfig eth0 up

Assign IP address. I"m going to use IP address range 192.168.4.0/24 for the overlay address range.

sudo ifconfig eth0 192.168.4.3

At this point, IPOP does not have path MTU discovery feature. So endpoint interface need to match MTU size with ipop interface.

sudo ifconfig eth0 mtu 1280 up

Add default Gateway. Note that the default GW address should be the bridge address of which the instance attached to.

sudo route add default gw 192.168.4.1 eth0 

Create and turn on bridge.

sudo ifconfig br1 up

Assign IP address of bridge. Note that this address should be the same as the default gateway address of KVM instance.

sudo ifconfig br1 192.168.4.1 

Don't forget to add "switchmode": 1 in the config file

{ 
   ...
   "switchmode": 1
   "network_ignore_list": ["br1"]
   ...
}

Now run the ipop-tincan binary.

$ sudo ./ipop-tincan

And runs the controller.

$ gvpn_controllers -c config.json

Add ipop tap to the br1

$ sudo brctl addif br1 ipop
$ brctl show
bridge name	bridge id		STP enabled	interfaces
br1		8000.1ae372335c37	no		ipop
							tap0	
$

Now finished with one IPOP switchmode. Repeat above with the other IPOP node. Note that you should avoid the IPv4 address conflict.

For example, you can use address as below. 192.168.4.11 for br1 and gateway 192.168.4.13 for KVM instance 192.168.4.12 for IPOP node (in config file)

NB

  1. Every time you termiinate and rerun the ipop, don't forget to attach ipop tap to br1.
  2. Inside the instance, eth0 should have different MAC address.
Clone this wiki locally