免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1850 | 回复: 0
打印 上一主题 下一主题

交换机通过port-channel互联 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-04 18:53 |只看该作者 |倒序浏览
Google 标签:
port-channel
,
trunk allowed vlan
对线上交换机进行配置修改,出现交换机暂时断网.原有情况:
  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 类似配置.


chris_lee
2008-03-19 23:12
发表评论


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/70546/showart_726199.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP