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 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.647 ms

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

Step 5: Ping 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.916 ms

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

Step 6: Ping 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.821 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.821/0.821/0.821/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 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.320 ms

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

Step 4: Ping 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.420 ms

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

Step 5: Ping 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.493 ms

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

Step 6: Ping 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.767 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.767/0.767/0.767/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 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.771 ms

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

Step 5: Ping 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.743 ms

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

Step 6: Ping 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.689 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.689/0.689/0.689/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 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=358 ms

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

Step 4: Ping 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.473 ms

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

Step 5: Ping 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.488 ms

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

Step 6: Ping 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.449 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.449/0.449/0.449/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 command show monitor-db interfaces vxlan vxlan0 id at DUT0 and check if output contains the following tokens:

14
Show output
14

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

14
Show output
14

Step 11: Ping 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.464 ms

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

Step 12: Ping 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.369 ms

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