Scenario 4

This example shows how a VLAN can be tunneled between multiple switches. Switch 1 and 2 are directly connected. The connection between switch 1 and switch 3 traverses switch 4, which is part of the underlay network for the VXLAN tunnel.

Procedure
  1. On switch 1:
    1. Create VLAN 10.
      switch(config)# vlan 10
      switch(config-vlan-10)# exit
    2. Enable interface 1/1/1 and assign the IP address 10.0.0.1/24 and VLAN 10 to it.
      switch(config)# interface 1/1/1
      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
    3. Enable interface 1/1/2 and assign the IP address 11.0.0.1/24 to it.
      switch(config)# interface 1/1/2
      switch(config-if)# ip address 11.0.0.1/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    4. Enable interface 1/1/3 and assign the IP address 12.0.0.1/24 to it.
      switch(config)# interface 1/1/3
      switch(config-if)# ip address 12.0.0.1/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
      switch(config)# 
    5. Define loopback interface 1 and assign the IP address 1.1.1.1/24 to it.
      switch(config)# interface loopback 1
      switch(config-if)# ip address 1.1.1.1/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
      switch(config)# 
    6. Create VXLAN interface 1 and assign the source IP address 1.1.1.1 to it.
      switch(config)# interface vxlan 1
      switch(config-vxlan-if)# source ip 1.1.1.1
      switch(config-vxlan-if)# no shutdown
    7. Create VNI 100. Assign the VLAN 10 and the VTEP peer addresses 2.2.2.2 and 3.3.3.3 to it.
      switch(config-vxlan-if)# vni 100
      switch(config-vni)# vtep-peer 2.2.2.2
      switch(config-vni)# vtep-peer 3.3.3.3
      switch(config-vni)# vlan 10
      switch(config-vni)# exit
      switch(config-vxlan-if)# exit
    8. Define IP routes to reach the other switches.
      switch(config)# ip route 2.2.2.0/24 11.0.0.2
      switch(config)# ip route 3.3.3.0/24 12.0.0.2
      switch(config)# ip route 13.0.0.0/24 12.0.0.2
  2. On switch 2:
    1. Create VLAN 10.
      switch(config)# vlan 10
      switch(config-vlan-10)# exit
    2. Enable interface 1/1/21 and assign the IP address 10.0.0.3/24 and VLAN 10 to it.
      switch(config)# interface 1/1/21
      switch(config-if)# ip address 10.0.0.3/24
      switch(config-if)# no shutdown
      switch(config-if)# vlan access 10
      switch(config-if)# exit
    3. Enable interface 1/1/20 and assign the IP address 11.0.0.2/24 to it.
      switch(config)# interface 1/1/20
      switch(config-if)# ip address 11.0.0.2/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    4. Define loopback interface 1 and assign the IP address 2.2.2.2/24 to it.
      switch(config)# interface loopback 1
      switch(config-if)# ip address 2.2.2.2/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
      switch(config)# 
    5. Create VXLAN interface 1 and assign the source IP address 2.2.2.2 to it.
      switch(config)# interface vxlan 1
      switch(config-vxlan-if)# source ip 2.2.2.2
      switch(config-vxlan-if)# no shutdown
    6. Create VNI 100. Assign the VLAN 10 and the VTEP peer address 1.1.1.1 to it.
      switch(config-vxlan-if)# vni 10
      switch(config-vni)# vtep-peer 1.1.1.1
      switch(config-vni)# vlan 100
      switch(config-vni)# exit
      switch(config-vxlan-if)# exit
    7. Define an IP route to reach switch 1.
      switch(config)# ip route 1.1.1.0/24 11.0.0.1
  3. On switch 3:
    1. Create VLAN 10.
      switch(config)# vlan 10
      switch(config-vlan-10)# exit
    2. Enable interface 1/1/13 and assign the IP address 10.0.0.2/24 and VLAN 10 to it.
      switch(config)# interface 1/1/13
      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
    3. Enable interface 1/1/14 and assign the IP address 13.0.0.2/24 to it.
      switch(config)# interface 1/1/14
      switch(config-if)# ip address 13.0W.0.1/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    4. Define loopback interface 1 and assign the IP address 3.3.3.3/24 to it.
      switch(config)# interface loopback 1
      switch(config-if)# ip address 3.3.3.3/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
      switch(config)# 
    5. Create VXLAN interface 1 and assign the source IP address 3.3.3.3 to it.
      switch(config)# interface vxlan 1
      switch(config-vxlan-if)# source ip 3.3.3.3
      switch(config-vxlan-if)# no shutdown
    6. Create VNI 100. Assign the VLAN 10 and the VTEP peer address 1.1.1.1 to it.
      switch(config-vxlan-if)# vni 100
      switch(config-vni)# vtep-peer 1.1.1.1
      switch(config-vni)# vlan 10
      switch(config-vni)# exit
      switch(config-vxlan-if)# exit
    7. Define an IP route to reach switch 1.
      switch(config)# ip route 1.1.1.0/24 13.0.0.2
      switch(config)# ip route 12.0.0.0/24 13.0.0.2
  4. On switch 4:
    1. Create VLAN 10.
      switch(config)# vlan 10
      switch(config-vlan-10)# exit
    2. Enable interface 1/1/19 and assign the IP address 12.0.0.2/24 to it.
      switch(config)# interface 1/1/19
      switch(config-if)# ip address 12.0.0.2/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    3. Enable interface 1/1/20 and assign the IP address 13.0.0.2/24 to it.
      switch(config)# interface 1/1/20
      switch(config-if)# ip address 13.0.0.2/24
      switch(config-if)# no shutdown
      switch(config-if)# exit
    4. Define an IP route to reach switch 1 and switch 3.
      switch(config)# ip route 1.1.1.0/24 12.0.0.1
      switch(config)# ip route 3.3.3.0/24 13.0.0.1