实验二 通过路由器实现VLAN间通信
一、实验环境:Windows7操作系统的计算机;
Boson Netsim for CCNA v6.0
实验步骤;sw1的fa0/1接到pc1,sw1的fa0/2接到pc2,sw2的fa0/1接到pc3,sw1的fa0/2接到pc4,sw1的fa0/12接到sw2的fa0/12,rt1的fa0/1接到sw1的fa0/3.配置如下:
(1) 交换机Switch1配置如下:
Switch>enable
Switch#vlan database
Switch(vlan)#vtp domain yctc
Changing VTP domain from NULL to yctc
Switch(vlan)#vtp server
Switch(vlan)#vlan 10 name zz
VLAN 10 added:
Name:zz
Switch(vlan)#vlan 20 name nn
VLAN 20 added:
Name:nn
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname switch1
switch1(config)#inter fa0/1
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 10
switch1(config-if)#inter fa0/2
switch1(config-if)#swwitchport mode access
^
% Invalid input detected at '^' marker.
switch1(config-if)#switchport mode access
switch1(config-if)#switchport access vlan 20
switch1(config-if)#inter fa0/12
switch1(config-if)#switchport mode trunk
switch1(config-if)#inter fa0/3
switch1(config-if)#switchport mode trunk
(2) 交换机Switch2配置如下:
Switch>enable
Switch#vlan database
Switch(vlan)#vtp domain yctc
Changing VTP domain from NULL to yctc
Switch(vlan)#vtp client
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#config t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname switch2
switch2(config)#inter fa0/1
switch2(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 10
switch2(config-if)#inter fa0/2
switch2(config-if)#switchport mode access
switch2(config-if)#switchport access vlan 20
switch2(config-if)#inter fa0/12
switch2(config-if)#switchport mode trunk
switch2(config-if)#
PC1:
192.168.10.2 255.255.255.0 192.168.10.1
PC2:
192.168.20.2 255.255.255.0 192.168.20.1
PC3:
192.168.10.3 255.255.255.0 192.168.10.1
PC4:
192.168.20.3 255.255.255.0 192.168.20.1
(3)路由器配置:
Router>enable
Router#conifg t
^
% Invalid input detected at '^' marker