交换机通过port-channel互联
2008-03-25 22:29
435 查看
对线上交换机进行配置修改,出现交换机暂时断网.原有情况:
2台交换机通过2对光纤连接,分别作上port-channel,并将交换机的相应端口绑定在po上,启用trunk模式.交换机上原有几个vlan,但是在这个Po上只允许vlan21通过.如:
上联交换机A部分配置:
interface Port-channel1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
!
interface GigabitEthernet1/0/3
description to-YH06050001_g1/0/25
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
channel-group 1 mode on
!
interface GigabitEthernet1/0/4
description to-YH06050001_g1/0/26
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
channel-group 1 mode on
!
下联交换机B部分配置:
interface Port-channel1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
!
interface GigabitEthernet1/0/25
description to-CN_3523_g1/0/3
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
udld port
channel-group 1 mode on
!
interface GigabitEthernet1/0/26
description to-CN_3523_g1/0/4
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
channel-group 1 mode on
!
现在在这2个交换机上分别新建一个vlan254,并且需要在它们之间互通vlan254.于是在分别建立vlan254后,在A上作如下配置:
int port-channel 1
switchport trunk allow vlan add 254
int range g1/0/3 -4
switchport trunk allow vlan add 254
然后在交换机B上作如下配置:
int range g1/0/25 -26
switchport trunk allow vlan add 254
此时出现交换机B立即断网,于是马上进机房察看交换机这2个端口的状态灯发现显示沉黄色.console登陆,删除这一配置,端口才up.查看log发现:vlan mask is not matching.因为po上还没有进行配置.然后进行如下配置:
int port-channel 1
switchport trunk allow vlan add 254
此时sh run,发现
int range g1/0/25 -26
switchport trunk allow vlan add 254
这2个端口竟然自动配置上了vlan254.
于是另外再做实验,对于没有做po的端口,可以直接加类似 switchport trunk allow vlan add 254 这样的配置.
经验总结:
对trunk链路进行添加vlan配置时:
1,对于物理trunk端口绑定在逻辑端口port-channel的情况,需要先对逻辑端口进行配置,这样的配置可以自动配置到物理链路上.(扩充:是否所有对于物理链路的配置都可以先在逻辑链路上配置,且自动配置在相应的物理链路上呢?)
2,对于直接物理链路(没有绑定在逻辑链路上)的情况,可以直接对物理链路进行 switchport trunk allow vlan add 254 类似配置.
2台交换机通过2对光纤连接,分别作上port-channel,并将交换机的相应端口绑定在po上,启用trunk模式.交换机上原有几个vlan,但是在这个Po上只允许vlan21通过.如:
上联交换机A部分配置:
interface Port-channel1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
!
interface GigabitEthernet1/0/3
description to-YH06050001_g1/0/25
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
channel-group 1 mode on
!
interface GigabitEthernet1/0/4
description to-YH06050001_g1/0/26
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
channel-group 1 mode on
!
下联交换机B部分配置:
interface Port-channel1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
!
interface GigabitEthernet1/0/25
description to-CN_3523_g1/0/3
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
udld port
channel-group 1 mode on
!
interface GigabitEthernet1/0/26
description to-CN_3523_g1/0/4
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 21
switchport mode trunk
channel-group 1 mode on
!
现在在这2个交换机上分别新建一个vlan254,并且需要在它们之间互通vlan254.于是在分别建立vlan254后,在A上作如下配置:
int port-channel 1
switchport trunk allow vlan add 254
int range g1/0/3 -4
switchport trunk allow vlan add 254
然后在交换机B上作如下配置:
int range g1/0/25 -26
switchport trunk allow vlan add 254
此时出现交换机B立即断网,于是马上进机房察看交换机这2个端口的状态灯发现显示沉黄色.console登陆,删除这一配置,端口才up.查看log发现:vlan mask is not matching.因为po上还没有进行配置.然后进行如下配置:
int port-channel 1
switchport trunk allow vlan add 254
此时sh run,发现
int range g1/0/25 -26
switchport trunk allow vlan add 254
这2个端口竟然自动配置上了vlan254.
于是另外再做实验,对于没有做po的端口,可以直接加类似 switchport trunk allow vlan add 254 这样的配置.
经验总结:
对trunk链路进行添加vlan配置时:
1,对于物理trunk端口绑定在逻辑端口port-channel的情况,需要先对逻辑端口进行配置,这样的配置可以自动配置到物理链路上.(扩充:是否所有对于物理链路的配置都可以先在逻辑链路上配置,且自动配置在相应的物理链路上呢?)
2,对于直接物理链路(没有绑定在逻辑链路上)的情况,可以直接对物理链路进行 switchport trunk allow vlan add 254 类似配置.
相关文章推荐
- 各种交换机端口安全总结(配置实例)
- 思科交换机的登录、密码恢复与应用
- Cisco常见交换机,路由器密码和版本恢复方法探讨
- 笑傲HUB.路由器.交换机之教学篇
- 配置Cisco VLAN、VLAN Trunk、VTP和 STP(精)
- 三层交换机与路由器的主要区别
- VLAN之间ACL和VACL的区别
- 交换机ACL配置实战
- 如何识别是3层还是2层交换机
- 根据IP查找在交换机上的端口
- 思科交换机的登录、密码恢复与应用
- Trunk(端口汇聚)的概念与设置
- 思科局域网交换机维护与配置应用技巧详解
- 思科局域网交换机维护与配置应用技巧详解 (2)
- 交换机 VLAN配置基础及实例
- Vlan间路由实验(单臂路由实现法)
- 三层交换机配置实例及说明
- 三层交换机 于VLAN的一些理解
- 配置VLAN Trunk和VTP域
- 华为5700系列交换机常用配置示例 推荐