Vxlan

The following scenarios show how to configure a VXLAN between different machines.

Simple VXLAN scenario using multicast

Description

In this example, a VXLAN interface will be created between three DUTs, using multicast.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces vxlan vxlan0 address 10.1.1.1/24
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 group 224.0.0.1
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 33
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 10.215.168.65/24
set interfaces vxlan vxlan0 address 10.1.1.2/24
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 group 224.0.0.1
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 33
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth0 address 10.215.168.66/24
set interfaces vxlan vxlan0 address 10.1.1.3/24
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 group 224.0.0.1
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 33
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 4: Ping the IP address 10.1.1.2 from DUT0:

admin@DUT0$ ping 10.1.1.2 count 1 size 56 timeout 1
Show output
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.485 ms

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.485/0.485/0.485/0.000 ms

Step 5: Ping the IP address 10.1.1.3 from DUT1:

admin@DUT1$ ping 10.1.1.3 count 1 size 56 timeout 1
Show output
PING 10.1.1.3 (10.1.1.3) 56(84) bytes of data.
64 bytes from 10.1.1.3: icmp_seq=1 ttl=64 time=0.620 ms

--- 10.1.1.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.620/0.620/0.620/0.000 ms

Step 6: Ping the IP address 10.1.1.1 from DUT2:

admin@DUT2$ ping 10.1.1.1 count 1 size 56 timeout 1
Show output
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.507 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.507/0.507/0.507/0.000 ms

Unicast VXLAN scenario with bridge

Description

In this example, a VXLAN interface will be created between two DUTs without the use of multicast traffic, using a bridge.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces bridge br0 address 10.1.1.1/24
set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces vxlan vxlan0 bridge-group bridge br0
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.65
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 33
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces bridge br0 address 10.1.1.2/24
set interfaces ethernet eth0 address 10.215.168.65/24
set interfaces vxlan vxlan0 bridge-group bridge br0
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.64
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 33
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.215.168.65 from DUT0:

admin@DUT0$ ping 10.215.168.65 count 1 size 56 timeout 1
Show output
PING 10.215.168.65 (10.215.168.65) 56(84) bytes of data.
64 bytes from 10.215.168.65: icmp_seq=1 ttl=64 time=33.0 ms

--- 10.215.168.65 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 32.956/32.956/32.956/0.000 ms

Step 4: Ping the IP address 10.215.168.64 from DUT1:

admin@DUT1$ ping 10.215.168.64 count 1 size 56 timeout 1
Show output
PING 10.215.168.64 (10.215.168.64) 56(84) bytes of data.
64 bytes from 10.215.168.64: icmp_seq=1 ttl=64 time=0.361 ms

--- 10.215.168.64 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.361/0.361/0.361/0.000 ms

Step 5: Ping the IP address 10.1.1.2 from DUT0:

admin@DUT0$ ping 10.1.1.2 count 1 size 56 timeout 1
Show output
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.677 ms

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.677/0.677/0.677/0.000 ms

Step 6: Ping the IP address 10.1.1.1 from DUT1:

admin@DUT1$ ping 10.1.1.1 count 1 size 56 timeout 1
Show output
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.374 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.374/0.374/0.374/0.000 ms

Unicast VXLAN scenario with no bridge

Description

In this example, a VXLAN interface will be created between three DUTs without the use of multicast traffic, giving the VXLAN interface an IP address.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces vxlan vxlan0 address 10.1.1.1/24
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.65
set interfaces vxlan vxlan0 fdb entry 2 mac '00:00:00:00:00:00' destination 10.215.168.66
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 nolearning
set interfaces vxlan vxlan0 vni 42
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces ethernet eth0 address 10.215.168.65/24
set interfaces vxlan vxlan0 address 10.1.1.2/24
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.64
set interfaces vxlan vxlan0 fdb entry 2 mac '00:00:00:00:00:00' destination 10.215.168.66
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 nolearning
set interfaces vxlan vxlan0 vni 42
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Set the following configuration in DUT2 :

set interfaces ethernet eth0 address 10.215.168.66/24
set interfaces vxlan vxlan0 address 10.1.1.3/24
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.64
set interfaces vxlan vxlan0 fdb entry 2 mac '00:00:00:00:00:00' destination 10.215.168.65
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 nolearning
set interfaces vxlan vxlan0 vni 42
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 4: Ping the IP address 10.1.1.2 from DUT0:

