当前位置:文档之家› 链路聚合ET-TRUNK配置实例

链路聚合ET-TRUNK配置实例

路由器配置实例路由器可以对多个以太网接口捆绑形成一个Eth-Trunk逻辑接口,Eth-Trunk接口的主要目的是增大带宽和提高设备之间链路的可靠性。

Eth-Trunk接口可以工作在二层模式或三层模式。

二层模式的Eth-Trunk接口类似交互机的接口,只负责二层数据包的转发;三层模式的Eth-Trunk 接口则类似路由器的接口,可以配上IP地址实现路由功能。

本文为大家介绍如何在华为的路由器里配置二层和三层Eth-Trunk接口。

一、二层Eth-Trunk接口配置实例1、组网结构和需求如下图所示,RouterA和RouterB之间通过Eth-Trunk1连接,Eth-Trunk1是二层端口。

将Eth-Trunk1配置为Trunk类型接口,允许RouterA和RouterB之间的所有VLAN帧通过。

2、配置思路采用如下的思路配置二层Eth-Trunk端口允许VLAN通过:1)创建Eth-Trunk接口。

2)将Eth-Trunk接口转为二层端口。

3)将Eth-Trunk端口配置为Trunk类型的端口,并允许所有VLAN帧通过。

4)将成员口接入Eth-Trunk端口中。

3、配置步骤1)配置RouterA# 创建Eth-Trunk接口,并配置允许通过的VLAN。

[RouterA] interface eth-trunk 1[RouterA-Eth-Trunk1] portswitch[RouterA-Eth-Trunk1] port link-type trunk[RouterA-Eth-Trunk1] port trunk allow-pass vlan all[RouterA-Eth-Trunk1] quit# 将接口GE1/0/0、GE2/0/0加入到Eth-Trunk 1中。

[RouterA] interface gigabitethernet 1/0/0[RouterA-GigabitEthernet1/0/0] undo shutdown[RouterA-GigabitEthernet1/0/0] eth-trunk 1[RouterA-GigabitEthernet1/0/0] quit[RouterA] interface gigabitethernet 2/0/0[RouterA-GigabitEthernet2/0/0] undo shutdown[RouterA-GigabitEthernet2/0/0] eth-trunk 1[RouterA-GigabitEthernet2/0/0] quit2)配置RouterB# 创建Eth-Trunk接口,并配置允许通过的VLAN。

[RouterB] interface eth-trunk 1[RouterB-Eth-Trunk1] portswitch[RouterB-Eth-Trunk1] port link-type trunk[RouterB-Eth-Trunk1] port trunk allow-pass vlan all[RouterB-Eth-Trunk1] quit# 将接口GE1/0/0、GE2/0/0加入到Eth-Trunk 1中。

[RouterB] interface gigabitethernet 1/0/0[RouterB-GigabitEthernet1/0/0] undo shutdown[RouterB-GigabitEthernet1/0/0] eth-trunk 1[RouterB-GigabitEthernet1/0/0] quit[RouterB] interface gigabitethernet 2/0/0[RouterB-GigabitEthernet2/0/0] undo shutdown[RouterB-GigabitEthernet2/0/0] eth-trunk 1[RouterB-GigabitEthernet2/0/0] quit4、验证配置结果查看Eth-Trunk1的状态,以RouterA为例:<RouterA> display trunkmembership eth-trunk 1Trunk ID: 1used status: VALIDTYPE: ethernetWorking Mode : NormalWorking State: NormalNumber Of Ports in Trunk = 2Number Of UP Ports in Trunk = 2operate status: upInterface Ethernet1/0/0, valid, selected, operate up, weight=1,standby interface NULLInterface Ethernet2/0/0, valid, selected, operate up, weight=1,standby interface NULL用display port vlan命令查看Eth-Trunk端口上可以通过的VLAN信息。

