A typical case of cisco VLAN configuration has seen some exchanges on the Internet. The vlan configuration is vague. I want to help my siblings by sorting out the information. Two switches and two Router Vlan test devices: two switches, two 2950 routers, and one 2620 test equipment. Two switches are required. Switch1 and Switch2 create VLANs respectively, in dot1q encapsulation, the two switches are fa0/1 and fa0/1 connected to swit=fa0/12 and Router fa0/0 respectively. The host gateway 10.1.1.1 mask 255.255.255.0Vlan3 host gateway 192.168.1.1 configure www.2cto.com Switch> enSwitch # conf tSwitch (config) in mask 255.255.0switch1) # int fa0/1 Switch (config-if) # switchport mode trunk Switch (config-if) # switchport trunk encapsulation dot1q Switch (config-if) # endSwitch # conf tSwitch (config) # int fa0/12 Switch (config-if) # switchport mode trunk Switch (config-if) # switchport trunk encapsulation dot1q Switch (config-if) # endSwitch # dasvlan witch (vlan) # vtp server Switch (vlan) # vtp do ciscoSwitch (vlan) # vtp password ciscoSwitch (vlan) # vlan 2 Switch (vlan) # vlan 3 Switch (vlan) # exitSwitch # conf tSwitch (config) # int fa0/2 Switch (config-if) # switchport mode access Switch (config-if) # switchport access vlan 2 Switch (config-if) # int fa0/3 Switch (config-if) # switchport mode access Switch (config-if) # switchport access vlan 3 Switch (config-if) # end
In Switch2, configure Switch> www.2cto.com Switch> enSwitch # conf tSwitch (config) # int fa0/1 Switch (config-if) # switchport mode trunk Switch (config-if) # switchport trunk encapsulation dot1q Switch (config-if) # endSwitch # vlan database Switch (vlan) # vtp client Switch (vlan) # vtp do ciscoSwitch (vlan) # vtp password ciscoSwitch (vlan) # endSwitch # conf tSwitch (config) # int fa0/2 Switch (config-if) # switchport mode access Switch (config-if) # switchport access vlan 2 Switch (config-if) # endSwitch # conf tSwitch (config) # int fa0/3 Switch (config-if) # switchport mode access Switch (config-if) # switchport access vlan 3 Switch (config-if) # configure Router> www.2cto.com Router> enRouter # conf tRouter (config) # in fa0/0 Router (config-if) in THE endRouter Router) # no ip address Router (config-if) # no shRouter (config-if) # int fa0/0.2 Router (config-subif) # encapsulation dot1q 2 Router (config-subif) # ip address 10.1.1.1 255.255.255.0Router (config-subif) # endRouter # conf tRouter (config) # int fa0/0.3 Router (config-subif) # eRouter (config-subif) # encapsulation dot1q 3 Router (config-subif) # ip address 192.168.1.1 255.255.255.0Router (config-subif) # end
Author stan_xiaoming