Lab Tips:
Suppose that there are four VLANs. To realize communication between them, you need four LAN ports. A router with four ports is expensive, so we use one port to realize communication between the four VLANs. The following lab is an example of two VLANs.
Topology:
Lab Requirements:
1. Segment the switch into two VLANs.
2. Port fa0/2 is in VLAN2 and Port fa0/3 is in VLAN3.
3. Make the link between Port f0/1 of the switch and Port fa0/0 of the router a trunk link.
4. Realize the communication between P4S-host1 and P4S-host2.
Lab Process:
(Switch Configuration)
P4S-Switch#vlan database
P4S-Switch (vlan)#vlan 2 name pass4sure2
P4S-Switch (vlan)#vlan 3 name pass4sure3
P4S-Switch (vlan)#exit
P4S-Switch #configure terminal
P4S-Switch (config)#interface fastethernet0/2
P4S-Switch (config-if)#switchport access vlan 2
P4S-Switch (config)#interface fastethernet0/3
P4S-Switch (config-if)#switchport access vlan 3
P4S-Switch (config)#interface fastethernet0/1
P4S-Switch (config-if)#switchport trunk encapsulation isl
(Router Configuration)
P4S-Router(config)#interface fa0/0
P4S-Router(config-if)#duplex full fa0/0
P4S-Router(config-if)#no shutdown
P4S-Router(config-if)#exit
P4S-Router(config-if)#interface fa0/0.1
P4S-Router(config-if)#encapsulation isl
P4S-Router(config-if)#ip address 192.168.1.1 255.255.255.0
P4S-Router(config-if)#exit
P4S-Router(config-if)#interface fa0/0.2
P4S-Router(config-if)#encapsulation isl
P4S-Router(config-if)#ip address 192.168.2.1 255.255.255.0
P4S-Router(config-if)#exit