Chinaunix首页 | 论坛 | 博客
  • 博客访问: 739649
  • 博文数量: 256
  • 博客积分: 3502
  • 博客等级: 中校
  • 技术积分: 3988
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-17 21:13
文章分类

全部博文(256)

文章存档

2014年(11)

2013年(134)

2012年(111)

我的朋友

分类:

2012-08-24 13:55:47

Port Channel举例

案例1:以lacp方式配置port channel。



   



    在下面说明中都用switch来表示dcrs-5512gc。



    如图所示,交换机switch1上的1,2,3端口都是access口,并且都属于vlan 1,将这三个端口以active方式加入group 1,switch2上6,8,9端口为trunk口,并且是allow all,将这三个端口以passive方式加入group 2,将以上对应端口分别用网线相连。



    配置步骤如下:



    switch1#



    switch1 (config)#interface eth 0/0/1-3



    switch1 (config-port-range)#port-group 1 mode active



    switch1 (config-port-range)#exit



    switch1 (config)#interface port-channel 1



    switch1 (config-if-port-channel1)#



    switch2#config



    switch2 (config)#port-group 2



    switch2 (config)#interface eth 0/0/6



    switch2 (config-ethernet0/0/6)#port-group 2 mode passive



    switch2 (config-ethernet0/0/6)#exit



    switch2 (config)# interface eth 0/0/8-9



    switch2 (config-port-range)#port-group 2 mode passive



    switch2 (config-port-range)#exit



    switch2 (config)#interface port-channel 2



    switch2 (config-if-port-channel2)#



    配置结果:



    过一段时间后,shell提示端口汇聚成功,此时switch1的端口1,2,3汇聚成一个汇聚端口,汇聚端口名为port- channel1,switch2的端口6,8,9汇聚成一个汇聚端口,汇聚端口名为port-channel2,并且都可以进入汇聚接口配置模式进行配 置。



    案例2:以on方式配置port channel。



   



    如图所示,交换机switch1上的1,2,3端口都是access口,并且都属于vlan 1,将这三个端口以on方式加入group 1,在switch2上6,8,9端口为trunk口,并且是allow all,将这三个端口以on方式加入group 2。



    配置步骤如下:



    switch1#config



    switch1 (config)#interface eth 0/0/1



    switch1 (config-ethernet0/0/1)# port-group 1 mode on



    switch1 (config-ethernet0/0/1)#exit



    switch1 (config)#interface eth 0/0/2



    switch1 (config-ethernet0/0/2)# port-group 1 mode on



    switch1 (config-ethernet0/0/2)#exit



    switch1 (config)#interface eth 0/0/3



    switch1 (config-ethernet0/0/3)# port-group 1 mode on



    switch1 (config-ethernet0/0/3)#exit



    switch2#config



    switch2 (config)#port-group 2



    switch2 (config)#interface eth 0/0/6



    switch2 (config-ethernet0/0/6)#port-group 2 mode on



    switch2 (config-ethernet0/0/6)#exit



    switch2 (config)# interface eth 0/0/8-9



    switch2 (config-port-range)#port-group 2 mode on



    switch2 (config-port-range)#exit



    配置结果:



    将交换机switch1上的1,2,3三个端口依次加入port-group1后我们可以看到,以on方式加入一个组完全是强制性的,两端的交换机并不会 通过交换lacp pdu来完成汇聚,汇聚也是触发式的,当敲入将2号端口加入port-group1的命令时,1和2马上汇聚在一起形成port-channel1,当将 3号端口加入port-group1时,1和2汇聚成的port-channel1被拆散,马上1,2,3三个端口又重新汇聚成port- channel1(需要说明的是,当有一个新的端口要加入已经汇聚成功的组时,必须先拆散原先的组,然后再能汇聚成一个新的组)。结果是switch1和 switch2上的三个端口都以on模式汇聚起来,各自形成一个汇聚端口。

阅读(937) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~