当前位置:首页 » 《随便一记》 » 正文

E-trunk+Eth-trunk模拟实验(ENSP)_m0_60319375的博客

1 人参与  2022年04月14日 15:24  分类 : 《随便一记》  评论

点击全文阅读


E-trunk是跨设备的链路聚合,基于LACP进行了扩展,链路可靠性从单板级提高到了设备级,常用与CE双归接入PE1和PE2。

E-trunk配置示例:

 

 

 1、SW2和SW3配置三层接口,能互相通信

sw2:

interface Vlanif100
ip address 10.1.1.1 255.255.255.0
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 100

sw3:

interface Vlanif100
ip address 10.1.1.2 255.255.255.0
interface GigabitEthernet0/0/3
 port link-type trunk
 port trunk allow-pass vlan 100

2、sw1、sw2、sw3、sw4配置eth-trunk,并将相应的接口绑定到eth-trunk

[sw1]interface Eth-Trunk 10
mode lacp-static                   //要配置模式为静态,而且要先设置模式再绑定端口
trunkport GigabitEthernet 0/0/1 to 0/0/4


[sw2]interface Eth-Trunk 20
mode lacp-static
trunkport GigabitEthernet 0/0/1
trunkport GigabitEthernet 0/0/2
[sw2]interface Eth-Trunk 24        //sw2与sw4之间创建eth-trunk24
mode lacp-static                   
trunkport GigabitEthernet 0/0/4 
trunkport GigabitEthernet 0/0/5

[sw3]interface Eth-Trunk 30
mode lacp-static
trunkport GigabitEthernet 0/0/1
trunkport GigabitEthernet 0/0/2
[sw2]interface Eth-Trunk 34        //sw3与sw4之间创建eth-trunk34
mode lacp-static                   
trunkport GigabitEthernet 0/0/4 
trunkport GigabitEthernet 0/0/5

[sw4]int Eth-Trunk 40
mode lacp-static                   
trunkport GigabitEthernet 0/0/1 to 0/0/4

在各交换机上查看eth-trunk是否正常,示例sw1

[sw1]dis eth-trunk 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10                  WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 4c1f-cc03-4f4e                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: up          Number Of Up Port In Trunk: 2                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1   Selected 1GE      32768   2      2609    10111100  1     
GigabitEthernet0/0/2   Unselect 1GE      32768   3      2609    10110000  1     
GigabitEthernet0/0/3   Selected 1GE      32768   4      2609    10111100  1     
GigabitEthernet0/0/4   Unselect 1GE      32768   5      2609    10110000  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
GigabitEthernet0/0/1   32768    0000-0000-0001  32768   2      33073   10111100
GigabitEthernet0/0/2   32768    0000-0000-0001  32768   32770  33073   10100000
GigabitEthernet0/0/3   32768    0000-0000-0001  32768   3      33073   10111100
GigabitEthernet0/0/4   32768    0000-0000-0001  32768   32771  33073   10100000

3、在sw2和sw3上配置e-trunk

SW2为主设备

[sw2]e-trunk 1
[sw2-e-trunk-1]priority 99 //配置优先级,越小越优默认是100,用于竞争主备,备用设备要down接口
[sw2-e-trunk-1]peer-address 10.1.1.2 source-address 10.1.1.1 //指定对端ip和本ip

SW3为备用设备

[sw3]e-trunk 1
[sw3-e-trunk-1]peer-address 10.1.1.1 source-address 10.1.1.2

在sw2和sw3上绑定e-trunk

[sw2]lacp e-trunk system-id 0000-0102-0304 //配置MAC地址
[sw2]lacp e-trunk priority 32768 //配置优先级,默认就是32768
[sw2]int Eth-Trunk 20
[sw2-Eth-Trunk20]e-trunk 1 remote-eth-trunk 30 //关联E-trunk 1,remote-eth-trunk 30是对端Eth-trunk30
[sw2]int Eth-Trunk 24
[sw2-Eth-Trunk24]e-trunk 1 remote-eth-trunk 30 //关联E-trunk 1,remote-eth-trunk 30是对端Eth-trunk30

[sw3]lacp e-trunk system-id 0000-0102-0304
[sw3]lacp e-trunk priority 32768
[sw3]int Eth-Trunk 30
[sw3-Eth-Trunk30]e-trunk 1 remote-eth-trunk 20
[sw3]int Eth-Trunk 34
[sw3-Eth-Trunk34]e-trunk 1 remote-eth-trunk 20
注:配置两台mac地址和优先级要保持一致

4、查看sw2和sw3的e-trunk状态

