3层交换技术
发布时间:2019-08-25 09:33:53编辑:auto阅读(1716)
我们知道不同的vlan之间要相互的通行必须要借用第三层,也就是网络层,可以路由器也可以是三层的交换机。三层拓扑图
Switch(vlan)#vlan 2 name vlan2
Switch(vlan)#vlan 3 name vlan3
Switch(vlan)#vtp domain lcl
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#int vlan 2
Switch(config-if)#ip address 192.168.2.1 255.255.255.0
Switch(config-if)#no shut
Switch(config)#int vlan 3
Switch(config-if)#ip address 192.168.3.1 255.255.255.0
Switch(config-if)#no shut
Switch(vlan)#vtp domain lcl
Changing VTP domain from NULL to lcl
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 3
关键字: