
网络
1 前言
一个问题,一篇文章,一出故事。
笔者家里的机柜扩充设备,端口已经不够用了,因此在淘宝掏了一台思科的C3560E回来用。
本章将总结如何用Trunk上联路由设备。
2 最佳实践
2.1 设置RouterOS的VLAN
2.2 设置vlan以及地址
Switch(config)# interface vlan 10 Switch(config-if)# ip address 10.168.0.2 255.255.255.0 Switch(config-if)# no shutdown Switch(config)# interface vlan 20 Switch(config-if)# ip address 10.168.1.2 255.255.255.0 Switch(config-if)# no shutdown
2.3 设置聚合虚拟接口
Switch(config)# interface Port-channel1 Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk allowed vlan all Switch(config-if)# no shutdown
2.4 设置Trunk口模式
Switch(config)# interface range GigabitEthernet0/1 - 2 Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# switchport mode trunk Switch(config-if)# channel-protocol lacp Switch(config-if)# channel-group 1 mode active
注:“channel-group 1”的编号需要与“Port-channel1”的保持一致
2.5 验证配置
Switch# ping 10.168.0.1 Switch# ping 10.168.1.1
没有评论