链路聚合技术.docx

上传人:b****6 文档编号:6785056 上传时间:2023-01-10 格式:DOCX 页数:9 大小:219.53KB
下载 相关 举报
链路聚合技术.docx_第1页
第1页 / 共9页
链路聚合技术.docx_第2页
第2页 / 共9页
链路聚合技术.docx_第3页
第3页 / 共9页
链路聚合技术.docx_第4页
第4页 / 共9页
链路聚合技术.docx_第5页
第5页 / 共9页
点击查看更多>>
下载资源
资源描述

链路聚合技术.docx

《链路聚合技术.docx》由会员分享,可在线阅读,更多相关《链路聚合技术.docx(9页珍藏版)》请在冰豆网上搜索。

链路聚合技术.docx

链路聚合技术

 

链路聚合技术

一、链路聚合简介

1.链路聚合原理

将两个或更多数据信道结合成一个单个的信道,该信道以一个单个的更高带宽的逻辑链路出现。

链路聚合一般用来连接一个或多个带宽需求大的设备

2.作用

将多个物理以太网端口聚合在一起形成一个逻辑上的聚合组,使用链路聚合服务的上层实体把同一聚合组内的多条物理链路视为一条逻辑链路

3.LACP协议

LinkAggregationControlProtocol链路聚合控制协议

LACP协议通过LACPDU(LinkAggregationControlProtocolDataUnit,链路聚合控制协议数据单元)与对端交互信息。

使能某端口的LACP协议后,该端口将通过发送LACPDU向对端通告自己的系统

LACP协议优先级、系统MAC、端口的LACP协议优先级、端口号和操作Key。

端接收到LACPDU后,将其中的信息与其它端口所收到的信息进行比较,以选择能

够处于Selected状态的端口,从而双方可以对端口处于Selected状态达成一致。

操作Key是在链路聚合时,聚合控制根据端口的配置(即速率、双工模式、up/down

状态、基本配置等信息)自动生成的一个配置组合。

在聚合组中,处于Selected状

态的端口有相同的操作Key。

4.链路聚合的端口的注意事项

1端口均为全双工模式;

   2端口速率相同;

   3端口的类型必须一样,比如同为以太口或同为光纤口;

   4端口同为access端口并且属于同一个vlan或同为trunk端口;

   5如果端口为trunk端口,则其allowedvlan和nativevlan属性也应该相同。

5.链路聚合配置命令

1)CISCO

a)把指定端口给聚合组,并指定聚合方式

SW(config)interfaceEthernet0/1

SW(config-ethernet0/1)#port-group1mode(active|passive|on)

b)进入聚合端口的配置模式

SW(config)#interfaceport-channel1

进入该模式可以配置一些端口参数

c)名词解释

Port-channel组号:

范围是1-16

聚合模式

active(0)启动端口的LACP协议,并设置为Active模式;

passive

(1)启动端口的LACP协议,并且设置为Passive模式;

on

(2)强制端口加入PortChannel,不启动LACP协议。

2)H3C

手工聚合方式

a)创建手工聚合组1

link-aggregationgroup1modemanual

b)将端口加入聚合组

interfaceethernet0/1

portlink-aggregationgroup1

 

采用静态LACP聚合方式

a)设置系统的LACP协议优先级(可选)

Lacpsystem-prioritysystem-priority//缺省情况下是32768

b)创建静态LACP聚合组

link-aggregationgroup1modestatic

c)将端口加入聚合组

interfaceethernet0/1

portlink-aggregationgroup1

d)配置端口LACP的优先级(可选)

Lacpport-priorityport-priority//缺省情况下是32768

6.负载均衡

1)作用

自适应负载平衡

FastEtherChannel处理多个链路间的通信量负载平衡任务。

负载平衡在冗余并行路径间平均分配通信量。

如果任何一个链路失效,其他的链路将自动接管这个负载份额而不会中断。

2)配置命令

CISCO

SW[config]#port-channelload-balancemethod

——源地址   src-ip

——目的地址dst-ip

——源和目的 src-dst-ip

——源mac地址src-mac

——目的mac地址dst-mac

——源和目的macsrc-dst-mac

——源端口号src-port

——目的端口号dst-port

——源和目的端口号src-dst-port

H3C

