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=5.24 ms

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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