Scenario 2
This example creates two VXLAN tunnels between two switches, enabling traffic from two networks to traverse a public network.
Procedure
-
On switch 1:
- Enable interface
1/1/1 and assign the IP address
100.1.1.1/24 to it.
switch# config switch(config)# interface 1/1/1 switch(config-if)# ip address 100.1.1.1/24 switch(config-if)# no shutdown switch(config-if)# exit switch(config)#
- Create VLAN
10 and VLAN
20.
switch(config)# vlan 10,20 switch(config-vlan-10)# exit
- Enable interface
1/1/2 and assign the IP address
10.0.0.1/24 and VLAN
10 to it.
switch(config)# interface 1/1/2 switch(config-if)# ip address 10.0.0.1/24 switch(config-if)# no shutdown switch(config-if)# vlan access 10 switch(config-if)# exit switch(config)#
- Enable interface
1/1/3 and assign the IP address
20.0.0.1/24 and VLAN
20 to it.
switch(config)# interface 1/1/3 switch(config-if)# ip address 20.0.0.1/24 switch(config-if)# no shutdown switch(config-if)# vlan access 20 switch(config-if)# exit switch(config)#
- Create VXLAN interface 1 and assign the source IP address
100.1.1.1 to it.
switch(config)# interface vxlan 1 switch(config-vxlan-if)# source ip 100.1.1.1 switch(config-vxlan-if)# no shutdown
- Create VNI
10, and assign the VTEP peer address
200.1.1.1 and VLAN
10 to it.
switch(config-vxlan-if)# vni 10 switch(config-vni)# vtep-peer 200.1.1.1 switch(config-vni)# vlan 10 switch(config-vni)# exit switch(config-vxlan-if)# exit
- Create VNI
20, and assign the VTEP peer address
200.1.1.1 and VLAN
20 to it.
switch(config-vxlan-if)# vni 20 switch(config-vni)# vtep-peer 200.1.1.1 switch(config-vni)# vlan 20 switch(config-vni)# exit switch(config-vxlan-if)# exit switch(config)#
- Enable interface
1/1/1 and assign the IP address
100.1.1.1/24 to it.
-
On switch 2:
- Enable interface
1/1/1 and assign the IP address
200.1.1.1/24 to it.
switch# config switch(config)# interface 1/1/1 switch(config-if)# ip address 200.1.1.1/24 switch(config-if)# no shutdown switch(config-if)# exit switch(config)#
- Create VLAN
10 and VLAN
20.
switch(config)# vlan 10,20 switch(config-vlan-10)# exit
- Enable interface
1/1/2 and assign the IP address
10.0.0.2/24 and VLAN
10 to it.
switch(config)# interface 1/1/2 switch(config-if)# ip address 10.0.0.2/24 switch(config-if)# no shutdown switch(config-if)# vlan access 10 switch(config-if)# exit switch(config)#
- Enable interface
1/1/3 and assign the IP address
20.0.0.2/24 and VLAN
20 to it.
switch(config)# interface 1/1/3 switch(config-if)# ip address 20.0.0.1/24 switch(config-if)# no shutdown switch(config-if)# vlan access 20 switch(config-if)# exit switch(config)#
- Create VXLAN interface 1 and assign the source IP address
200.1.1.1 to it.
switch(config)# interface vxlan 1 switch(config-vxlan-if)# source ip 200.1.1.1 switch(config-vxlan-if)# no shutdown
- Create VNI
10, and assign the VTEP peer address
100.1.1.1 and VLAN
10 to it.
switch(config-vxlan-if)# vni 10 switch(config-vni)# vtep-peer 100.1.1.1 switch(config-vni)# vlan 10 switch(config-vni)# exit switch(config-vxlan-if)# exit
- Create VNI
20, and assign the VTEP peer address
100.1.1.1 and VLAN
20 to it.
switch(config-vxlan-if)# vni 20 switch(config-vni)# vtep-peer 100.1.1.1 switch(config-vni)# vlan 20 switch(config-vni)# exit switch(config-vxlan-if)# exit switch(config)#
- Enable interface
1/1/1 and assign the IP address
200.1.1.1/24 to it.