channel-group [num] mode [auto | on | desirable]
auto:被动协商;on:不协商;desirable:主动协商。
on只能和on起channel,两个auto不能起channel。
______________________________
channel-group 1 mode on是创建一个channel并设置模式
channel-group 1是单个接口加入已存在的channel
【转自bbs.bitsCN.com】
我要把1台3550跟1台2950用port-channel连起来。
在3550的两个端口上加
description test
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
duplex full
speed 100
channel-group 10 mode desirable non-silent
port-channel 10如下
interface Port-channel10
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 999
switchport mode trunk
no ip address
duplex full
在2950的两个端口上加
duplex full
speed 100
channel-group 2 mode desirable non-silent
port-channel 2如下
switchport trunk allowed vlan 999
duplex full
flowcontrol send off
但两个交换机的端口都不会up上来。
请问谁知道要怎么设置port-channel
谢谢。
如果在两个交换机的端口都用switchport trunk allowed vlan 999,就连得同。
两太交换机的配置如下
2950配置
interface Port-channel2
switchport trunk allowed vlan 999
duplex full
flowcontrol send off
interface FastEthernet0/23
duplex full
speed 100
channel-group 2 mode desirable non-silent
interface FastEthernet0/24
duplex full
speed 100
channel-group 2 mode desirable non-silent
3550配置
interface Port-channel10
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 999
switchport mode trunk
no ip address
duplex full
flowcontrol receive on
interface FastEthernet0/23
description test
no ip address
duplex full
speed 100
flowcontrol receive on
channel-group 10 mode on
interface FastEthernet0/24
description test
no ip address
duplex full
speed 100
flowcontrol receive on
channel-group 10 mode on
新手上路

成员等级: 1 发表总数: 7 金币总数: 21 所属组别: 普通成员 注册日期: 2005/02/24