link-aggregationload-sharingmode{{destination-ip|destination-port|ip-protocol|source-ip|source-port}

二、实验

Cisco私有的PAgP的链路聚合协议配置(PT模拟2层)

1.实验拓扑

说明:

默认情况下,交换机会使用STP协议阻塞其中某个端口,因为上面的网络存在环路。

使用PAgP链路聚合充分利用冗余的链路带宽

2.配置

Switch>en

Switch#conft

Switch(config)#hostnameSW0

SW0(config)#intrafa0/1-2

SW0(config-if-range)#nosh

SW0(config-if-range)#switchport

SW0(config-if-range)#channel-protocol

lacpPrepareinterfaceforLACPprotocol

pagpPrepareinterfaceforPAgPprotocol

SW0(config-if-range)#channel-protocolpagp

SW0(config-if-range)#channel-group

<1-48>Channelgroupnumber

SW0(config-if-range)#channel-group1mode

activeEnableLACPunconditionally

autoEnablePAgPonlyifaPAgPdeviceisdetected

desirableEnablePAgPunconditionally

onEnableEtherchannelonly

passiveEnableLACPonlyifaLACPdeviceisdetected

SW0(config-if-range)#channel-group1modedesirable//主动进入协商状态

Switch>en

Switch#conft

Switch(config)#hostnameSW1

SW1(config)#intrafa0/1-2

SW1(config-if-range)#nosh

SW1(config-if-range)#switchport

SW1(config-if-range)#channel-protocolpagp

SW1(config-if-range)#channel-group1modeauto//被动进入协商模式

Switch(config-if-range)#

%LINK-5-CHANGED:

InterfacePort-channel1,changedstatetoup

%LINEPROTO-5-UPDOWN:

LineprotocolonInterfacePort-channel1,changedstatetoup

Switch(config-if-range)#

3.验证

查看聚合组信息

SW0(config-if-range)#doshowetherchannelport-channel

Channel-grouplisting:

----------------------

Group:

1

----------

Port-channelsinthegroup:

---------------------------

Port-channel:

Po1

------------

AgeofthePort-channel=00d:

00h:

01m:

56s

Logicalslot/port=2/1Numberofports=2

GC=0x00000000HotStandByport=null

Portstate=Port-channel

Protocol=PAGP

PortSecurity=Disabled

PortsinthePort-channel:

IndexLoadPortECstateNoofbits

------+------+------+------------------+-----------

000Fa0/1Desirable-Sl0

000Fa0/2Desirable-Sl0

Timesincelastportbundled:

00d:

00h:

01m:

05sFa0/2

SW0(config-if-range)#

查看聚合链路的汇总信息

SW0(config-if-range)#doshowetherchannelsummary

Flags:

D-downP-inport-channel

I-stand-alones-suspended

H-Hot-standby(LACPonly)

R-Layer3S-Layer2//二层

U-inusef-failedtoallocateaggregator

u-unsuitableforbundling

w-waitingtobeaggregated

d-defaultport

 

Numberofchannel-groupsinuse:

1

Numberofaggregators:

1

GroupPort-channelProtocolPorts

------+-------------+-----------+----------------------------------------------

1Po1(SU)PAgPFa0/1(P)Fa0/2(P)

SW0(config-if-range)#

4.测试容错性

配置SW0和SW1的VLAN1的IP地址,测试聚合链路的容错

SW0(config-if-range)#intvlan1

SW0(config-if)#noshutdown

SW0(config-if)#ipadd192.168.1.1255.255.255.0

SW0(config-if)#

 

SW1(config-if-range)#intvlan1

SW1(config-if)#nosh

SW1(config-if)#ipadd192.168.1.2255.255.255.0

SW1(config-if)#

 

测试聚合端口的冗余容错特性

在SW0上向SW1持续发送ICMP数据包

SW0(config-if)#doping

Protocol[ip]:

ip

TargetIPaddress:

192.168.1.2

Repeatcount[5]:

10000

Datagramsize[100]:

100

Timeoutinseconds[2]:

2

Extendedcommands[n]:

n

Sweeprangeofsizes[n]:

n

Typeescapesequencetoabort.

Sending10000,100-byteICMPEchosto192.168.1.2,timeoutis2seconds:

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

然后在SW1上将聚合组中的fa0/2关掉,观察ping数据包是否中断

SW1(config)#intfa0/2

SW1(config-if)#nosh

SW1(config-if)#noshutdown

SW1(config-if)#sh

SW1(config-if)#shutdown

%LINK-5-CHANGED:

InterfaceFastEthernet0/2,changedstatetoadministrativelydown

%LINEPROTO-5-UPDOWN:

LineprotocolonInterfaceFastEthernet0/2,changedstatetodown

SW1(config-if)#

 

!

!

!

!

!

!

!

!

!

!

!

!

!

%LINK-5-CHANGED:

InterfaceFastEthernet0/2,changedstatetodown

%LINEPROTO-5-UPDOWN:

LineprotocolonInterfaceFastEthernet0/2,changedstatetodown

.........

Successrateis92percent(122/132),round-tripmin/avg/max=15/30/32ms

SW0(config-if)#

这个是PT模拟器的一个局限性,如果在真机上实验,两台设备之间的连通性是不会中断的。

备注:

如果是做三层的PAgP实验,那么在聚合组l的接口模式下,把聚合组改为三层端口,并给予IP。

EG:

SW0(config)#interfaceport-channel1

SW0(config-if)#noswitchport

SW0(config-if)#ipadd192.168.1.1255.255.255.0

SW0(config-if)#nosh

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 总结汇报

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1