目录
2.把交换机Switch2的端口5配置为所有VLAN共享 共享端口
Switch2 ->Config->FastEthernet0/5->Trunk
Route0->Config->FastEthernet0/0->On
进入CLI回车
#exit
#int f0/0.1
#encap dot1q 2
#ip address 192.1.2.254 255.255.255.0
‘
Router(config-if)#exit
Router(config)#int f0/0.1
Router(config-subif)#
Router(config-subif)#encap dot1q 2
Router(config-subif)#ip address 192.1.2.254 255.255.255.0
Router(config-subif)#exit
Router(config)#int f0/0.2
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up
Router(config-subif)#encap dot1q 3
Router(config-subif)#ip address 192.1.3.254 255.255.255.0
Router(config-subif)#exit
Router(config)#int f0/0.3
Router(config-subif)#
%LINK-5-CHANGED: Interface FastEthernet0/0.3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.3, changed state to up
Router(config-subif)#encap dotlq 4
^
% Invalid input detected at '^' marker.
Router(config-subif)#encap dot1q 4
Router(config-subif)#ip address 192.1.4.254 255.255.255.0
Router(config-subif)#
Pc0->desktop->ip->
Pc1->desktop->ip->
Pc2->desktop->ip->
Defualt Gateway: 192.1.4.254
Pc3->desktop->ip->
Defualt Gateway: 192.1.4.254
Pc4->
192.1.3.254
Pc5->192.1.3.254
Pc6->192.1.2.254
Pc7->192.1.3.254
Pc6-pc7报文传输
Pc3-pc4报文传输
Pc0-pc5