文章出处:www.net1980.com

       Eth-Trunk接口是一种可以动态创建的接口,该类型接口可以绑定若干物理的以太网接口作为一个逻辑接口使用。加入到Eth-Trunk接口的以太网接口称为成员接口。用户只需对Eth-Trunk接口进行配置,对这些配置最终会映射到成员接口上。

       华为NE40系列通用交换路由器支持路由模式和交换模式的两种Eth-Trunk接口,支持两种模式接口之间的切换。路由模式的Eth-Trunk接口与路由模式的以太网接口类似,可以配置IP地址,运行各种路由协议、MPLS ×××等多种业务。交换模式的Eth-Trunk接口与交换模式的以太网接口类似,可以加入VLAN,运行STP等协议。Eth-Trunk接口的主要应用特点有拓展接口带宽,增加链路可靠性以及流量的负载分担。

 

       以下为大家介绍在华为NE40路由器上配置Eth-Trunk的方法:

 

步骤 1 配置NE40E
  <Quidway> system-view
  [Quidway] sysname NE40E
  创建Eth-Trunk接口,并配置IP地址。
  [NE40E] interface eth-trunk 1
  [NE40E-Eth-Trunk1] ip address 192.1.1.1 24
  [NE40E-Eth-Trunk1] quit
      华为路由器NE40E、NE80E的Eth-trunk默认情况下是路由模式的,如果要绑定VLAN,Eth-Trunk接口需要从三层模式切换到二层模式。可以通过命令将模式更改为交换模式。
  [NE40E] interface eth-trunk 1
  [NE40E-Eth-Trunk1]portswitch
       执行命令portswitch,将Eth-Trunk接口从三层模式切换到二层模式。切换到二层模式时,Eth-Trunk的三层功能和标识被禁止,采用SRU板(主控板)上Meth0接口的MAC地址。执行undo portswitch命令可以将Eth-Trunk接口从二层模式切换回三层模式。
将端口GE1/0/0、GE2/0/0加入到Eth-Trunk 1中。
  [NE40E] interface gigabitethernet 1/0/0
  [NE40E-GigabitEthernet1/0/0] eth-trunk 1
  [NE40E-GigabitEthernet1/0/0] quit
  [NE40E] interface gigabitethernet 2/0/0
  [NE40E-GigabitEthernet2/0/0] eth-trunk 1
  [NE40E-GigabitEthernet2/0/0] quit

 

步骤 2 检查配置结果

在NE40E上执行display interface eth-trunk命令,可以看到接口状态为UP。
[NE40E] 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-fc0e-a421
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
Hash arithmetic : According to MAC

当路由器工作在交换模式的时候使用根据MAC地址进行散列
Hash arithmatic : According to IP
当路由器工作在路由模式的时候使用根据IP地址进行散列
[NE40E] 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 = 1
operate status: up
Interface GigabitEthernet1/0/0, valid, selected,operate up,weight=1,
standby interface NULL
Interface GigabitEthernet2/0/0, valid, selected,operate down,weight=1,
standby interface NULL

原文链接:http://www.net1980.com/2010/09/28/eth-trunk/