端口链路聚合技术

链路层劫持  时间:2021-01-28  阅读:()

Giveiteverythingyou've got

一、 链路聚合简介

1.链路聚合原理

将两个或更多数据信道结合成一个单个的信道,该信道以一个单个的更高带宽的逻辑链路出现。链路聚合一般用来连接一个或多个带宽需求大的设备

2.作用

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

3.LACP协议

Link Aggregation Control Protocol链路聚合控制协议

LACP协议通过LACPDU Link Aggregation Control Protocol Data Unit链路聚合控制协议数据单元与对端交互信息。

使能某端口的LAC P协议后该端口将通过发送LAC PD U向对端通告自己的系统LACP协议优先级、系统MAC、端口的LACP协议优先级、端口号和操作Key。对端接收到LACPDU后将其中的信息与其它端口所收到的信息进行比较以选择能够处于S elected状态的端口从而双方可以对端口处于Selected状态达成一致。操作Key是在链路聚合时聚合控制根据端口的配置即速率、双工模式、 up/down状态、基本配置等信息 自动生成的一个配置组合。在聚合组中处于S elected状态的端口有相同的操作Key。

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

1端口均为全双工模式

Giveiteverythingyou've got

2端口速率相同

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

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

5如果端口为trunk端口则其allowe d vlan和nativ evlan属性也应该相同。

5.链路聚合配置命令

1) CISCOa) 把指定端口给聚合组并指定聚合方式

SWconfig interface Ethernet0/1

SWconfig-ethernet0/1 #port-group 1 mode active|passive|onb) 进入聚合端口的配置模式

SWconfig #interface port-channel 1

进入该模式可以配置一些端口参数c) 名词解释

Port-channel组号范围是1-16

聚合模式ac tive 0 启动端口的LACP协议并设置为Active模式pas sive 1 启动端口的LACP协议并且设置为Pas sive模式on 2 强制端口加入Port Channel不启动LACP协议。

Giveiteverythingyou've got

2)H3C

手工聚合方式a) 创建手工聚合组1link-aggregation group 1 mode manualb) 将端口加入聚合组interface ethernet0/1port link-aggregation group 1

采用静态LACP聚合方式a) 设置系统的LACP协议优先级可选

Lacp system-priority system-priority //缺省情况下是32768b) 创建静态LAC P聚合组link-aggregation group 1 mode staticc) 将端口加入聚合组interface ethernet0/1port link-aggregation group 1d) 配置端口LAC P的优先级可选

Lacp port-priority port-priority //缺省情况下是32768

Giveiteverythingyou've got

6.负载均衡

1)作用

自适应负载平衡

Fast EtherChannel处理多个链路间的通信量负载平衡任务。 负载平衡在冗余并行路径间平均分配通信量。如果任何一个链路失效,其他的链路将自动接管这个负载份额而不会中断。

2)配置命令

CISCO

SW[config]#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

