测试环境拓扑说明
-
ASR-1,ASR-2 分别在不同的两个POP,跟CENTEC-1,CENTEC-2建立MC-LAG,并且ASR-1,CENTEC-1 为主用,ASR-2,CENTEC-2 为备的。
-
CENTEC-1接一根线到ASR-11,CENTEC-2接一根线到ASR-12。
-
ASR-3,分别与ASR-1,ASR-2建立X-connect 两层隧道通道,然后下挂客户A端。
-
ASR-13,分别与ASR-11,ASR-12建立X-connect 两层隧道通道,然后下挂客户Z端。
-
ASR-1,ASR-2,ASR-3之间跑ospf协议,ASR-11,ASR-12,ASR-13之间跑ospf+MPLS+BGP协议(现有骨干网情况)
测试环境涉及的IP地址
-
ASR-1
-
loopback0 :1.1.1.1/32
-
te0/0/0 20.20.20.1/30
-
te0/0/1 10.200.13.1/30
-
-
ASR-2
-
loopback0 :2.2.2.2/32
-
te0/0/0 20.20.20.2/30
-
te0/0/1 10.200.23.1/30
-
-
ASR-3
-
loopback0 :3.3.3.3/32
-
te0/0/0 10.200.23.2/30
-
te0/0/1 10.200.13.2/30
-
-
ASR-11 loopback0 :10.255.255.154/32
-
ASR-12 loopback0 :10.255.255.155/32
-
ASR-13 loopback0 :10.255.255.155/32
ASR涉及配置
-
ASR-1 配置port-channel mc-lag!redundancymode ssointerchassis group 1000monitor peer bfdmember ip 20.20.20.2mlacp node-id 0!pseudowire-class pw-class-VLAN-XCONNECT-Testencapsulation l2tpv3interworking ethernetstatus peer topology dual-homedip local interface Loopback0ip tos value 128!interface TenGigabitEthernet0/1/0description MC-Lag Trunk (CENTEC-1,eth-0-40; 01Jul2021)mtu 9216no ip addresslacp rate fastchannel-group 1 mode active!interface Port-channel1description Test MC-LAG (CENTEC-1,agg1; 01Jul2021)mtu 9216no ip addresslacp fast-switchoverlacp max-bundle 1mlacp interchassis group 1000!interface Loopback0ip address 1.1.1.1 255.255.255.255!interface Port-channel1.1000description MC-LAG VLAN 1000 testencapsulation dot1Q 1000no ip redirectsno ip proxy-arpxconnect 3.3.3.3 4000001000 encapsulation l2tpv3 pw-class pw-class-VLAN-XCONNECT-Test!interface TenGigabitEthernet0/0/0description Peer-Link Trunk (ASR-2,t0/0/0; 01Jul2021)mtu 9216ip address 20.20.20.1 255.255.255.252mpls ip!interface TenGigabitEthernet0/0/1description VLAN Trunk (ASR-3,t0/0/1; 01Jul2021)mtu 9216ip address 10.200.13.1 255.255.255.252mpls ip!router ospf 10router-id 1.1.1.1network 1.1.1.1 0.0.0.0 area 0network 10.200.13.1 0.0.0.0 area 0network 20.20.20.1 0.0.0.0 area 0
-
ASR-2 配置port-channel mc-lag!redundancymode ssointerchassis group 1000monitor peer bfdmember ip 20.20.20.1mlacp node-id 1!interface TenGigabitEthernet0/1/0description MC-Lag Trunk (CTC2,eth-0-40; 01Jul2021)mtu 9216no ip addresslacp rate fastchannel-group 1 mode active!interface Port-channel1description Test Mc-LAG (CENTEC-2,agg1; 01Jul2021)mtu 9216no ip addresslacp fast-switchovermlacp interchassis group 1000!pseudowire-class pw-class-VLAN-XCONNECT-Testencapsulation l2tpv3interworking ethernetstatus peer topology dual-homedip local interface Loopback0ip tos value 128!interface Loopback0ip address 2.2.2.2 255.255.255.255!interface Port-channel1.1000description description MC-LAG VLAN 1000 Backup testencapsulation dot1Q 1000no ip redirectsno ip proxy-arpxconnect 3.3.3.3 4000001000 encapsulation l2tpv3 pw-class pw-class-VLAN-XCONNECT-Test!interface TenGigabitEthernet0/0/0description Peer-Link Trunk (ASR-2,t0/0/0; 01Jul2021)mtu 9216ip address 20.20.20.2 255.255.255.252mpls ip!interface TenGigabitEthernet0/0/1description VLAN Trunk (ASR-3,t0/0/0; 01Jul2021)mtu 9216ip address 10.200.23.1 255.255.255.252mpls ip!router ospf 10router-id 2.2.2.2network 2.2.2.2 0.0.0.0 area 0network 10.200.23.1 0.0.0.0 area 0network 20.20.20.2 0.0.0.0 area 0
-
R3 配置:pseudowire-class pw-class-VLAN-XCONNECT-Testencapsulation l2tpv3interworking ethernetstatus peer topology dual-homedip local interface Loopback0ip tos value 128!interface Loopback0ip address 3.3.3.3 255.255.255.255!interface TenGigabitEthernet0/0/0description VLAN Trunk (R2,t0/0/1; 01Jul2021)mtu 9216ip address 10.200.23.2 255.255.255.252mpls ip!interface TenGigabitEthernet0/0/1description VLAN Trunk (R1,t0/0/1; 01Jul2021)mtu 9216ip address 10.200.13.2 255.255.255.252mpls ip!interface GigabitEthernet0/0/4description VLAN Trunk (客户端A)mtu 9216no ip addressnegotiation auto!interface GigabitEthernet0/0/4.1000encapsulation dot1Q 1000no ip redirectsno ip proxy-arpxconnect 1.1.1.1 4000001000 encapsulation l2tpv3 pw-class pw-class-VLAN-XCONNECT-Testbackup peer 2.2.2.2 4000001000 pw-class pw-class-VLAN-XCONNECT-Test
-
ASR-11,ASR-12,ASR-13 建立的X-Connect隧道的配置跟ASR-1,ASR-2,ASR-3一样
-
盛科交换机配置
-
CENTEC-1配置:vlan databasevlan 1000 name test!interface eth-0-40description MC-Lag Trunk (ASR-1,t0/1/0; 01Jul2021)switchport mode trunkswitchport trunk allowed vlan add 1000channel-group 1 mode activelacp port-priority 10 //接口优先级保证为主,越低越优先,cisco设备接口下的lacp值并不生效lacp timeout short!interface eth-0-25description Peer-Link (CTC2.eth-0-25; 01Jul2021)switchport mode trunkswitchport trunk allowed vlan all //设置Peer-link 接口需要透传所有的VLANspanning-tree port disable //设置Peer-link 接口需要关闭生成树协议!interface eth-0-24description VLAN Trunk (ASR-111,t0/1/0; 02Jul2021)switchport mode trunkswitchport trunk allowed vlan add 1000!interface agg1switchport mode trunkswitchport trunk allowed vlan add 1000mlag 1 //将接口加入到mlag id 为1中,只有聚合口才能加入到mlag id中
-
CENTEC-2配置:vlan databasevlan 1000 name test!interface eth-0-40description MC-Lag Trunk (ASR-2,t0/1/0; 01Jul2021)switchport mode trunkswitchport trunk allowed vlan add 1000channel-group 1 mode activelacp timeout short!interface eth-0-25description Peer-Link (CENTEC-2.eth-0-25; 01Jul2021)switchport mode trunkswitchport trunk allowed vlan all //设置Peer-link 接口需要透传所有的VLANspanning-tree port disable //设置Peer-link 接口需要关闭生成树协议!interface eth-0-24description VLAN Trunk (ASR-12,t0/1/0; 02Jul2021)switchport mode trunkswitchport trunk allowed vlan add 1000!interface agg1switchport mode trunkswitchport trunk allowed vlan add 1000mlag 1 //将接口加入到mlag id 为1中,只有聚合口才能加入到mlag id中!interface vlan4000 //设置Peer-link ip 并且在同一个网段内,不可为loopback地址ip address 10.10.10.2/30!mlag configurationpeer-link eth-0-25 //设置Peer-link 接口peer-address 10.10.10.2 //设置mlag peertimers mlag 1 5 //设置mlag peer keeplive 时间为1 holdtime时间为5,holdtime时间不能小于4倍的keeplive时间exit!
-
MC-LAG 主备情况
-
ASR-1,CENTEC-1 为主,ASR-2,CENTEC-2为备
-
ASR-11#show lacp multi-chassis port-channel 1Interface Port-channel1Local Configuration:Address: 7cad.4f42.1f40Channel Group: 1State: ActiveLAG State: UpPriority: 32783Inactive Links: 0Total Active Links: 1Bundled: 1Selected: 1Standby: 0Unselected: 0Peer Configuration:Interface: Port-channel1Address: a03d.6eba.57c0Channel Group: 1State: StandbyLAG State: UpPriority: 32784Inactive Links: 0Total Active Links: 1Bundled: 0Selected: 0Standby: 1Unselected: 0ASR-1#show etherchannel summaryFlags: D - down P/bndl - bundled in port-channelI - stand-alone s/susp - suspendedH - Hot-standby (LACP only)R - Layer3 S - Layer2U - in use f - failed to allocate aggregatorM - not in use, minimum links not metu - unsuitable for bundlingw - waiting to be aggregatedd - default portNumber of channel-groups in use: 1Number of aggregators: 1Group Port-channel Protocol Ports------+-------------+-----------+-----------------------------------------------1 Po1(RU) LACP Te0/1/0(bndl-act)CENTEC-1# show mlag interfacemlagid local-if local-state remote-state1 agg1 up downCENTEC-1# show mlag peerMLAG neighbor is 10.10.10.2, MLAG version 1MLAG state = Established, up for 23:03:54Last read 00:00:30, hold time is 240, keepalive interval is 60 secondsConfigured hold time is 5, keepalive interval is 1 secondsReceived 1734 messages,Sent 1961 messagesOpen : received 1, sent 2KAlive : received 1603, sent 1603Fdb sync : received 103, sent 328Failover : received 20, sent 21Conf : received 1, sent 1Syspri : received 1, sent 1Peer fdb : received 5, sent 5Connections established 1; dropped 0Local host: 10.10.10.1, Local port: 61000Foreign host: 10.10.10.2, Foreign port: 61001remote_sysid: 001e.0822.9b1cCENTEC-1# show mlag 这个命令只是查看盛科内部主备情况,不做为两者MC-LAG主备的判断条件,这个主备是通过mac地址大master,mlag系统使用lacp system-id 用的是master设备的MLAG configuration:-----------------role : Masterlocal_sysid : 001e.0822.9c48remote_sysid : 001e.0822.9b1cmlag_sysid : 001e.0822.9c48local_syspri : 32768remote_syspri: 32768mlag_syspri : 32768peer-link : eth-0-25peer conf : Yesreload-delay : Auto(300s)ASR-2#show lacp multi-chassis port-channel 1Interface Port-channel1Local Configuration:Address: a03d.6eba.57c0Channel Group: 1State: StandbyLAG State: UpPriority: 32784Inactive Links: 0Total Active Links: 1Bundled: 0Selected: 0Standby: 1Unselected: 0Peer Configuration:Interface: Port-channel1Address: 7cad.4f42.1f40Channel Group: 1State: ActiveLAG State: UpPriority: 32783Inactive Links: 0Total Active Links: 1Bundled: 1Selected: 1Standby: 0Unselected: 0ASR-2#show etherchannel summaryFlags: D - down P/bndl - bundled in port-channelI - stand-alone s/susp - suspendedH - Hot-standby (LACP only)R - Layer3 S - Layer2U - in use f - failed to allocate aggregatorM - not in use, minimum links not metu - unsuitable for bundlingw - waiting to be aggregatedd - default portNumber of channel-groups in use: 1Number of aggregators: 1Group Port-channel Protocol Ports------+-------------+-----------+-----------------------------------------------1 Po1(RU) LACP Te0/1/0(bndl-sby)RU - L3 port-channel UP StateSU - L2 port-channel UP stateP/bndl - BundledS/susp - SuspendedCENTEC-2# show mlag interfacemlagid local-if local-state remote-state1 agg1 down upCENTEC-2# show mlag peerMLAG neighbor is 10.10.10.1, MLAG version 1MLAG state = Established, up for 23:12:07Last read 00:00:51, hold time is 240, keepalive interval is 60 secondsConfigured hold time is 5, keepalive interval is 1 secondsReceived 1969 messages,Sent 1745 messagesOpen : received 1, sent 1KAlive : received 1612, sent 1612Fdb sync : received 328, sent 105Failover : received 21, sent 20Conf : received 1, sent 1Syspri : received 1, sent 1Peer fdb : received 5, sent 5Connections established 1; dropped 0Local host: 10.10.10.2, Local port: 61001Foreign host: 10.10.10.1, Foreign port: 61000remote_sysid: 001e.0822.9c48CENTEC-2# show mlag 这个命令只是查看盛科内部主备情况,不做为两者MC-LAG主备的判断条件MLAG configuration:-----------------role : Slavelocal_sysid : 001e.0822.9b1cremote_sysid : 001e.0822.9c48mlag_sysid : 001e.0822.9c48local_syspri : 32768remote_syspri: 32768mlag_syspri : 32768peer-link : eth-0-25peer conf : Yesreload-delay : Auto(300s)
-
测试连通性
正常情况下
-
客户端Z#ping vrf vrf-test-02 192.168.12.2 source 192.168.12.1 re 100Type escape sequence to abort.Sending 100, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Packet sent with a source address of 192.168.12.1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Success rate is 100 percent (100/100), round-trip min/avg/max = 104/106/240 ms#ping vrf vrf--test-02 192.168.12.2 source 192.168.12.1 re 100 size 1998 df-bit //客户A端设备最大mtu1998Type escape sequence to abort.Sending 100, 1998-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Packet sent with a source address of 192.168.12.1Packet sent with the DF bit set!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Success rate is 100 percent (100/100), round-trip min/avg/max = 104/107/184 ms
-
故障切换
-
1:模拟将ASR-1跟CENTEC-1之间的端口关掉,切到备线 测试连通性客户端Z#ping vrf vrf-test-02 192.168.12.2 source 192.168.12.1 re 3000Type escape sequence to abort.Sending 3000, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Packet sent with a source address of 192.168.12.1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!..!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Success rate is 99 percent (847/849), round-trip min/avg/max = 104/105/120 msMC-LAG状态:ASR-1#show lacp multi-chassis port-channel 1Interface Port-channel1Local Configuration:Address: 7cad.4f42.1f40Channel Group: 1State: DownLAG State: FailedFail Flags: 0x2Priority: 32789Inactive Links: 1Total Active Links: 0Bundled: 0Selected: 0Standby: 0Unselected: 0Peer Configuration:Interface: Port-channel1Address: a03d.6eba.57c0Channel Group: 1State: ActiveLAG State: UpPriority: 32788Inactive Links: 0Total Active Links: 1Bundled: 1Selected: 1Standby: 0Unselected: 0CENTEC-1# show mlag interfacemlagid local-if local-state remote-state1 agg1 down upR2#show lacp multi-chassis port-channel 1Interface Port-channel1Local Configuration:Address: a03d.6eba.57c0Channel Group: 1State: ActiveLAG State: UpPriority: 32788Inactive Links: 0Total Active Links: 1Bundled: 1Selected: 1Standby: 0Unselected: 0Peer Configuration:Interface: Port-channel1Address: 7cad.4f42.1f40Channel Group: 1State: DownLAG State: UpPriority: 32789Inactive Links: 1Total Active Links: 0Bundled: 0Selected: 0Standby: 0Unselected: 0CTC2# show mlag interfacemlagid local-if local-state remote-state1 agg1 up down2:主线恢复,切回去,大概丢一个包:客户端Z#ping vrf vrf--test-02 192.168.12.2 source 192.168.12.1 re 3000Type escape sequence to abort.Sending 3000, 100-byte ICMP Echos to 192.168.12.2, timeout is 2 seconds:Packet sent with a source address of 192.168.12.1!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Success rate is 99 percent (1456/1457), round-trip min/avg/max = 104/105/240 ms