应用环境
为了增加路由器RouterA与RouterB之间的通信带宽,并保证通信链路的可靠性,需要在两台路由器之间创建Eth-Trunk,将多个GE或FE接口捆绑成一个Eth-Trunk。当Eth-Trunk中的某个成员端口出现故障时,整个Eth-Trunk链路业务不会中断,从而保证链路可靠性。
如果要求Eth-Trunk的成员链路之间进行负载分担,可以配置成员链路负载分担的权重。Eth-Trunk接口根据各成员链路的权重进行散列,实施负载分担。在一个Eth-Trunk接口中,某成员端口的权重值占所有成员端口权重之和的比例越大,该成员链路承担的负载就越大。
配置思路
在配置Eth-Trunk时,采用如下配置思路:
1. 创建Eth-Trunk接口。
2. 将以太网端口加入到Eth-Trunk接口。
3. 可以根据实际需要,配置成员端口的权重等可选配置。
配置注意事项
创建Eth-Trunk接口的时候,需要注意以下问题:
成员端口不能配置自协商属性,不能配置永久或静态MAC地址。
以太网接口加入Eth-Trunk接口前,不能配置任何业务。
只有三层接口才能加入到Eth-Trunk。对于二层以太网端口,需要先执行undo portswitch命令转换为三层端口,才能加入到Eth-Trunk中。
一个以太网接口只能加入到一个Eth-Trunk接口,如果需要加入其他Eth-Trunk接口,必须先退出原来的Eth-Trunk接口。
Eth-Trunk接口不能嵌套,即,成员端口不能是Eth-Trunk或IP-Trunk。
可以将不同接口板上的以太网接口加入到同一个Eth-Trunk。
可以将千兆以太网接口和快速以太网接口加入到同一个Eth-Trunk。但此时每个接口的转发能力,只能达到能力最低的接口的水平。例如,将一个1G的千兆以太网接口和一个100M的快速以太网接口加入到一个Eth-Trunk中,那么此时1G的千兆以太网接口只能达到100M的传输能力,而整个Trunk的传输能力为200M。所以建议用户不要将转发能力不同的接口捆绑到同一个Eth-Trunk中。
Eth-Trunk有两种工作模式:二层工作模式和三层工作模式。Eth-Trunk的工作模式不影响成员端口的加入。例如,以太网端口既可以加入二层模式的Eth-Trunk,也可以加入三层模式的Eth-Trunk。
如果本地设备使用了Eth-Trunk,与成员端口直连的对端端口也必须相应的捆绑为Eth-Trunk接口。
配置实例
组网需求
两台路由器直连。每台路由器上的Eth-Trunk接口都是由两个GigabitEthernet接口组成。
Eth-Trunk组网图
适用产品和版本
路由器采用NE5000E/80E/40E设备,版本为(VRP5.30-22)及后续版本。
数据准备
RouterA侧的Eth-Trunk使用IP地址100.1.1.1/24,RouterB侧的Eth-Trunk使用IP地址100.1.1.2/24。
RouterA中GE1/0/0的负载分担权重为4,GE2/0/0的负载分担权重为12。即Eth-Trunk中有4/16的流量通过GE1/0/0传输,12/16的流量通过GE2/0/0传输。
配置步骤
步骤 1 配置RouterA
<Quidway> system-view
[Quidway] sysname RouterA
# 创建Eth-Trunk接口,并配置IP地址。
[RouterA] interface eth-trunk 1
[RouterA-Eth-Trunk1] ip address 100.1.1.1 24
[RouterA-Eth-Trunk1] quit
# 将端口GE1/0/0、GE2/0/0加入到Eth-Trunk 1中,并分别配置成员端口的负载分担权重。
[RouterA] interface gigabitethernet 1/0/0
[RouterA-GigabitEthernet1/0/0] eth-trunk 1
[RouterA-GigabitEthernet1/0/0] distribute-weight 4
[RouterA-GigabitEthernet1/0/0] quit
[RouterA] interface gigabitethernet 2/0/0
[RouterA-GigabitEthernet2/0/0] eth-trunk 1
[RouterA-GigabitEthernet1/0/0] distribute-weight 12
[RouterA-GigabitEthernet2/0/0] quit
# 启用Eth-Trunk 1接口
[RouterA] interface eth-trunk 1
[RouterA-Eth-Trunk1] undo shutdown
步骤 2 配置RouterB
<Quidway> system-view
[Quidway] sysname RouterB
# 创建Eth-Trunk接口,并配置IP地址。
[RouterB] interface eth-trunk 1
[RouterB-Eth-Trunk1] ip address 100.1.1.2 24
[RouterB-Eth-Trunk1] quit
# 将端口GE1/0/0、GE2/0/0加入到Eth-Trunk 1中。
[RouterB] interface gigabitethernet 1/0/0
[RouterB-GigabitEthernet1/0/0] eth-trunk 1
[RouterB-GigabitEthernet1/0/0] quit
[RouterB] interface gigabitethernet 2/0/0
[RouterB-GigabitEthernet2/0/0] eth-trunk 1
[RouterB-GigabitEthernet2/0/0] quit
# 启用Eth-Trunk 1接口
[RouterB] interface eth-trunk 1
[RouterB-Eth-Trunk1] undo shutdown
验证结果
在RouterA或RouterB上执行display interface eth-trunk命令,可以看到接口状态为UP。
以RouterA的显示为例。
[RouterA] display interface Eth-Trunk 1
Eth-Trunk1 current state : UP
Line protocol current state : UP
Description : HUAWEI, Quidway Series, Eth-Trunk1 Interface, Route Port
Hash arithmatic : According to IP
The Maximum Transmit Unit is 1500 bytes
Internet Address is 100.1.1.1/24
IP Sending Frames’ Format is PKTFMT_ETHNT_2, Hardware address is 00e0-8509-9722
Physical is ETH_TRUNK
5 minutes input rate 0 bytes/sec, 0 packets/sec
5 minutes output rate 0 bytes/sec, 0 packets/sec
0 packets input, 0 bytes, 0 drops
0 packets output, 0 bytes, 0 drops
执行display trunkmembership eth-trunk命令,查看Trunk口的成员端口信息。
[RouterA] display trunkmembership eth-trunk 1
Trunk ID: 1
used status: VALID
TYPE: ethernet
Number Of Ports in Trunk = 2
Number Of UP Ports in Trunk = 2
operate status: up
ip status: not configed
link status: up
Interface GIgabitEthernet1/0/0, valid,selected,operate up,weight=4,standby interface NULL
Interface GigabitEthernet2/0/0, valid,selected,operate up,weight=12,standby interface NULL
RouterA和RouterB的Eth-Trunk接口能够互相Ping通。
[RouterA] ping -a 100.1.1.1 100.1.1.2
PING 100.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 100.1.1.2: bytes=56 Sequence=1 ttl=255 time=31 ms
Reply from 100.1.1.2: bytes=56 Sequence=2 ttl=255 time=31 ms
Reply from 100.1.1.2: bytes=56 Sequence=3 ttl=255 time=62 ms
Reply from 100.1.1.2: bytes=56 Sequence=4 ttl=255 time=62 ms
Reply from 100.1.1.2: bytes=56 Sequence=5 ttl=255 time=62 ms
--- 100.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 31/49/62 ms
配置文件
RouterA的配置文件
#
sysname RouterA
#
interface Eth-Trunk1
ip address 100.1.1.1 255.255.255.0
#
interface GigabitEthernet1/0/0
eth-trunk 1
distribute-weight 4
#
interface GigabitEthernet2/0/0
eth-trunk 1
distribute-weight 12
#
return
RouterB的配置文件
#
sysname RouterB
#
interface Eth-Trunk1
ip address 100.1.1.2 255.255.255.0
#
interface GigabitEthernet1/0/0
eth-trunk 1
#
interface GigabitEthernet2/0/0
eth-trunk 1
#
return
|
|
||
|
|
||
|
|
7月26 |
H3CNE认证 |
热报中 |
8月16 |
H3C-IMC认证 |
热报中 |
7月26 |
H3CNE认证 |
热报中 |
7月26 |
H3CIE+认证 |
热报中 |
8月16 |
H3C-IMC认证 |
热报中 |
7月26 |
H3CNE培训 |
热报中 |
7月26 |
H3CSE认证 |
热报中 |
8月16 |
H3C无线 |
热报中 |
7月26 |
H3CSE培训 |
热报中 |
8月16 |
H3CIMC培训 |
热报中 |
8月16 |
H3C无线培训 |
热报中 |
8月31 |
H3CEAD培训 |
热报中 |
8月16 |
H3CPME认证 |
热报中 |
8月16 |
H3C安全认证 |
热报中 |
8月16 |
H3CIMC培训 |
热报中 |
8月16 |
H3C无线培训 |
热报中 |
8月09 |
H3CEAD培训 |
热报中 |
8月16 |
H3CPME认证 |
热报中 |
8月16 |
H3C安全认证 |
热报中 |
8月16 |
H3CIMC培训 |
热报中 |
8月09 |
H3C无线培训 |
热报中 |
8月09 |
H3CEAD培训 |
热报中 |
8月09 |
H3CPME认证 |
热报中 |
8月09 |
H3C安全认证 |
热报中 |