In the previous article, we prove the communication exchange is blocked in the different VLAN setting so that assign the same network segment. Although we can do it on network environment, it doesn’t been planned because we generally design VLAN for separating the special function or location based on the different network or subnet segment. For example: VLAN 30 is one Class C and VLAN 40 is another Class C , and so on.
If we did assign the different network segment into the different VLAN, how to exchange message between VLANs?
In this lab, I will use Layer 3 Switch with Inter VLAN Routing to exchange message.
Configure Trunk and Inter-VLAN Routing on Layer 3 Switch
In L3SW2, enter global configuration mode to enable routing on the switch by using the ip routing command
and also create VLAN 30 and 40 in the switch database
create trunk port in L3SW2 f1/1
For VLAN 30, we will configure a Switch Vlan Interface (SVI) with IP address 192.168.101.1 so that host DW-HYPERV-01 connected on VLAN 30 will use it as default gateway.
For VLAN 40, we will configure a Switch Vlan Interface (SVI) with IP address 192.168.102.1 so that host DW-HYPERV-02 or DW-HYPERV-03 connected on VLAN 40 will use it as default gateway.
Don’t forget saving the entries in the configuration file before left privilege command by the “copy running-config startup-config” or “write” command (#1)or
Configure Trunk on Layer 2 SwitchBesides create VLAN 30 and VLAN 40 in the switch database, we need to create trunk in the L2SW2 port f0/1 (#2)We can realize switch port, trunk and ip route status by the following command
Don’t forget saving running configuration file before left privilege command by the “copy running-config startup-config” or “write”
or
After finish the above steps, DW-HYPERV-01 can ping DW-HYPERV-02 or DW-HYPERV-03 (and vice verses) if the default gateway of these PCs set on 192.168.101.1 or 192.168.102.1
We also can display the ARP information by using the show arp command in EXEC mode of the L3SW2
Reference:
(# 1) After configure L3SW2, we can display the current state of the routing table by using the show ip route command in privileged EXEC mode
(# 2) For saving bandwidth, we will disable Cisco DTP protocol due to the switch port in L2SW2 f0/1 and L3SW2 f1/1 will be set trunk.