HCNA数通-E-Trunk配置实例教程

如图所示,E-Trunk应用于CE接入网络时,在CE与双PE间实现链路保护。CE分别通过一条LACP模式的Eth-Trunk与PE1、PE2相连。这两个Eth-Trunk构成一个E-Trunk,在PE1与PE2之间实现链路聚合组的备份,提高网络可靠性。

具体实例设计如下图

具体配置:

dis cu#sysname ce1#vlan batch 3 to 5#interface Vlanif4#interface Vlanif5 ip address 10.1.3.254 255.255.255.0#interface MEth0/0/1#interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 2 to 4094 mode lacp-static#interface GigabitEthernet0/0/3 eth-trunk 1#interface GigabitEthernet0/0/4 eth-trunk 1#interface GigabitEthernet0/0/5#interface GigabitEthernet0/0/19 eth-trunk 1#interface GigabitEthernet0/0/20 eth-trunk 1#interface NULL0#ospf 1 area 0.0.0.0 network 10.1.3.0 0.0.0.255#return

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

[pe1]dis cu#sysname pe1#vlan batch 2 5#lacp e-trunk system-id 0001-0001-0001lacp e-trunk priority 1 #interface Vlanif1#interface Vlanif2 ip address 10.1.1.254 255.255.255.0#interface Vlanif5 ip address 10.1.3.253 255.255.255.0#interface MEth0/0/1#e-trunk 1 priority 1 peer-address 2.2.2.2 source-address 1.1.1.1#interface Eth-Trunk1 shutdown port link-type trunk port trunk allow-pass vlan 2 to 4094 mode lacp-static#interface GigabitEthernet0/0/3 shutdown eth-trunk 1#interface GigabitEthernet0/0/4 shutdown eth-trunk 1#interface GigabitEthernet0/0/10 port link-type trunk port trunk allow-pass vlan 2#interface NULL0#interface LoopBack1 ip address 1.1.1.1 255.255.255.255#ospf 1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 10.1.1.0 0.0.0.255 network 10.1.3.0 0.0.0.255#return[pe1]

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

dis cu#sysname pe2#vlan batch 3 5#lacp e-trunk system-id 0001-0001-0001lacp e-trunk priority 1#interface Vlanif1#interface Vlanif3 ip address 10.1.2.254 255.255.255.0#interface Vlanif5 ip address 10.1.3.252 255.255.255.0#interface MEth0/0/1#e-trunk 1 priority 2 peer-address 1.1.1.1 source-address 2.2.2.2#interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 2 to 4094 mode lacp-static#interface GigabitEthernet0/0/11 port link-type trunk port trunk allow-pass vlan 3#interface GigabitEthernet0/0/19 eth-trunk 1#interface GigabitEthernet0/0/20 eth-trunk 1#interface GigabitEthernet0/0/24#interface NULL0#interface LoopBack1 ip address 2.2.2.2 255.255.255.255#ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 10.1.2.0 0.0.0.255 network 10.1.3.0 0.0.0.255#user-interface con 0user-interface vty 0 4#return

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

dis cu#sysname pe3#vlan batch 2 to 3#interface Vlanif1#interface Vlanif2 ip address 10.1.1.1 255.255.255.0#interface Vlanif3 ip address 10.1.2.1 255.255.255.0#interface MEth0/0/1#interface GigabitEthernet0/0/10 port link-type trunk port trunk allow-pass vlan 2#interface GigabitEthernet0/0/11 port link-type trunk port trunk allow-pass vlan 3#interface LoopBack1 ip address 3.3.3.3 255.255.255.255#ospf 1 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 10.1.2.0 0.0.0.255 network 10.1.1.0 0.0.0.255#user-interface con 0user-interface vty 0 4#return