拓扑图
2960:
>enable
>configure terminal
>vlan 2
>exit
>vlan 3
>exit
>interface fastEthernet 0/1
>switchport access vlan 2
>exit
>interface fastEthernet 0/2
>switchport access vlan 3
>exit
>interface fastEthernet 0/24
>switchport mode trunk //设置TRUNK
>exit
2811:
>enable
>configure terminal
>interface fastEthernet 0/0
>no shutdown
>exit
>interface fastEthernet 0/0.1 //子接口设置
>encapsulation dot1Q 2 //封装协议
>ip address 192.168.2.1 255.255.255.0 //ip地址
>exit
>interface fastEthernet 0/0.2
>encapsulation dot1Q 3
>ip address 192.168.3.1 255.255.255.0
>exit
OK! 谢谢http://cisco.chinaitlab.com/configure/849279.html
大家结合我的上一篇博客,就可以总结一下了。好开森~~