admin@DUT0$ ping 10.1.1.2 count 1 size 56 timeout 1
Show output
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.530 ms

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.530/0.530/0.530/0.000 ms

Step 5: Ping the IP address 10.1.1.3 from DUT1:

admin@DUT1$ ping 10.1.1.3 count 1 size 56 timeout 1
Show output
PING 10.1.1.3 (10.1.1.3) 56(84) bytes of data.
64 bytes from 10.1.1.3: icmp_seq=1 ttl=64 time=406 ms

--- 10.1.1.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 406.273/406.273/406.273/0.000 ms

Step 6: Ping the IP address 10.1.1.1 from DUT2:

admin@DUT2$ ping 10.1.1.1 count 1 size 56 timeout 1
Show output
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.549 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.549/0.549/0.549/0.000 ms

Dynamic Reconfiguration with bridge

Description

In this example, a VXLAN interface will be created between two DUTs without the use of multicast traffic, using a bridge. The VXLAN interfaces will be reconfigured dynamically.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces bridge br0 address 10.1.1.1/24
set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces vxlan vxlan0 bridge-group bridge br0
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.65
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 33
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces bridge br0 address 10.1.1.2/24
set interfaces ethernet eth0 address 10.215.168.65/24
set interfaces vxlan vxlan0 bridge-group bridge br0
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.64
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 33
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Ping the IP address 10.215.168.65 from DUT0:

admin@DUT0$ ping 10.215.168.65 count 1 size 56 timeout 1
Show output
PING 10.215.168.65 (10.215.168.65) 56(84) bytes of data.
64 bytes from 10.215.168.65: icmp_seq=1 ttl=64 time=0.370 ms

--- 10.215.168.65 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.370/0.370/0.370/0.000 ms

Step 4: Ping the IP address 10.215.168.64 from DUT1:

admin@DUT1$ ping 10.215.168.64 count 1 size 56 timeout 1
Show output
PING 10.215.168.64 (10.215.168.64) 56(84) bytes of data.
64 bytes from 10.215.168.64: icmp_seq=1 ttl=64 time=0.377 ms

--- 10.215.168.64 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.377/0.377/0.377/0.000 ms

Step 5: Ping the IP address 10.1.1.2 from DUT0:

admin@DUT0$ ping 10.1.1.2 count 1 size 56 timeout 1
Show output
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.562 ms

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.562/0.562/0.562/0.000 ms

Step 6: Ping the IP address 10.1.1.1 from DUT1:

admin@DUT1$ ping 10.1.1.1 count 1 size 56 timeout 1
Show output
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.538 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.538/0.538/0.538/0.000 ms

Step 7: Set the following configuration in DUT0 :

set interfaces bridge br0 address 10.1.1.1/24
set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces vxlan vxlan0 bridge-group bridge br0
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.65
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 14
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 8: Set the following configuration in DUT1 :

set interfaces bridge br0 address 10.1.1.2/24
set interfaces ethernet eth0 address 10.215.168.65/24
set interfaces vxlan vxlan0 bridge-group bridge br0
set interfaces vxlan vxlan0 destination-port 4789
set interfaces vxlan vxlan0 fdb entry 1 mac '00:00:00:00:00:00' destination 10.215.168.64
set interfaces vxlan vxlan0 interface eth0
set interfaces vxlan vxlan0 vni 14
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 9: Run the command show monitor-db interfaces vxlan vxlan0 id on DUT0 and check whether the output contains the following tokens:

14
Show output
14

Step 10: Run the command show monitor-db interfaces vxlan vxlan0 id on DUT1 and check whether the output contains the following tokens:

14
Show output
14

Step 11: Ping the IP address 10.1.1.2 from DUT0:

admin@DUT0$ ping 10.1.1.2 count 1 size 56 timeout 1
Show output
PING 10.1.1.2 (10.1.1.2) 56(84) bytes of data.
64 bytes from 10.1.1.2: icmp_seq=1 ttl=64 time=0.499 ms

--- 10.1.1.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.499/0.499/0.499/0.000 ms

Step 12: Ping the IP address 10.1.1.1 from DUT1:

admin@DUT1$ ping 10.1.1.1 count 1 size 56 timeout 1
Show output
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=0.209 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.209/0.209/0.209/0.000 ms