路由器可以对多个以太网接口捆绑形成一个Eth-Trunk逻辑接口,Eth-Trunk接口的主要目的是增大带宽和提高设备之间链路的可靠性。Eth-Trunk接口可以工作在二层模式或三层模式。二层模式的Eth-Trunk接口类似交互机的接口,只负责二层数据包的转发;三层模式的Eth-Trunk接口则类似路由器的接口,可以配上IP地址实现路由功能。本文为大家介绍如何在华为的路由器里配置二层和三层Eth-Trunk接口。
The router can bind multiple Eth-Trunk interfaces to form an Eth-Trunk logical interface, and the Eth-Trunk interface is designed primarily to increase bandwidth and improve reliability of the connection between devices. The Eth-Trunk interface can work in two or three layers. The Eth-Trunk interface in two-storey mode is similar to the interface of the interactive and is responsible only for forwarding the two-storey data packages; the Eth-Trunk interface in three-storey mode is similar to that of the router, which can be used with an IP address to achieve router functionality. This paper describes how the two-storey and three-storey Eth-Trunk interfaces can be configured.
一、二层Eth-Trunk接口配置实例
An example of the configuration of the Eth-Trunk interface on the first and second floors of
1、组网结构和需求
1. Cluster network structure and requirements
如下图所示,RouterA和RouterB之间通过Eth-Trunk1连接,Eth-Trunk1是二层端口。将Eth-Trunk1配置为Trunk类型接口,允许RouterA和RouterB之间的所有VLAN帧通过。
& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; as shown in the figure below, the connection between RouterA and RouterB via Eth-Trunk1 and Eth-Trunk1 is a second-tier port. Configure Eth-Trunk1 to the Trunk type interface, allowing all VLAN frames between RouterA and RouterB to pass.
& nbsp; & nbsp; & nbsp;
2、配置思路
2. Configuration thinking
采用如下的思路配置二层Eth-Trunk端口允许VLAN通过:
Configure the second Eth-Trunk port to allow VLAN to pass using the following lines:
1)创建Eth-Trunk接口。
1) Creates the Eth-Trunk interface.
2)将Eth-Trunk接口转为二层端口。
2) Convert the Eth-Trunk interface to a second-tier port.
3)将Eth-Trunk端口配置为Trunk类型的端口,并允许所有VLAN帧通过。
3) Configure the Eth-Trunk port to the Trunk type port and allow all VLAN frames to pass.
4)将成员口接入Eth-Trunk端口中。
4) connect the member port to the Eth-Trunk port.
3、配置步骤
3. Configuration steps
1)配置RouterA
1) Configure RouterA
# 创建Eth-Trunk接口,并配置允许通过的VLAN。
# Create the Eth-Trunk interface and configure the permissible 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中。
# Add interface GE1/0/0, GEO2/0/0 to 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] quit
2)配置RouterB
2) Configure RouterB
# 创建Eth-Trunk接口,并配置允许通过的VLAN。
# Create the Eth-Trunk interface and configure the permissible 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中。
# Add interface GE1/0/0, GEO2/0/0 to 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] quit
4、验证配置结果
4. Validation configuration results
查看Eth-Trunk1的状态,以RouterA为例:
View the state of Eth-Trunk1, for example, RouterA:
<RouterA> display trunkmembership eth-trunk 1
Trunk ID: 1
used status: VALID
TYPE: ethernet
Working Mode : Normal
Working State: Normal
Number Of Ports in Trunk=2
Number Of UP Ports in Trunk=2
operate status: up
Interface Ethernet1/0/0, valid, selected, operate up, weight=1,
standby interface NULL
Interface Ethernet2/0/0, valid, selected, operate up, weight=1,
standby interface NULL
用display port vlan命令查看Eth-Trunk端口上可以通过的VLAN信息。以RouterA为例:
Check the VLAN information available on the Eth-Trunk port with a display port vlan command.
<RouterA> display port vlan Eth-Trunk 1
Port Link Type PVID Trunk VLAN List
-------------------------------------------------------------------------------
Eth-Trunk1 trunk 0 1-4094
5、配置文件
5. Profile
1)RouterA的配置文件
1) Profile for RouterA
#
sysname RouterA
#
interface Eth-Trunk1
portswitch
port link-type trunk
port trunk allow-pass vlan 1 to 4094
#
interface GigabitEthernet1/0/0
undo shutdown
eth-trunk 1
#
interface GigabitEthernet2/0/0
undo shutdown
eth-trunk 1
#
return
2)RouterB的配置文件
2) profile for RouterB
#
sysname RouterB
#
interface Eth-Trunk1
portswitch
port link-type trunk
port trunk allow-pass vlan 1 to 4094
#
interface GigabitEthernet1/0/0
undo shutdown
eth-trunk 1
#
interface GigabitEthernet2/0/0
undo shutdown
eth-trunk 1
#
return
二、三层Eth-Trunk接口配置实例
An example of the configuration of the Eth-Trunk interface on the second and third floors of
1、组网结构和需求
1. Cluster network structure and requirements
如下图所示,在RouterA与RouterB之间创建Eth-Trunk,将两个GE捆绑成一个Eth-Trunk,并在Eth-Trunk接口配上IP地址。
& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & & nbsp
发表评论