首页 > 其他分享 >中兴交换机MC-LAG配置实例

中兴交换机MC-LAG配置实例

时间:2023-08-16 17:23:55浏览次数:40  
标签:MC S2 S1 LAG lacp 交换机 exit interface config

配置说明 MC-LAG是一种实现跨设备链路聚合的机制,能够实现多台设备间的链路聚合,从而把链路可靠性从单板级提高到了设备级,组成双活系统。 MC-LAG典型组网如图1所示: 图1  MC-LAG典型组网示意图

 

配置思路
  1.   创建SmartGroup及配置peerlink链路
  2.   在peerlink上配置静态路由,使S1和S2之间loopback地址可达
  3.   S1和S2之间配置LDP协议,用来同步MC-LAG数据
  4.   S1和S2之间再配置一条三层链路用来进行keepalive保活和协商
  5.   配置MC-LAG成员及协商参数
  6.   配置双活系统虚MAC   配置过程 本示例使用IPv4和IPv6双栈,具体配置信息如下:
    1.   创建smartgroup1024并配置为peerlink链路。 S1的配置:
      S1(config)#interface smartgroup1024                                           
      S1(config-if-smartgroup1024)#exit                                             
      S1(config)#lacp                                                               
      S1(config-lacp)#interface smartgroup1024                                                
      S1(config-lacp-sg-if-smartgroup1024)#lacp mode 802.3ad                        
      S1(config-lacp-sg-if-smartgroup1024)#exit                                     
      S1(config-lacp)#interface xgei-0/3/0/47                                       
      S1(config-lacp-member-if-xgei-0/3/0/47)#smartgroup 1024 mode active           
      S1(config-lacp-member-if-xgei-0/3/0/47)#exit 
      S1(config-lacp)#interface xgei-0/3/0/48                                       
      S1(config-lacp-member-if-xgei-0/3/0/48)#smartgroup 1024 mode active           
      S1(config-lacp-member-if-xgei-0/3/0/48)#exit                                  
      S1(config-lacp)#exit                                                              
      S1(config)#lacp                                                               
      S1(config-lacp)#lacp peer-link smartgroup1024                                 
      S1(config-lacp)#exit                                                          
      S1(config)#
      S2的配置:
      S2(config)#interface smartgroup1024                                           
      S2(config-if-smartgroup1024)#exit                                             
      S2(config)#lacp                                                               
      S2(config-lacp)#interface smartgroup1024                                                
      S2(config-lacp-sg-if-smartgroup1024)#lacp mode 802.3ad                        
      S2(config-lacp-sg-if-smartgroup1024)#exit                                     
      S2(config-lacp)#interface xgei-0/3/0/47                                       
      S2(config-lacp-member-if-xgei-0/3/0/47)#smartgroup 1024 mode active           
      S2(config-lacp-member-if-xgei-0/3/0/47)#exit 
      S2(config-lacp)#interface xgei-0/3/0/48                                       
      S2(config-lacp-member-if-xgei-0/3/0/48)#smartgroup 1024 mode active           
      S2(config-lacp-member-if-xgei-0/3/0/48)#exit                                  
      S2(config-lacp)#exit                                                          
      S2(config)#lacp                                                               
      S2(config-lacp)#lacp peer-link smartgroup1024                                 
      S2(config-lacp)#exit                                                          
      S2(config)#
    2.   在peerlink链路上配置静态路由,使S1和S2 loopback地址互通。 S1的配置:
      S1(config)#switchvlan-configuration                                           
      S1(config-swvlan)#interface smartgroup1024                                    
      S1(config-swvlan-if-smartgroup1024)#switchport mode trunk                     
      S1(config-swvlan-if-smartgroup1024)#switchport trunk vlan 1001                
      S1(config-swvlan-if-smartgroup1024)#exit                                      
      S1(config-swvlan)#exit                                                        
      S1(config)#interface vlan1001                                                                                          
      S1(config-if-vlan1001)#ip add 101.1.1.1 255.255.255.0
      S1(config-if-vlan1001)#ipv6 enable
      S1(config-if-vlan1001)#ipv6 add 101::1/64                     
      S1(config-if-vlan1001)#exit                                                                                         
      S1(config)#ip route 2.2.2.2 255.255.255.255 101.1.1.2
      S1(config)#iccp peerlink vlan 1001
      S2的配置:
      S2(config)#switchvlan-configuration                                           
      S2(config-swvlan)#interface smartgroup1024                                    
      S2(config-swvlan-if-smartgroup1024)#switchport mode trunk                     
      S2(config-swvlan-if-smartgroup1024)#switchport trunk vlan 1001                
      S2(config-swvlan-if-smartgroup1024)#exit                                      
      S2(config-swvlan)#exit                                                        
      S2(config)#interface vlan1001                                                                                          
      S2(config-if-vlan1001)#ip add 101.1.1.2 255.255.255.0 
      S2(config-if-vlan1001)#ipv6 enable
      S2(config-if-vlan1001)#ipv6 add 101::2/64                      
      S2(config-if-vlan1001)#exit                                                                                         
      S2(config)#ip route 1.1.1.1 255.255.255.255 101.1.1.1
      S2(config)#iccp peerlink vlan 1001
      配置验证::
      S1config)#ping 2.2.2.2                                                       
      sending 5,100-byte ICMP echo(es) to 2.2.2.2,timeout is 2 second(s).             
      !!!!!                                                                           
      Success rate is 100 percent(5/5),round-trip min/avg/max= 6/8/15 ms.             
      [finish]                                                                        
       
      S2(config)#ping 1.1.1.1                                                       
      sending 5,100-byte ICMP echo(es) to 1.1.1.1,timeout is 2 second(s).             
      !!!!!                                                                           
      Success rate is 100 percent(5/5),round-trip min/avg/max= 4/5/7 ms.
      
    3.   S1和S2之间通过loopback口建立LDP协议并配置RG。 S1的配置:
      S1(config)#mpls ldp instance 1                                                                                                                     
      S1(config-ldp-1)#router-id loopback1                                          
      S1(config-ldp-1)#target-session 2.2.2.2                                       
      S1(config-ldp-1)#exit                                                         
      S1(config)#S1(config)#redundancy interchassis group 1                                                                                            
      S1(config-rg-1)#peer 2.2.2.2                                                  
      S1(config-rg-1)#apply mac                                                     
      S1(config-rg-1)#apply arp                                                     
      S1(config-rg-1)#apply nd                                                      
      S1(config-rg-1)#exit                                                          
      S1(config)#
      
      S2的配置:
      S2(config)#mpls ldp instance 1                                                                                                                        
      S2(config-ldp-1)#router-id loopback1                                          
      S2(config-ldp-1)#target-session 1.1.1.1                                       
      S2(config-ldp-1)#exit                                                         
      S2(config)#
      S2(config-rg-1)#peer 1.1.1.1                                                  
      S2(config-rg-1)#apply mac                                                     
      S2(config-rg-1)#apply arp                                                     
      S2(config-rg-1)#apply nd                                                      
      S2(config-rg-1)#exit                                                          
      S2(config)#
      
      配置验证:
      S1config)#show mpls ldp neighbor brief instance 1                            
      Codes: D:Direct, T:Targeted, D&T:Direct&Targeted                                
      Total number of neigbors:2                                                      
        Operational:2 (D:0,T:2,D&T:0) (IPv4:2,IPv6:0,IPv4&IPv6:0)                     
        Not operational:0 (D:0,T:0,D&T:0) (IPv4:0,IPv6:0,IPv4&IPv6:0)                 
      Peer-LDP-ID     State Up-time   Discovery GR Address IPv4/IPv6 Local-LDP-ID     
                                                            Label                     
      Type                                                                            
      2.2.2.2:0       Oper  01:07:08  1         N  2       16/0      1.1.1.1:0        
      T                                                                               
      2.2.2.2:65535   Oper  01:07:08  1         N  0       0/0       1.1.1.1:65535    
      T                                                                                         
       
      S2(config)#show mpls ldp neighbor brief instance 1                            
      Codes: D:Direct, T:Targeted, D&T:Direct&Targeted                                
      Total number of neigbors:2                                                      
        Operational:2 (D:0,T:2,D&T:0) (IPv4:2,IPv6:0,IPv4&IPv6:0)                     
        Not operational:0 (D:0,T:0,D&T:0) (IPv4:0,IPv6:0,IPv4&IPv6:0)                 
      Peer-LDP-ID     State Up-time   Discovery GR Address IPv4/IPv6 Local-LDP-ID     
                                                            Label                     
      Type                                                                            
      1.1.1.1:0       Oper  01:07:18  1         N  2       17/0      2.2.2.2:0        
      T                                                                               
      1.1.1.1:65535   Oper  01:07:18  1         N  0       0/0       2.2.2.2:65535    
      T
      
      或使用IPv6地址建立LDP协议 S1的配置:
      S1(config)#mpls ldp instance 1
      S1(config-ldp-1)#router-id loopback1
      S1(config-ldp-1)#target ipv6 transport-address 101::1
      S1(config-ldp-1)#exit
      S1(config)#S1(config)#redundancy interchassis group 1
      S1(config-rg-1)#peer ipv6 101::2
      S1(config-rg-1)#apply mac
      S1(config-rg-1)#apply arp
      S1(config-rg-1)#apply nd
      S1(config-rg-1)#exit
      S1(config)#
      S2的配置:
      S2(config)#mpls ldp instance 1                                                                                                                        
      S2(config-ldp-1)#router-id loopback1                                          
      S2(config-ldp-1)#target ipv6 transport-address 101::2                                    
      S2(config-ldp-1)#exit                                                         
      S2(config)#
      S2(config-rg-1)#peer ipv6 101::1
      S2(config-rg-1)#apply mac
      S2(config-rg-1)#apply arp
      S2(config-rg-1)#apply nd
      S2(config-rg-1)#exit
      S2(config)#
      配置验证:
      S1(config)#show mpls ldp neighbor detail instance 1                           
      Peer LDP Ident: 2.2.2.2:65535; Local LDP Ident: 1.1.1.1:65535                   
              TCP connection: 101::2.30005 - 101::1.646                               
              State: Oper; Msgs sent/rcvd: 6097/8811; Downstream                      
              Up Time: 00:18:45                                                       
              LDP discovery sources:                                                  
                Targeted Hello (101::2); Src IP addr: 101::2                          
                  holdtime: 45000 ms, hello interval: 15000 ms                        
              Addresses bound to peer LDP Ident:                                      
              Session holdtime: 180000 ms; KA interval: 60000 ms                      
              LDP Peer BFD not register.                                              
              LDP dynamic capability enable:                                          
              LDP send capability:                                                    
                LDP dynamic capability                                                
                LDP Typed Wildcard FEC Cap                                            
                LDP Unrecognized Noti Cap                                             
                ICCP capability                                                       
              LDP received capability:                                                
                LDP dynamic capability negotiate success                              
                LDP Typed Wildcard FEC Cap negotiate success                          
                LDP Unrecognized Noti Cap negotiate success                           
                ICCP capability negotiate success                                     
       
      S2(config)#show mpls ldp neighbor detail instance 1                           
      Peer LDP Ident: 1.1.1.1:65535; Local LDP Ident: 2.2.2.2:65535                   
              TCP connection: 101::1.646 - 101::2.30005                               
              State: Oper; Msgs sent/rcvd: 9305/6522; Downstream                      
              Up Time: 00:19:38                                                       
              LDP discovery sources:                                                  
                Targeted Hello (101::1); Src IP addr: 101::1                          
                  holdtime: 45000 ms, hello interval: 15000 ms                        
              Addresses bound to peer LDP Ident:                                      
              Session holdtime: 180000 ms; KA interval: 60000 ms                      
              LDP Peer BFD not register.                                              
              LDP dynamic capability enable:                                          
              LDP send capability:                                                    
                LDP dynamic capability                                                
                LDP Typed Wildcard FEC Cap                                            
                LDP Unrecognized Noti Cap                                             
                ICCP capability                                                       
              LDP received capability:                                                
                LDP dynamic capability negotiate success                              
                LDP Typed Wildcard FEC Cap negotiate success                          
                LDP Unrecognized Noti Cap negotiate success                                     
                ICCP capability negotiate success
      
    4.   S1和S2之间另配置一条L3链路进行keepalive协商和保活。 S1的配置:
      S1(config)#ip vrf test                                                                                                                               
      S1(config-vrf-test)#rd 1:1                                                    
      S1(config-vrf-test)#address-family ipv4                                       
      S1(config-vrf-test-af-ipv4)#exit                                              
      S1(config-vrf-test)#exit                                                           
      S1(config)#interface smartgroup1023                                                                        
      S1(config-if-smartgroup1023)#switch attribute disable                         
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S1(config-if-smartgroup1023)#exit                                             
      S1(config)#interface xlgei-0/15/0/36                                                                    
      S1(config-if-xlgei-0/15/0/36)#switch attribute disable                        
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S1(config-if-xlgei-0/15/0/36)# exit                                                                                          
      S1(config)#lacp                                                               
      S1(config-lacp)#interface smartgroup1023                                      
      S1(config-lacp-sg-if-smartgroup1023)#lacp mode 802.3ad                        
      S1(config-lacp-sg-if-smartgroup1023)#exit                                     
      S1(config-lacp)#interface xlgei-0/15/0/36                                                                
      S1(config-lacp-member-if-xlgei-0/15/0/36)#smartgroup 1023 mode active         
      S1(config-lacp-member-if-xlgei-0/15/0/36)#exit                                
      S1(config-lacp)#exit                                                          
      S1(config)#interface smartgroup1023.1                                         
      S1(config-if-smartgroup1023.1)#exit                                                                                                                                                             
      S1(config)#vlan-configuration                                                 
      S1(config-vlan)#interface smartgroup1023.1                                                                                     
      S1(config-vlan-if-smartgroup1023.1)#encapsulation-dot1q 4094                  
      S1(config-vlan-if-smartgroup1023.1)#exit                                      
      S1(config-vlan)#exit                                                          
      S1(config)#interface smartgroup1023.1                                                                                                       
      S1(config-if-smartgroup1023.1)#ip vrf forwarding test                         
      S1(config-if-smartgroup1023.1)#ip address 1.0.0.1 255.255.255.0               
      S1(config-if-smartgroup1023.1)#exit                                           
      S1(config)# lacp                                                                                                 
      S1(config-lacp)#mc-lag ipv4 source 1.0.0.1 destination 1.0.0.2 vrf test
      
      S2的配置:
      S2(config)#ip vrf test                                                                                                                               
      S2(config-vrf-test)#rd 1:1                                                    
      S2(config-vrf-test)#address-family ipv4                                       
      S2(config-vrf-test-af-ipv4)#exit                                              
      S2(config-vrf-test)#exit                                                      
      S2(config)#       
      S2(config)#interface smartgroup1023                                                                        
      S2(config-if-smartgroup1023)#switch attribute disable                         
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S2(config-if-smartgroup1023)#exit                                             
      S2(config)#interface xlgei-0/15/0/36                                                                    
      S2(config-if-xlgei-0/15/0/36)#switch attribute disable                        
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S2(config-if-xlgei-0/15/0/36)# exit                                                                                          
      S2(config)#lacp                                                               
      S2(config-lacp)#interface smartgroup1023                                      
      S2(config-lacp-sg-if-smartgroup1023)#lacp mode 802.3ad                        
      S2(config-lacp-sg-if-smartgroup1023)#exit                                     
      S2(config-lacp)#interface xlgei-0/15/0/36                                                                
      S2(config-lacp-member-if-xlgei-0/15/0/36)#smartgroup 1023 mode active         
      S2(config-lacp-member-if-xlgei-0/15/0/36)#exit                                
      S2(config-lacp)#exit                                                          
      S2(config)#interface smartgroup1023.1                                         
      S2(config-if-smartgroup1023.1)#exit                                                                                                                                                             
      S2(config)#vlan-configuration                                                 
      S2(config-vlan)#interface smartgroup1023.1                                                                                     
      S2(config-vlan-if-smartgroup1023.1)#encapsulation-dot1q 4094                  
      S2(config-vlan-if-smartgroup1023.1)#exit                                      
      S2(config-vlan)#exit                                                          
      S2(config)#interface smartgroup1023.1                                                                                                       
      S2(config-if-smartgroup1023.1)#ip vrf forwarding test                         
      S2(config-if-smartgroup1023.1)#ip address 1.0.0.2 255.255.255.0               
      S2(config-if-smartgroup1023.1)#exit                                           
      S2(config)# lacp                                                                                                
      S2(config-lacp)#mc-lag ipv4 source 1.0.0.2 destination 1.0.0.1 vrf test
      
      配置验证:
      S1(config)#ping vrf test 1.0.0.2                                              
      sending 5,100-byte ICMP echo(es) to 1.0.0.2,timeout is 2 second(s).             
      !!!!!                                                                           
      Success rate is 100 percent(5/5),round-trip min/avg/max= 4/5/6 ms.              
      [finish]                                                                        
       
      S2(config)#ping vrf test 1.0.0.1                                              
      sending 5,100-byte ICMP echo(es) to 1.0.0.1,timeout is 2 second(s).             
      !!!!!                                                                           
      Success rate is 100 percent(5/5),round-trip min/avg/max= 4/5/9 ms.              
      [finish]
      
      或使用IPv6地址进行keepalive保活。 S1的配置:
      S1(config)#ip vrf test                                                                                                                               
      S1(config-vrf-test)#rd 1:1                                                    
      S1(config-vrf-test)#address-family ipv6                                       
      S1(config-vrf-test-af-ipv6)#exit                                              
      S1(config-vrf-test)#exit                                                            
      S1(config)#interface smartgroup1023                                                                        
      S1(config-if-smartgroup1023)#switch attribute disable                         
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S1(config-if-smartgroup1023)#exit                                             
      S1(config)#interface xlgei-0/15/0/36                                                                    
      S1(config-if-xlgei-0/15/0/36)#switch attribute disable                        
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S1(config-if-xlgei-0/15/0/36)# exit                                                                                          
      S1(config)#lacp                                                               
      S1(config-lacp)#interface smartgroup1023                                      
      S1(config-lacp-sg-if-smartgroup1023)#lacp mode 802.3ad                        
      S1(config-lacp-sg-if-smartgroup1023)#exit                                     
      S1(config-lacp)#interface xlgei-0/15/0/36                                                                
      S1(config-lacp-member-if-xlgei-0/15/0/36)#smartgroup 1023 mode active         
      S1(config-lacp-member-if-xlgei-0/15/0/36)#exit                                
      S1(config-lacp)#exit                                                          
      S1(config)#interface smartgroup1023.1                                         
      S1(config-if-smartgroup1023.1)#exit                                                                                                                                                             
      S1(config)#vlan-configuration                                                 
      S1(config-vlan)#interface smartgroup1023.1                                                                                     
      S1(config-vlan-if-smartgroup1023.1)#encapsulation-dot1q 4094                  
      S1(config-vlan-if-smartgroup1023.1)#exit                                      
      S1(config-vlan)#exit                                                          
      S1(config)#interface smartgroup1023.1                                                                                                       
      S1(config-if-smartgroup1023.1)#ip vrf forwarding test 
      S1(config-if-smartgroup1023.1)#ipv6 enable                        
      S1(config-if-smartgroup1023.1)#ipv6 address 1::1/64              
      S1(config-if-smartgroup1023.1)#exit                                           
      S1(config)# lacp                                                                                                
      S1(config-lacp)#mc-lag ipv6 source 1::1 destination 1::2 vrf test
      
      S2的配置:
      S2(config)#ip vrf test                                                                                                                               
      S2(config-vrf-test)#rd 1:1                                                    
      S2(config-vrf-test)#address-family ipv6                                       
      S2(config-vrf-test-af-ipv6)#exit                                              
      S2(config-vrf-test)#exit                                                      
      S2(config)#       
      S2(config)#interface smartgroup1023                                                                        
      S2(config-if-smartgroup1023)#switch attribute disable                         
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S2(config-if-smartgroup1023)#exit                                             
      S2(config)#interface xlgei-0/15/0/36                                                                    
      S2(config-if-xlgei-0/15/0/36)#switch attribute disable                        
      Would you change the L2/L3 attribute of the interface?[yes/no]:yes              
      S2(config-if-xlgei-0/15/0/36)# exit                                                                                          
      S2(config)#lacp                                                               
      S2(config-lacp)#interface smartgroup1023                                      
      S2(config-lacp-sg-if-smartgroup1023)#lacp mode 802.3ad                        
      S2(config-lacp-sg-if-smartgroup1023)#exit                                     
      S2(config-lacp)#interface xlgei-0/15/0/36                                                                
      S2(config-lacp-member-if-xlgei-0/15/0/36)#smartgroup 1023 mode active         
      S2(config-lacp-member-if-xlgei-0/15/0/36)#exit                                
      S2(config-lacp)#exit                                                          
      S2(config)#interface smartgroup1023.1                                         
      S2(config-if-smartgroup1023.1)#exit                                                                                                                                                             
      S2(config)#vlan-configuration                                                 
      S2(config-vlan)#interface smartgroup1023.1                                                                                     
      S2(config-vlan-if-smartgroup1023.1)#encapsulation-dot1q 4094                  
      S2(config-vlan-if-smartgroup1023.1)#exit                                      
      S2(config-vlan)#exit                                                          
      S2(config)#interface smartgroup1023.1                                                                                                       
      S2(config-if-smartgroup1023.1)#ip vrf forwarding test
      S2(config-if-smartgroup1023.1)#ipv6 enable                        
      S2(config-if-smartgroup1023.1)#ipv6 address 1::2/64           
      S2(config-if-smartgroup1023.1)#exit                                           
      S2(config)# lacp                                                                                                
      S2(config-lacp)#mc-lag ipv6 source 1::2 destination 1::1 vrf test
      
      配置验证:
      S1#ping6 vrf test 1::2                                                        
      sending 5,100-byte ICMP echo(es) to 1:0:0:0:0:0:0:2,timeout is 2 second(s).     
      !!!!!                                                                           
      Success rate is 100 percent(5/5),round-trip min/avg/max= 7/146/675 ms.          
      [finish]                                                                         
       
      S2config)#ping6 vrf test 1::1                                                
      sending 5,100-byte ICMP echo(es) to 1:0:0:0:0:0:0:1,timeout is 2 second(s).     
      !!!!!                                                                           
      Success rate is 100 percent(5/5),round-trip min/avg/max= 6/9/21 ms.             
      [finish]
      
    5.   配置MC-LAG成员及协商参数。 S1的配置:
      S1(config)#interface smartgroup1                                              
      S1(config-if-smartgroup1)#exit                                                
      S1(config)#lacp
      S1(config-lacp)#mc-lag exempt smartgroup1023                                                               
      S1(config-lacp)#interface smartgroup1                                         
      S1(config-lacp-sg-if-smartgroup1)#lacp mode 802.3ad                           
      S1(config-lacp-sg-if-smartgroup1)#exit                                        
      S1(config-lacp)#interface xgei-0/3/0/24                                       
      S1(config-lacp-member-if-xgei-0/3/0/24)#smartgroup 1 mode active              
      S1(config-lacp-member-if-xgei-0/3/0/24)#exit                                  
      S1(config-lacp)#exit                                                                                                                       
      S1(config)#switchvlan-configuration                                           
      S1(config-swvlan)#interface smartgroup1                                                                                 
      S1(config-swvlan-if-smartgroup1)#switchport mode trunk                        
      S1(config-swvlan-if-smartgroup1)#switchport trunk vlan 100                    
      S1(config-swvlan-if-smartgroup1)#exit
      S1(config-swvlan)#interface smartgroup1024                                                                                                       
      S1(config-swvlan-if-smartgroup1024)#switchport trunk vlan 100                    
      S1(config-swvlan-if-smartgroup1024)#exit                                                                                  
      S1(config-swvlan)#exit 
      S1(config)#interface vlan100                                                    
      S1(config-if-vlan100)#ip address 10.1.1.1 255.255.255.0
      S1(config-if-vlan100)#ipv6 enable
      S1(config-if-vlan100)#ipv6 address 10::1/64                       
      S1(config-if-vlan100)#exit                                                    
      S1(config)#lacp                                                               
      S1(config-lacp)# mc-lag priority 1                                            
      S1(config-lacp)#interface smartgroup1                                         
      S1(config-lacp-sg-if-smartgroup1)#mc-lag ipv4 source 1.0.0.1 destination 1.0.0.2 vrf test 
      //或者配置v6地址检测keealive
      S1(config-lacp-sg-if-smartgroup1)#mc-lag ipv6 source 1::1 destination 1::2 vrf test */
      S1(config-lacp-sg-if-smartgroup1)#mc-lag mode force-master                    
      S1(config-lacp-sg-if-smartgroup1)#mc-lag priority 200                         
      S1(config-lacp-sg-if-smartgroup1)#mc-lag roid 1 node-id 1                     
      S1(config-lacp-sg-if-smartgroup1)#mc-lag sys-id 0000.1111.1111 sys-priority 1           
      S1(config-lacp-sg-if-smartgroup1)#exit                                        
      S1(config-lacp)#exit
      S1(config)#icbg sg1                                                           
      S1(config-icbg-sg1)#bind interface smartgroup1                                
      S1(config-icbg-sg1)#bind slave-interface smartgroup1024                       
      S1(config-icbg-sg1)#bind rg 1                                                 
      S1(config-icbg-sg1)#exit                                                      
      S1(config)#icbg vlan100                                                       
      S1(config-icbg-vlan100)#bind interface vlan100                                
      S1(config-icbg-vlan100)#bind slave-interface smartgroup1024                   
      S1(config-icbg-vlan100)#bind rg 1                                             
      S1(config-icbg-vlan100)#exit                                                  
      S1(config)#
      S2的配置:
      S2(config)#interface smartgroup1                                              
      S2(config-if-smartgroup1)#exit                                                
      S2(config)#lacp
      S1(config-lacp)#mc-lag exempt smartgroup1023                                                               
      S2(config-lacp)#interface smartgroup1                                         
      S2(config-lacp-sg-if-smartgroup1)#lacp mode 802.3ad                           
      S2(config-lacp-sg-if-smartgroup1)#exit                                        
      S2(config-lacp)#interface xgei-0/3/0/24                                       
      S2(config-lacp-member-if-xgei-0/3/0/24)#smartgroup 1 mode active              
      S2(config-lacp-member-if-xgei-0/3/0/24)#exit                                  
      S2(config-lacp)#exit                                                                                                                       
      S2(config)#switchvlan-configuration                                           
      S2(config-swvlan)#interface smartgroup1                                                                               
      S2(config-swvlan-if-smartgroup1)#switchport mode trunk                        
      S2(config-swvlan-if-smartgroup1)#switchport trunk vlan 100                    
      S2(config-swvlan-if-smartgroup1)#exit
      S2(config-swvlan)#interface smartgroup1024                                                                                                      
      S2(config-swvlan-if-smartgroup1024)#switchport trunk vlan 100                    
      S2(config-swvlan-if-smartgroup1024)#exit                                          
      S2(config-swvlan)#exit 
      S2(config)#interface vlan100                                                    
      S2(config-if-vlan100)#ip address 10.1.1.1 255.255.255.0 
      S2(config-if-vlan100)#ipv6 enable
      S2(config-if-vlan100)#ipv6 address 10::2/64                       
      S2(config-if-vlan100)#exit                                                    
      S2(config)#lacp                                                               
      S2(config-lacp)# mc-lag priority 1                                            
      S2(config-lacp)#interface smartgroup1                                         
      S2(config-lacp-sg-if-smartgroup1)#mc-lag ipv4 source 1.0.0.2 destination 1.0.0.1 vrf test      
      /*或者配置v6地址检测keealive
      S2(config-lacp-sg-if-smartgroup1)#mc-lag ipv6 source 1::2 destination 1::1 vrf test */
      S2(config-lacp-sg-if-smartgroup1)#mc-lag mode force-master                    
      S2(config-lacp-sg-if-smartgroup1)#mc-lag priority 200                         
      S2(config-lacp-sg-if-smartgroup1)#mc-lag roid 1 node-id 2                     
      S2(config-lacp-sg-if-smartgroup1)#mc-lag sys-id 0000.1111.1111 sys-priority 1           
      S2(config-lacp-sg-if-smartgroup1)#exit                                        
      S2(config-lacp)#exit
      S2(config)#icbg sg1                                                           
      S2(config-icbg-sg1)#bind interface smartgroup1                                
      S2(config-icbg-sg1)#bind slave-interface smartgroup1024                       
      S2(config-icbg-sg1)#bind rg 1                                                 
      S2(config-icbg-sg1)#exit                                                      
      S2(config)#icbg vlan100                                                       
      S2(config-icbg-vlan100)#bind interface vlan100                                
      S2(config-icbg-vlan100)#bind slave-interface smartgroup1024                   
      S2(config-icbg-vlan100)#bind rg 1                                             
      S2(config-icbg-vlan100)#exit                                                  
      S2(config)#
      配置验证:
      S1(config)#show lacp mc-lag                                                   
      Smartgroup id:              1                                                   
      Mc-lag iccp id:             0                                                   
      Mc-lag IPv4 source:         1.0.0.1                                             
      Mc-lag IPv4 destination:    1.0.0.2                                             
      Mc-lag IPv6 source:                                                             
      Mc-lag IPv6 destination:                                                        
      Mc-lag VRF name:            test                                                
      Mc-lag priority:            200                                                 
      Mc-lag sys-priority:        1                                                   
      Mc-lag sys-mac:             0000.1111.1111                                      
      Mc-lag restore mode:        MCLAG_IMMEDIATELY_MODE                              
      Mc-lag restore delay time:  0                                                   
      Mc-lag mode:                Force-master                                        
      Mc-lag work-mode:           Force-master                                        
      Mc-lag roid:                1                                                   
      Mc-lag node-id:             1                                                   
      Mc-lag state:               LOAD-SHARING                                        
      Mc-lag actor smartgroup state:   UP                                             
      Mc-lag partner smartgroup state: UP                                             
      Mc-lag backoff role:        MASTER                                              
      Mc-lag error down:          NO                                                  
                                                                              
       
      S2(config)#show lacp mc-lag                                                   
      Smartgroup id:              1                                                   
      Mc-lag iccp id:             0                                                   
      Mc-lag IPv4 source:         1.0.0.2                                             
      Mc-lag IPv4 destination:    1.0.0.1                                             
      Mc-lag IPv6 source:                                                             
      Mc-lag IPv6 destination:                                                        
      Mc-lag VRF name:            test                                                
      Mc-lag priority:            200                                                 
      Mc-lag sys-priority:        1                                                   
      Mc-lag sys-mac:             0000.1111.1111                                      
      Mc-lag restore mode:        MCLAG_IMMEDIATELY_MODE                              
      Mc-lag restore delay time:  0                                                   
      Mc-lag mode:                Force-master                                        
      Mc-lag work-mode:           Force-master                                        
      Mc-lag roid:                1                                                   
      Mc-lag node-id:             2                                                   
      Mc-lag state:               LOAD-SHARING                                        
      Mc-lag actor smartgroup state:   UP                                             
      Mc-lag partner smartgroup state: UP                                             
      Mc-lag backoff role:        SLAVE                                               
      Mc-lag error down:          NO
      
    6.   配置MC-LAG双活网关虚MAC(本例中借用VRRP协议虚MAC)。 S1的配置:
      S1(config)#interface vlan100
      S1(config-if-vlan100)#ipv6 address link-local fe80:20::1
      S1(config-if-vlan100)#iexit 
      S1(config)#vrrp   
      S1(config)#vrrp                                                      
      S1(config-vrrp)#interface vlan100                                             
      S1(config-vrrp-if-vlan100)#vrrp 1 ipv4 10.1.1.1
      S1(config-vrrp-if-vlan100)#vrrp 2 ipv6 fe80:10::1
      S1(config-vrrp-if-vlan100)#vrrp 2 ipv6 20::1 secondary                               
      S1(config-vrrp-if-vlan100)#exit                                               
      S1(config-vrrp)#exit
      
      S2的配置:
      S2(config)#interface vlan100
      S2(config-if-vlan100)#ipv6 address link-local fe80:20::1
      S2(config-if-vlan100)#iexi
      S2(config)#vrrp                                                               
      S2(config-vrrp)#interface vlan100   
      S2(config-vrrp-if-vlan100)#vrrp 2 ipv6 fe80:10::1
      S2(config-vrrp-if-vlan100)#vrrp 2 ipv6 20::1 secondary                                           
      S2(config-vrrp-if-vlan100)#vrrp 1 ipv4 10.1.1.1                               
      S2(config-vrrp-if-vlan100)#exit                                               
      S2(config-vrrp)#exit
      
      配置验证:
      S1(config)#show vrrp ipv4 brief                                               
      Interface         vrID Pri Time   A P L State  Master addr     VRouter addr     
      vlan100           1    255 1000   A P   Master 10.1.1.1        10.1.1.1         
      S1(config)#show vrrp ipv6 brief                                               
      Interface         vrID Pri Time   A P L State  Master addr     VRouter addr     
                                                                                      
      vlan100           2    100 1000     P   Master FE80:20:0:0:0:0 FE80:10:0:0:0:0: 
                                                     :0:1            0:1              
       
      S2(config)#show vrrp ipv4 brief                                               
      Interface         vrID Pri Time   A P L State  Master addr     VRouter addr     
      vlan100           1    255 1000   A P   Master 10.1.1.1        10.1.1.1  
      S2(config)#show vrrp ipv6 brief                                               
      Interface         vrID Pri Time   A P L State  Master addr     VRouter addr     
                                                                                      
      vlan100           2    100 1000     P   Master FE80:20:0:0:0:0 FE80:10:0:0:0:0: 
                                                     :0:1            0:1

标签:MC,S2,S1,LAG,lacp,交换机,exit,interface,config
From: https://www.cnblogs.com/skybai/p/17635679.html

相关文章