[sw2]display e-trunk 1
                            The E-Trunk information
E-TRUNK-ID : 1                          Revert-Delay-Time (s) : 120
Priority : 99                           System-ID : 4c1f-cc5b-1cf4
Peer-IP : 10.1.1.2                      Source-IP : 10.1.1.1
State : Master                          Causation : PRI
Send-Period (100ms) : 10                Fail-Time (100ms) : 200
Receive : 12622                         Send : 12634
RecDrop : 0                             SndDrop : 9
Peer-Priority : 100                     Peer-System-ID : 4c1f-cce7-14de
Peer-Fail-Time (100ms) : 200            BFD-Session : -
Description : -
--------------------------------------------------------------------------------
                            The Member information
Type      ID  LocalPhyState  Work-Mode     State   Causation        Remote-ID
Eth-Trunk 20  Up             auto          Master  ETRUNK_MASTER    30        
Eth-Trunk 24  Up             auto          Master  ETRUNK_MASTER    30   
[sw3]display e-trunk 1
                            The E-Trunk information
E-TRUNK-ID : 1                          Revert-Delay-Time (s) : 120
Priority : 100                          System-ID : 4c1f-cce7-14de
Peer-IP : 10.1.1.1                      Source-IP : 10.1.1.2
State : Backup                          Causation : PRI
Send-Period (100ms) : 10                Fail-Time (100ms) : 200
Receive : 16809                         Send : 17200
RecDrop : 9                             SndDrop : 399
Peer-Priority : 99                      Peer-System-ID : 4c1f-cc5b-1cf4
Peer-Fail-Time (100ms) : 200            BFD-Session : -
Description : -
--------------------------------------------------------------------------------
                            The Member information
Type      ID  LocalPhyState  Work-Mode     State   Causation        Remote-ID
Eth-Trunk 30  Down           auto          Backup  PEER_MEMBER_UP   20        
Eth-Trunk 34  Down           auto          Backup  ETRUNK_BACKUP    20 

5、模拟故障,当sw2出现故障(关机),查看sw3的e-trunk状态是否成为master

[sw3]display e-trunk 1
                            The E-Trunk information
E-TRUNK-ID : 1                          Revert-Delay-Time (s) : 120
Priority : 100                          System-ID : 4c1f-cce7-14de
Peer-IP : 10.1.1.1                      Source-IP : 10.1.1.2
State : Master                          Causation : TIMEOUT
Send-Period (100ms) : 10                Fail-Time (100ms) : 200
Receive : 17289                         Send : 17712
RecDrop : 9                             SndDrop : 429
Peer-Priority : -                       Peer-System-ID : -
Peer-Fail-Time (100ms) : -              BFD-Session : -
Description : -
--------------------------------------------------------------------------------
                            The Member information
Type      ID  LocalPhyState  Work-Mode     State   Causation        Remote-ID
Eth-Trunk 30  Up             auto          Master  ETRUNK_MASTER    20        
Eth-Trunk 34  Up             auto          Master  ETRUNK_MASTER    20 

在SW1上查看eth-trunk 10的状态,看链路是否自动切换

[sw1]display eth-trunk 10
Eth-Trunk10's state information is:
Local:
LAG ID: 10                  WorkingMode: STATIC                               
Preempt Delay: Disabled     Hash arithmetic: According to SIP-XOR-DIP         
System Priority: 32768      System ID: 4c1f-cc03-4f4e                         
Least Active-linknumber: 1  Max Active-linknumber: 8                          
Operate status: up          Number Of Up Port In Trunk: 2                     
--------------------------------------------------------------------------------
ActorPortName          Status   PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/1   Unselect 1GE      32768   2      2609    10100010  1     
GigabitEthernet0/0/2   Selected 1GE      32768   3      2609    10111100  1     
GigabitEthernet0/0/3   Unselect 1GE      32768   4      2609    10100010  1     
GigabitEthernet0/0/4   Selected 1GE      32768   5      2609    10111100  1     

Partner:
--------------------------------------------------------------------------------
ActorPortName          SysPri   SystemID        PortPri PortNo PortKey PortState
GigabitEthernet0/0/1   0        0000-0000-0000  0       0      0       10100011
GigabitEthernet0/0/2   32768    0000-0000-0001  32768   32770  33073   10111100
GigabitEthernet0/0/3   0        0000-0000-0000  0       0      0       10100011
GigabitEthernet0/0/4   32768    0000-0000-0001  32768   32771  33073   10111100


点击全文阅读


本文链接:http://m.zhangshiyu.com/post/38042.html

配置  优先级  设备  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1