Cisco6509三层交换机的通道配置
一、层3通道配置
1、创建通道
(config)# interface port-channel
number //创建通道
(config-if)# ip address
ip_address
mask //分配IP地址
(config-if)# end
# show running-config interface port-channel
number // 验证
2、配置通道组
(config)# interface [rang]
type
slot/port //选择要加入通道的端口
(config-if)# no ip address
(config-if)# channel-protocol (lacp | pagp) //可选,通道协议
(config-if)# channel-group
number mode {active | auto | desirable | on | passive} //配置端口通道组并指定mode, lacp仅支持active和passive,pagp支持auto、desirable
(config-if)# lacp port-priority
priority_value //对lacp协议可选配置,1-65535,default 32768
(config-if)# end
# show running-config interface
type
slot/port
# show interface
type
slot/port etherchannel
3、LACP系统优先级(可选)
(config)# lacp system-priority
priority_value //1-65535,default 32768
(config)# end
# show lacp sys-id
4、负载平衡
(config)# port-channel load-balance {src-dst-ip | src-ip | dst-ip |……}
(config)# end
# show etherchannel load-balance
二、层2通道
1、转化端口为二层端口
(config)# interface [rang]
type
slot/port
(config-if)# switchport
2、创建层二通道
(config)# interface port-channel
number
(config-if)# switchport
(config-if)# switchport mode access
(config-if)# switchport access vlan
vlan-id
(config-if)# switchport trunk encapsulation [dot1q | isl}
3、端口vlan模式
(config)# interface port-channel
number
Cisco6509三层交换机的通道配置
一、层3通道配置
1、创建通道
(config)# interface port-channel
number //创建通道
(config-if)# ip address
ip_address
mask //分配IP地址
(config-if)# end
# show running-config interface port-channel
number // 验证
2、配置通道组
(config)# interface [rang]
type
slot/port //选择要加入通道的端口
(config-if)# no ip address
(config-if)# channel-protocol (lacp | pagp) //可选,通道协议
(config-if)# channel-group
number mode {active | auto | desirable | on | passive} //配置端口通道组并指定mode, lacp仅支持active和passive,pagp支持auto、desirable
(config-if)# lacp port-priority
priority_value //对lacp协议可选配置,1-65535,default 32768
(config-if)# end
# show running-config interface
type
slot/port
# show interface
type
slot/port etherchannel
3、LACP系统优先级(可选)
(config)# lacp system-priority
priority_value //1-65535,default 32768
(config)# end
# show lacp sys-id
4、负载平衡
(config)# port-channel load-balance {src-dst-ip | src-ip | dst-ip |……}
(config)# end
# show etherchannel load-balance
二、层2通道
1、转化端口为二层端口
(config)# interface [rang]
type
slot/port
(config-if)# switchport
2、创建层二通道
(config)# interface port-channel
number
(config-if)# switchport
(config-if)# switchport mode access {trunk | negotiate}
(config-if)# switchport access vlan
vlan-id
(config-if)# switchport trunk encapsulation {dot1q | isl} //isl为cisco私有协议
3、端口vlan端口模式
(config)# interface [rang]
type
slot/port
(conig-if)# switchport mode access {trunk | negotiate}
(config-if)# switchport access vlan
vlan-id
4、层二通道组
(config)# interface [rang]
type
slot/port
(config-if)# channel-group
number mode {active | auto | desirable | on | passive}
5、负载平衡
(config)# port-channel load-balance {src-dst-ip | src-ip | dst-ip |……}
6、验证配置
# show running-config interface
type
slot/port
# show interface
type
slot/port switchport
# show interface
type
slot/port trunk
# show running-config interface port-channel
number
# show interface
type
slot/port etherchannel
个项目,上面是7609,下面是3550,两者中间拿了3条光纤来做port-channel,汇聚,但是三条线流量不均衡,请问有人知道为什么吗?
3550的配置
interface Port-channel3
switchport access vlan 130
switchport mode access
!
interface GigabitEthernet0/1
switchport access vlan 130
switchport mode access
channel-group 3 mode on
!
interface GigabitEthernet0/2
switchport access vlan 130
switchport mode access
channel-group 3 mode on
!
interface GigabitEthernet0/3
switchport access vlan 130
switchport mode access
channel-group 3 mode on
!
7609的配置
interface Port-channel1
switchport
switchport access vlan 130
switchport mode access
no ip address
!
interface GigabitEthernet1/22
switchport
switchport access vlan 130
switchport mode access
no ip address
channel-group 3 mode on
!
interface GigabitEthernet1/23
switchport
switchport access vlan 130
switchport mode access
no ip address
channel-group 3 mode on
!
interface GigabitEthernet1/24
switchport
switchport access vlan 130
switchport mode access
no ip address
channel-group 3 mode on
在3550上sh etherchannel load-balance是load balance by src-mac
在7609上sh etherchannel load-balance是load balance by src-dst-IP
但试了好多种办法,更换3550的load-balance方式(src-mac,dst-mac)都没法让线路的流量均衡,一直都是一条满,另外两条跑一部分。
有没哪位兄弟能帮帮忙?换机通过port-channel互联
3550的配置
interface Port-channel3
switchport access vlan 130
switchport mode access
!
interface GigabitEthernet0/1
switchport access vlan 130
switchport mode access
channel-group 3 mode on
!
interface GigabitEthernet0/2
switchport access vlan 130
switchport mode access
channel-group 3 mode on
!
interface GigabitEthernet0/3
switchport access vlan 130
switchport mode access
channel-group 3 mode on
!
7609的配置
interface Port-channel1
switchport
switchport access vlan 130
switchport mode access
no ip address
!
interface GigabitEthernet1/22
switchport
switchport access vlan 130
switchport mode access
no ip address
channel-group 3 mode on
!
interface GigabitEthernet1/23
switchport
switchport access vlan 130
switchport mode access
no ip address
channel-group 3 mode on
!
interface GigabitEthernet1/24
switchport
switchport access vlan 130
switchport mode access
no ip address
channel-group 3 mode on
在3550上sh etherchannel load-balance是load balance by src-mac
在7609上sh etherchannel load-balance是load balance by src-dst-IP
但试了好多种办法,更换3550的load-balance方式(src-mac,dst-mac)都没法让线路的流量均衡,一直都是一条满,另外两条跑一部分。
有没哪位兄弟能帮帮忙?换机通过port-channel互联
2008-03-25 22:29:40
标签:
port-channel vlan trunk 交换机 [ 推送到技术圈]
对线上交换机进行配置修改,出现交换机暂时断网.原有情况:
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 这样的配置.
经验总结: 本文出自 51CTO.COM技术博客
对trunk链路进行添加vlan配置时: 1,对于物理trunk端口绑定在逻辑端口port-channel的情况,需要先对逻辑端口进行配置,这样的配置可以自动配置到物理链路上.(扩充:是否所有对于物理链路的配置都可以先在逻辑链路上配置,且自动配置在相应的物理链路上呢?) 2,对于直接物理链路(没有绑定在逻辑链路上)的情况,可以直接对物理链路进行 switchport trunk allow vlan add 254 类似配置. |