H3Clink-aggregation load-sharing mode { { destination-ip | destination-port | ip-protocol |source-ip | source-port }

Giveiteverythingyou've got

二、 实验

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

1.实验拓扑

说明

默认情况下交换机会使用STP协议阻塞其中某个端口因为上面的网络存在环路。使用PAgP链路聚合充分利用冗余的链路带宽

2.配置

S witc h>en

Switch#conf t

Switch(config)#hostname SW0

SW0(config)#intra fa0/1 -2

SW0(config-if-range)#no sh

SW0(c onfig-if-range)#switchport

SW0(config-if-range)#channel-protocol ?lacp Prepare interface for LACP protocolpagp Prepare interface for PAgP protocol

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

SW0(c onfig-if-range)#channel-group?

Giveiteverythingyou've got

<1-48> Channel group number

SW0(config-if-range)#channel-group 1 mode ?active Enable LACP unconditionallyauto Enable PAgP only if a PAgP device is detecteddesirable Enable PAgP unconditionallyon Enable Etherchannel onlypassive Enable LACP only if a LACP device is detected

SW0(config-if-range)#channel-group 1 mode desirable //主动进入协商状态S witc h>en

Switch#conf t

Switch(config)#hostname SW1

SW1 (config)#intra fa 0/1-2

SW1 (config-if-range)#no sh

SW1 (c onfig-if-range)#switchport

SW1 (config-if-range)#channel-protocol pagp

SW1 (config-if-range)#channel-group 1 mode auto //被动进入协商模式

Switch(config-if-r ange)#

%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN:Line protocol on Interface Port-channel 1,changed state toup

Switch(config-if-r ange)#

3.验证

查看聚合组信息

Giveiteverythingyou've got

SW0(config-if-range)#do show etherchannel port-channel

Channel-group listing:

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

Group: 1

----------

Port-channels in the group:

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

Port-channel:Po1

Age of the Port-channel =00d:00h:01m:56s

Logical slot/port =2/1 Number of ports=2

GC =0x00000000 HotStandByport=nullPort state =Port-channel

Protocol = PAGP

Port Security =Disabled

Ports in the Port-channel:

Index Load Port EC state Noof bits

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

0 00 Fa0/1 Desirable-Sl 0

0 00 Fa0/2 Desirable-Sl 0

Time since lastport bundled: 00d:00h:01m:05s Fa0/2

SW0(config-if-range)#

查看聚合链路的汇总信息

Giveiteverythingyou've got

SW0(config-if-range)#do 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 aggregatoru-unsuitable for bundlingw-waiting to be aggregatedd-default port

Number of channel-groups in use: 1

Number of aggregators: 1

Group Port-channel Protocol Ports

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

1 Po1(SU) PAgP Fa0/1(P)Fa0/2(P)SW0(config-if-range)#

4.测试容错性

配置SW0和SW1的VLAN 1 的IP地址测试聚合链路的容错SW0(config-if-range)#int vlan 1

SW0(config-if)#no shutdown

SW0(config-if)#ip add 192.168.1.1 255.255.255.0

SW0(c onfig-if)#

Giveiteverythingyou've got

SW1 (config-if-range)#int vlan 1

SW1 (config-if)#no sh

SW1 (config-if)#ip add 192.168.1.2255.255.255.0

SW1 (config-if)#

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

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

SW0(config-if)#do ping

Protocol [ip] : ip

Target IP address: 192.168.1.2

Repeat count [5] : 10000

D atagram size [100] : 100

Timeout in seconds [2]:2

Extended commands [n] :n

Sweep range of sizes [n] :n

Type escape sequence to abort.

Sending10000, 100-byte ICMP Echos to 192.168.1.2, timeoutis 2 seconds:! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

然后在SW1上将聚合组中的fa 0/2关掉观察ping数据包是否中断SW1 (config)#intfa 0/2

SW1 (config-if)#no sh

SW1 (config-if)#no shutdown

SW1 (c onfig-if)#sh

S W1 (c onfig-if)#shutd own

%LINK-5-CHAN GED: Interface FastEthernet0/2, changed state to administrativelydown

数脉科技:六月优惠促销,免备案香港物理服务器,E3-1230v2处理器16G内存,350元/月

数脉科技六月优惠促销发布了!数脉科技对香港自营机房的香港服务器进行超低价促销,可选择30M、50M、100Mbps的优质bgp网络。更大带宽可在选购时选择同样享受优惠,目前仅提供HKBGP、阿里云产品,香港CN2、产品优惠码续费有效,仅限新购,每个客户可使用于一个订单。新客户可以立减400元,或者选择对应的机器用相应的优惠码,有需要的朋友可以尝试一下。点击进入:数脉科技官方网站地址数脉科技是一家成...

Webhosting24:€15/年-AMD Ryzen/512MB/10GB/2TB/纽约&日本&新加坡等机房

Webhosting24是一家始于2001年的意大利商家,提供的产品包括虚拟主机、VPS、独立服务器等,可选数机房包括美国洛杉矶、迈阿密、纽约、德国慕尼黑、日本、新加坡、澳大利亚悉尼等。商家VPS主机采用AMD Ryzen 9 5950X CPU,NVMe磁盘,基于KVM架构,德国机房不限制流量,网站采用欧元计费,最低年付15欧元起。这里以美国机房为例,分享几款套餐配置信息。CPU:1core内存...

DiyVM:2G内存/50G硬盘/元起线路香港vps带宽CN2线路,香港VPS五折月付50元起

DiyVM是一家低调国人VPS主机商,成立于2009年,提供的产品包括VPS主机和独立服务器租用等,数据中心包括香港沙田、美国洛杉矶、日本大阪等,VPS主机基于XEN架构,均为国内直连线路,主机支持异地备份与自定义镜像,可提供内网IP。最近,商家对香港机房VPS提供5折优惠码,最低2GB内存起优惠后仅需50元/月。下面就以香港机房为例,分享几款VPS主机配置信息。CPU:2cores内存:2GB硬...

链路层劫持为你推荐
浏览器哪个好目前什么浏览器最好用?涡轮增压和自然吸气哪个好涡轮增压和自然吸气哪个好燃气热水器和电热水器哪个好电热水器和燃气热水器的优缺点,那个更实用?燃气热水器和电热水器哪个好电热水器和燃气热水器哪一个更安全,且更节省能源?游戏盒子哪个好请问游戏盒子哪个好啊手机炒股软件哪个好手机炒股软件电动牙刷哪个好电动牙刷哪个牌子好?准备就买个几百块钱的?行车记录仪哪个好行车记录仪什么牌子好51空间登录51空间,怎么添加啊?怎么登陆?qq空间登录电脑手机上怎么登陆电脑版QQ空间
vps优惠码cnyvps n点虚拟主机管理系统 中国域名交易中心 awardspace ion 美国主机论坛 谷歌香港 网站保姆 免费网站申请 全站静态化 太原联通测速平台 柚子舍官网 七夕快乐英文 双11秒杀 1g内存 息壤代理 免费cdn linode支付宝 中国电信网络测速 监控服务器 更多