|
已经解决,在2950 把port-channel改为1,用2就不行 |
CISCO路由器配置完全手册(二) |
出处:www.net130.com |
|
[ 2004-12-13 10:15:06 ] |
作者:佚 名 |
责任编辑:liyalin |
第二章 广域网协议设置 一、HDLC 二、PPP 三、X.25 四、Frame Relay 五、ISDN 六、PSTN
一、HDLC
HDLC是CISCO路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用HDLC封装。
1. 有关命令
端口设置
任务
|
命令
|
设置HDLC封装
|
encapsulation hdlc
|
设置DCE端线路速度
|
clockrate speed
|
复位一个硬件接口
|
clear interface serial unit
|
显示接口状态
|
show interfaces serial [unit] 1
|
注:1.以下给出一个显示Cisco同步串口状态的例子.
Router#show interface serial 0
Serial 0 is up, line protocol is up
Hardware is MCI Serial
Internet address is 150.136.190.203, subnet mask is 255.255.255.0
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:07, output 0:00:00, output hang never
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 0 bits/sec, 0 packets/sec
Five minute output rate 0 bits/sec, 0 packets/sec
16263 packets input, 1347238 bytes, 0 no buffer
Received 13983 broadcasts, 0 runts, 0 giants
2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort
22146 packets output, 2383680 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets, 0 restarts
1 carrier transitions
|
2. 举例
设置如下:
Router1:
interface Serial0
ip address 192.200.10.1 255.255.255.0
clockrate 1000000
Router2:
interface Serial0
ip address 192.200.10.2 255.255.255.0
!
|
3. 举例使用E1线路实现多个64K专线连接.
相关命令:
任务
|
命令
|
进入controller配置模式
|
controller {t1 | e1} number
|
选择帧类型
|
framing {crc4 | no-crc4}
|
选择line-code类型
|
linecode {ami | b8zs | hdb3}
|
建立逻辑通道组与时隙的映射
|
channel-group number timeslots range1
|
显示controllers接口状态
|
show controllers e1 [slot/port]2
|
注: 1. 当链路为T1时,channel-group编号为0-23, Timeslot范围1-24; 当链路为E1时, channel-group编号为0-30, Timeslot范围1-31.
2.使用show controllers e1观察controller状态,以下为帧类型为crc4时controllers正常的状态.
Router# show controllers e1
e1 0/0 is up.
Applique type is Channelized E1 - unbalanced
Framing is CRC4, Line Code is HDB3 No alarms detected.
Data in current interval (725 seconds elapsed):
0 Line Code Violations, 0 Path Code Violations
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs Total Data (last 24 hours) 0 Line Code Violations, 0 Path Code Violations,
0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,
0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
|
以下例子为E1连接3条64K专线, 帧类型为NO-CRC4,非平衡链路,路由器具体设置如下:
shanxi#wri t
Building configuration...
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname shanxi
!
enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/
enable password shanxi
!
!
ip subnet-zero
!
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2
channel-group 2 timeslots 3
!
interface Ethernet0
ip address 133.118.40.1 255.255.0.0
media-type 10BaseT
!
interface Ethernet1
no ip address
shutdown
!
interface Serial0:0
ip address 202.119.96.1 255.255.255.252
no ip mroute-cache
!
interface Serial0:1
ip address 202.119.96.5 255.255.255.252
no ip mroute-cache
!
interface Serial0:2
ip address 202.119.96.9 255.255.255.252
no ip mroute-cache
!
no ip classless
ip route 133.210.40.0 255.255.255.0 Serial0:0
ip route 133.210.41.0 255.255.255.0 Serial0:1
ip route 133.210.42.0 255.255.255.0 Serial0:2
!
line con 0
line aux 0
line vty 0 4
password shanxi
login
!
end
|
相关推荐:
CISCO路由器配置完全手册(一) |
一个认证狂人的认证不归路 |
思科路由器常用配置命令大全(A-X) |
思科认证:CCIE安全认证学习笔记 |
网络协议大全之一:网络、路由协议 |
网络协议大全之二:数据链路协议 |
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [下一页]
Cisco 交换机 上的链路聚合
来源: 作者: 2007-10-24 出处: pcdog.com
ios vlan 协议
cisco交换机上的链路聚合
一、2层 ethernet channel
(interface)#channel-group number mode {on | auto [no-silent]|desirable [no-silent]}
on 使用EthernetChannel 但不发送pagp分组
off 禁用EthernetChannel
desirable 交换机主动要求形成一个EthernetChannel 发送pagp分组
auto 交换机被动形成一个EthernetChannel 不发送pagp分组 默认取值
往往可能EthernetChannel的一端(一台服务器或者是网络分析仪)#没有产生pagp分组或者说是保持
“沉默",可以使用关键字silent在15秒的延迟之后,让对端成为EthernetChannel.起对端为”沉默“
使用non-silent关键字则要求在激活EthernetChannel之前现进行pagp协商、
Catalyst 2900 3500xl 平台上没有pagp 只有 on off不进行协商
ios (global)# port-channel load-balance method
――源地址 src-ip
――目的地址 dst-ip
――源和目的 src-dst-ip
――源mac地址 src-mac
――目的mac地址 dst-mac
――源和目的mac src-dst-mac
――源端口号 src-port
――目的端口号 dst-port
――源和目的端口号 src-dst-port
example
(global)# interface fastethernet 4/1 (interface)#channel-group 100 mode desirable non-silent (global)# interface fastethernet 4/2 (interface)#channel-group 100 mode desirable non-silent (global)# interface fastethernet 5/1 (interface)#channel-group 100 mode desirable non-silent (global)# interface fastethernet 5/2 (interface)#channel-group 100 mode desirable non-silent (global)#port-channel load-balance src-dst-ip show etherchannel [channel-group] load-balance |
绑定到一起的端口必须具有相同的属性如:速度 双工模式 vlan 干路模式 允许的vlan范围
3层 etherchannel
1创建逻辑端口通道
interface port-channel number
2.配置端口通道上的 协议信息
ip address address netmask
3.把物理3层接口分配给通道
interface type mod/port
选择的端口必须是一个3层接口 no switchport
4.删除任何协议地址
no ip address
5.把接口分配给通道组
channel-group number mode {auto |dusirable |on}
6.核实接口已经启用
no shutdown
7核实通道
show ethernetchannel number port-channel
show interface type number etherchannel
show ethernetchannel summary
example
分布层交换机上
(config)#interface channel-group 1 (config-if)#ip address 192.168.1.1 255.255.255.0 (config-if)#interface gigabitethernet 1/1 (config-if)#no switchport (config-if)#no ip address (config-if)#channel-group 1 mod on (config-if)#no shutdown (config-)#interface gigabitethernet 1/2 (config-if)#no switchport (config-if)#no ip address (config-if)#channel-group 1 mode on (config-if)#end copy run start |
接入层交换机(3500xl)#
(config)#interface gigabitethernet 0/1 (config-if)#port group 1 (config)#interface gigabitethernet 0/2 (config-if)#port group 1 (config)#end #copy run start |
我的试验3750配置实例 CastLyst 3750G
Switch#config t Switch(config)#int gigabitEthernet 1/0/23 Switch(config-if)#channel-group 10 mode ? active Enable LACP unconditionally auto Enable PAgP only if a PAgP device is detected desirable Enable PAgP unconditionally on Enable Etherchannel only passive Enable LACP only if a LACP device is detected Switch(config-if)#channel-group 10 mode desirable non-silent Switch(config)#int gigabitEthernet 1/0/24 Switch(config-if)#channel-group 10 mode desirable non-silent Switch(config)#port-channel ? load-balance Load Balancing method Switch(config)#port-channel load-balance ? dst-ip Dst IP Addr dst-mac Dst Mac Addr src-dst-ip Src XOR Dst IP Addr src-dst-mac Src XOR Dst Mac Addr src-ip Src IP Addr src-mac Src Mac Addr Switch(config)#port-channel load-balance src-dst-ip Switch#write Switch#show interfaces gigabitEthernet 1/0/23 etherchannel Port state = Up Sngl-port-Bndl Mstr Not-in-Bndl Channel group = 10 Mode = Desirable-NonSl Gcchange = 0 Port-channel = null GC = 0x000A0001 Pseudo port-channel = Po10 Port index = 0 Load = 0x00 Protocol = PAgP Flags: S - Device is sending Slow hello. C - Device is in Consistent state. A - Device is in Auto mode. P - Device learns on physical port. d - PAgP is down. Timers: H - Hello timer is running. Q - Quit timer is running. S - Switching timer is running. I - Interface timer is running. Local information: Hello Partner PAgP Learning Group Port Flags State Timers Interval Count Priority Method Ifindex Gi1/0/23 U4/S4 H 30s 0 128 Any 10123 Age of the port in the current state: 00d:00h:03m:30s Switch#show etherchannel summary Flags: D - down P - in port-channel I - stand-alone s - suspended H - Hot-standby (LACP only)# R - Layer3 S - Layer2 U - in use f - failed to allocate aggregator u - unsuitable for bundling w - waiting to be aggregated d - default port
Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports |
[周年庆典活动专题]热烈庆祝IXPUB技术社区三周年生日快乐:风雨三年,我们与您共同成长
[周年庆典征文活动] ixpub三周年站庆征文活动--“我与IXPUB的故事”,期待PUBER们参加
[ITPUB国庆假期培训]升级版优质培训内容,助您提高职场竞争力,欢迎入内了解!
交换机链路聚合在网络中的作用
网络, 交换机, 聚合
链路聚合有成端口聚合,断口捆绑,英文名porttrunking.功能是将交换机的多个低带宽端口捆绑成一条高带宽链路,可以实现链路负载平衡。避免链路出现拥塞现象。通过配置,可通过两个三个或是四个端口进行捆绑,分别负责特定端口的数据转发,防止单条链路转发速率过低而出现丢包的现象。 Trunking的优点:价格便宜,性能接近千兆以太网;不需要重新布线,也无需考虑千兆 网传输距离极限问题;trunking可以捆绑任何相关的端口,也可以随时取消设置,这样提供了很高的灵活性还可以提供负载均衡能力以及系统容错。
命令:port-group <port-group-number> mode {active|passive|on}
no port-group <port-group-number>
功能:将物理端口加入Port Channel,该命令的no 操作为将端口从Port Channel 中去除
参数:<port-group-number> 为Port Channel 的组号,范围为1~16;active(0)启动端口的LACP 协议,并设置为Active 模式;passive(1) 启动端口的LACP 协议,并且设置为Passive模式;on(2) 强制端口加入Port Channel,不启动LACP 协议。
举例:在Ethernet0/0/1 端口模式下,将本端口以active 模式加入port-group
Switch(Config-Ethernet0/0/1)#port-group 1 mode active
命令:interface port-channel <port-channel-number>
功能:进入汇聚接口配置模式
命令模式:全局配置模式
举例:进入port-channel1 配置模式
Switch(Config)#interface port-channel 1
Switch(Config-If-Port-Channel1)#
举例1:如果交换机Switch1 上的1,2,3 端口都是access 口,并且都属于vlan 1,将这三个端口以active方式加入group 1,Switch2 上6,8,9 端口为trunk 口,并且是allow all,将这三个端口以passive方式加入group 2,将以上对应端口分别用网线相连。
方法1配置步骤如下:
Switch1#config
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#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 模式汇聚起来,各自形成一个汇聚端口。
总结 :
1;生成树,STP,主要作用是避免环路,网络中有冗余,经常使用多条链路就会产生环路,广播风暴,网络瘫痪,注意的是涉及网络时候千万不要忘记生成树的启动。如图3,比如说一般大企业中核心交换机于其他交换机都是两条网线连接,这样其中一条出现错误另一条可以工作,但是如果PC2和PC1通信这样就容易出现环路,产生广播风暴,,生成树可以解决这个问题。
2:链路聚合:它的主要作用就是增加网络带宽,一种是交换机之间,如图二比如说两台交换机设备,用一根百兆网线级联,由于访问两台太大就会产生屏蔽,速度变慢,这个时间就可以使用链路聚合,使用port-group命令,建立链路聚合,多用两条网线连接交换机,并把两台交换机连接的端口各自聚合在一起,能增加网络带宽。还有一种情况就是,如图一,交换机于服务器之间的链接,比如说一台服务器连接交换机上,如果访问量很大,那么服务器就会承受不了,就可以考虑多按两块网卡,使用链路聚合使两块网卡连接的端口聚合在一起,减轻服务器的负担。
1.jpg (20.05 KB)
下载次数:0
2007-10-10 20:28
2.jpg (21.71 KB)
下载次数:0
2007-10-10 20:28
本文来自: IXPUB技术社区( www.ixpub.net) 详细出处参考: http://www.ixpub.net/thread-697642-1-1.html
字号:大 中 小
链路聚合又称端口聚合,端口捆绑,英文名port trunking.功能是将交换机的多个低带宽端口捆绑成一条高带宽链路,可以实现链路负载平衡。避免链路出现拥塞现象。通过配置,可通过两个三个或是四个端口进行捆绑,分别负责特定端口的数据转发,防止单条链路转发速率过低而出现丢包的现象。
Trunking的优点:价格便宜,性能接近千兆以太网;不需要重新布线,也无需考虑千兆网传输距离极限问题;trunking可以捆绑任何相关的端口,也可以随时取消设置,这样提供了很高的灵活性还可以提供负载均衡能力以及系统容错。
命令:interface)#channel-group number mode {on | auto[no-silent] | desirable[no-silent] | active | passive}
功能:将物理端口加入Port Channel,该命令的no 操作为将端口从Port Channel 中去除
参数:<port-group-number> 为Port Channel 的组号;active是启动端口的LACP 协议,并设置为无条件打开;passive是启动端口的LACP 协议,并且设置为监测到LACP设备就打开LACP协议;on是只打开EthernetChannel ,desirable是启动端口的PAgP协议,并设置为无条件打开,auto是启动端口的PAgP 协议,并且设置为监测到PAgP设备就打开PAgP协议。
举例:在gigabitEthernet 2/5端口模式下,将本端口以active 模式加入channel-group
Switch(config)#channel-group 1 mode active
命令:interface port-channel <port-channel-number>
功能:进入汇聚接口配置模式
命令模式:全局配置模式
举例:进入port-channel1 配置模式
Switch(config)#interface port-channel 1
Switch(config-if)#
完整的配置:
Switch(config)#interface fastethernet 4/1
Switch(config-if)#channel-group 100 mode active
Switch(config-if)#interface fastethernet 4/2
Switch(config-if)#channel-group 100 mode active
Switch(config)#interface fastethernet 5/1
Switch(config-if)#channel-group 100 mode passive
Switch(config-if)#interface fastethernet 5/2
Switch(config-if)#channel-group 100 mode passive
绑定到一起的端口必须具有相同的属性如:速度 双工模式 vlan 干路模式 允许的vlan范围
Switch(config)#interface port-channel 1
Switch(config-if)#
port-channel必须与同端绑定的端口拥有相同的属性:速度 双工模式 vlan 干路模式 允许的vlan范围
Cisco WS-C2950G-48-EI测试通过
总结 :
1;
链路聚合控制协议
LACP
链路聚合控制协议(Link Aggregation Control Protocol)是IEEE 802.3ad标准的主要内容之一,定义了一种标准的聚合控制方式。聚合的双方设备通过协议交互聚合信息,根据双方的参数和状态,自动将匹配的链路聚合在一起收发数据。聚合形成后,交换设备维护聚合链路状态,当双方配置变化时,自动调整或解散聚合链路。
LACP协议报文中的聚合信息包括本设备的配置参数和聚合状态等,报文发送方式分为事件触发和周期发送。当聚合状态或配置变化事件发生时,本系统通过发送协议报文通知对端自身的变化。聚合链路稳定工作时,系统定时交换当前状态以维护链路。协议报文不携带序列号,因此双方不检测和重发丢失的协议报文。
需要指出的是,LACP协议并不等于链路聚合技术,而是IEEE802.3ad提供的一种链路聚合控制方式,具体实现中也可采用其它的聚合控制方式。
2;端口聚集协议PAgP
端口聚集协议(Port Aggregation Protocol)帮助在快速以太通道链接中联系自动生成。PAgP 分组为了商议一个通道的形成在快速以太通道可能的端口发送。属于Cisco专有。