三层交换机配置:

Switch>enable
Switch#configure terminal
Switch(vlan)#vlan 10 name VLAN10
Switch(vlan)#vlan 20 name VLAN20
Switch(config)#interface FastEthernet0/1
Switch(config-if)#switchport trunk allowed vlan add 10
Switch(config-if)#switchport trunk allowed vlan add 20
Switch(config)#interface FastEthernet0/2
Switch(config-if)#switchport trunk allowed vlan add 10
Switch(config-if)#switchport trunk allowed vlan add 20
Switch(config)#interface vlan10
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#interface vlan20
Switch(config-if)#ip address 192.168.2.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#ip routing
Switch#show ip route

版权声明:本文为fourw原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/fourw/p/11122470.html