以RouterA为例:<RouterA> display port vlan Eth-Trunk 1Port Link Type PVID Trunk VLAN List-------------------------------------------------------------------------------Eth-Trunk1 trunk 0 1-40945、配置文件1)RouterA的配置文件#sysname RouterA#interface Eth-Trunk1portswitchport link-type trunkport trunk allow-pass vlan 1 to 4094#interface GigabitEthernet1/0/0undo shutdowneth-trunk 1#interface GigabitEthernet2/0/0undo shutdowneth-trunk 1#return2)RouterB的配置文件#sysname RouterB#interface Eth-Trunk1portswitchport link-type trunkport trunk allow-pass vlan 1 to 4094#interface GigabitEthernet1/0/0undo shutdowneth-trunk 1#interface GigabitEthernet2/0/0undo shutdowneth-trunk 1#return二、三层Eth-Trunk接口配置实例1、组网结构和需求如下图所示,在RouterA与RouterB之间创建Eth-Trunk,将两个GE捆绑成一个Eth-Trunk,并在Eth-Trunk接口配上IP地址。

2、配置思路采用如下的思路配置Eth-Trunk:1)创建Eth-Trunk接口并配置IP地址。

2)把以太网接口加入Eth-Trunk接口。

3、配置步骤1)配置RouterA# 创建Eth-Trunk接口,并配置IP地址。

[RouterA] interface eth-trunk 1[RouterA-Eth-Trunk1] ip address 192.168.0.1 255.255.255.0[RouterA-Eth-Trunk1] quit# 将接口GE1/0/0、GE2/0/0加入到Eth-Trunk 1中。

[RouterA] interface gigabitethernet 1/0/0[RouterA-GigabitEthernet1/0/0] undo shutdown[RouterA-GigabitEthernet1/0/0] eth-trunk 1[RouterA-GigabitEthernet1/0/0] quit[RouterA] interface gigabitethernet 2/0/0[RouterA-GigabitEthernet2/0/0] undo shutdown[RouterA-GigabitEthernet2/0/0] eth-trunk 1[RouterA-GigabitEthernet2/0/0] quit2)配置RouterB# 创建Eth-Trunk接口,并配置IP地址。

[RouterB] interface eth-trunk 1[RouterB-Eth-Trunk1] ip address 192.168.0.2 255.255.255.0[RouterB-Eth-Trunk1] quit# 将接口GE1/0/0、GE2/0/0加入到Eth-Trunk 1中。

[RouterB] interface gigabitethernet 1/0/0[RouterB-GigabitEthernet1/0/0] undo shutdown[RouterB-GigabitEthernet1/0/0] eth-trunk 1[RouterB-GigabitEthernet1/0/0] quit[RouterB] interface gigabitethernet 2/0/0[RouterB-GigabitEthernet2/0/0] undo shutdown[RouterB-GigabitEthernet2/0/0] eth-trunk 1[RouterB-GigabitEthernet2/0/0] quit4、检查配置结果在RouterA或RouterB上执行display interface eth-trunk命令,可以看到接口状态为UP。

以RouterA的显示为例。

[RouterA] display interface eth-trunk 1Eth-Trunk1 current state : UPLine protocol current state : UPLast up time: 2011-01-13, 14:50:20Description : HUAWEI, Quidway Series, Eth-Trunk1 Interface, Route PortHash arithmatic : According to flowThe Maximum Transmit Unit is 1500 bytesInternet Address is 192.168.0.1/24IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc09-9722 Physical is ETH_TRUNKLast 300 seconds input rate 0 bytes/sec, 0 packets/secLast 300 seconds output rate 0 bytes/sec, 0 packets/secInput: 1 packets,3 bytes,7 unicast,9 broadcast,8 multicasts10 errors,5 drops,11 unknowprotocolOutput: 2 packets,4 bytes,12 unicast,14 broadcast,13x multicasts15 errors,6 drops-----------------------------------------------------PortName Status Weight-----------------------------------------------------GigabitEthernet1/0/0 UP 1GigabitEthernet2/0/0 UP 1-----------------------------------------------------The Number of Ports in Trunk : 2The Number of UP Ports in Trunk : 2RouterA和RouterB的Eth-Trunk接口能够互相Ping通。

相关主题