This article provides an example of configuring l2circuit with a backup neighbor that has the same virtual-circuit-id.
Note: Having the same virtual-circuit-id does not necessarily cause any behavior change but could contribute to ease of troubleshooting.
Topology
In the above topology:
On one end is the customer device that is connected to a provider edge (PE) device
On the other end, the other customer edge (CE) device is connected to two PE devices via the switch for redundancy with the primary and backup connections.
The CE and PE device configurations for availing of l2circuit services are as follows:
CE1 configuration
set interfaces ge-1/2/0 unit 0 family inet address 12.0.0.1/24 set interfaces lo0 unit 1 family inet address 1.1.1.1/32
CE2 configuration
set interfaces ge-1/3/5 unit 0 family inet address 12.0.0.2/24 set interfaces lo0 unit 7 family inet address 7.7.7.7/32
P12 configuration
set P12 interfaces ge-1/2/3 unit 0 family inet address 23.0.0.3/24 set P12 interfaces ge-1/2/3 unit 0 family mpls set P12 interfaces ge-1/2/4 unit 0 family inet address 34.0.0.3/24 set P12 interfaces ge-1/2/4 unit 0 family mpls set P12 interfaces lo0 unit 3 family inet address 3.3.3.3/32 set P12 interfaces lo0 unit 3 family mpls set P12 protocols mpls interface ge-1/2/3.0 set P12 protocols mpls interface ge-1/2/4.0 set P12 protocols mpls interface lo0.3 set P12 protocols ospf area 0.0.0.0 interface ge-1/2/3.0 set P12 protocols ospf area 0.0.0.0 interface ge-1/2/4.0 set P12 protocols ospf area 0.0.0.0 interface lo0.3 set P12 protocols ldp interface ge-1/2/3.0 set P12 protocols ldp interface ge-1/2/4.0 set P12 protocols ldp interface lo0.3
P13 configuration
set P13 interfaces ge-1/2/7 unit 0 family inet address 25.0.0.5/24 set P13 interfaces ge-1/2/7 unit 0 family mpls set P13 interfaces ge-1/2/8 unit 0 family inet address 56.0.0.5/24 set P13 interfaces ge-1/2/8 unit 0 family mpls set P13 interfaces lo0 unit 5 family inet address 5.5.5.5/32 set P13 interfaces lo0 unit 5 family mpls set P13 protocols mpls interface ge-1/2/7.0 set P13 protocols mpls interface ge-1/2/8.0 set P13 protocols mpls interface lo0.5 set P13 protocols ospf area 0.0.0.0 interface ge-1/2/7.0 set P13 protocols ospf area 0.0.0.0 interface ge-1/2/8.0 set P13 protocols ospf area 0.0.0.0 interface lo0.5 set P13 protocols ldp interface ge-1/2/7.0 set P13 protocols ldp interface ge-1/2/8.0 set P13 protocols ldp interface lo0.5
PE1 configuration
set interfaces ge-1/2/1 encapsulation ethernet-ccc set interfaces ge-1/2/1 unit 0 set interfaces ge-1/2/2 unit 0 family inet address 23.0.0.2/24 set interfaces ge-1/2/2 unit 0 family mpls set interfaces ge-1/2/6 unit 0 family inet address 25.0.0.2/24 set interfaces ge-1/2/6 unit 0 family mpls set interfaces lo0 unit 2 family inet address 2.2.2.2/32 set interfaces lo0 unit 2 family mpls set protocols mpls interface ge-1/2/2.0 set protocols mpls interface ge-1/2/6.0 set protocols mpls interface lo0.2 set protocols ospf area 0.0.0.0 interface ge-1/2/2.0 set protocols ospf area 0.0.0.0 interface lo0.2 set protocols ospf area 0.0.0.0 interface ge-1/2/6.0 set protocols ldp interface ge-1/2/2.0 set protocols ldp interface ge-1/2/6.0 set protocols ldp interface lo0.2 set protocols l2circuit neighbor 4.4.4.4 interface ge-1/2/1.0 virtual-circuit-id 3 set protocols l2circuit neighbor 4.4.4.4 interface ge-1/2/1.0 encapsulation-type ethernet set protocols l2circuit neighbor 4.4.4.4 interface ge-1/2/1.0 ignore-encapsulation-mismatch set protocols l2circuit neighbor 4.4.4.4 interface ge-1/2/1.0 ignore-mtu-mismatch set protocols l2circuit neighbor 4.4.4.4 interface ge-1/2/1.0 revert-time 30 set protocols l2circuit neighbor 4.4.4.4 interface ge-1/2/1.0 backup-neighbor 6.6.6.6
PE2 configuration
set interfaces ge-1/3/0 encapsulation ethernet-ccc set interfaces ge-1/2/5 unit 0 family inet address 34.0.0.4/24 set interfaces ge-1/2/5 unit 0 family mpls set interfaces ge-1/3/0 unit 0 set interfaces lo0 unit 4 family inet address 4.4.4.4/32 set interfaces lo0 unit 4 family mpls set protocols mpls interface ge-1/2/5.0 set protocols mpls interface lo0.4 set protocols ospf area 0.0.0.0 interface ge-1/2/5.0 set protocols ospf area 0.0.0.0 interface lo0.4 set protocols ldp interface ge-1/2/5.0 set protocols ldp interface lo0.4 set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/0.0 virtual-circuit-id 3 set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/0.0 encapsulation-type ethernet set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/0.0 ignore-encapsulation-mismatch set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/0.0 ignore-mtu-mismatch set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/0.0 revert-time 30
PE3 configuration
set interfaces ge-1/3/2 encapsulation ethernet-ccc set interfaces ge-1/2/9 unit 0 family inet address 56.0.0.6/24 set interfaces ge-1/2/9 unit 0 family mpls set interfaces ge-1/3/2 unit 0 set interfaces lo0 unit 6 family inet address 6.6.6.6/32 set interfaces lo0 unit 6 family mpls set protocols mpls interface ge-1/2/9.0 set protocols mpls interface lo0.6 set protocols ospf area 0.0.0.0 interface lo0.6 set protocols ospf area 0.0.0.0 interface ge-1/2/9.0 set protocols ldp interface ge-1/2/9.0 set protocols ldp interface lo0.6 set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/2.0 virtual-circuit-id 3 set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/2.0 encapsulation-type ethernet set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/2.0 ignore-encapsulation-mismatch set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/2.0 ignore-mtu-mismatch set protocols l2circuit neighbor 2.2.2.2 interface ge-1/3/2.0 revert-time 30
SW configuration
set bridge-domains PW-B domain-type bridge set bridge-domains PW-B interface ge-1/3/1.0 set bridge-domains PW-B interface ge-1/3/3.0 set bridge-domains PW-B interface ge-1/3/4.0 set interfaces ge-1/3/1 encapsulation ethernet-bridge set interfaces ge-1/3/1 unit 0 family bridge set interfaces ge-1/3/3 encapsulation ethernet-bridge set interfaces ge-1/3/3 unit 0 family bridge set interfaces ge-1/3/4 encapsulation ethernet-bridge set interfaces ge-1/3/4 unit 0 family bridge
Results and Verification
We can verify the l2circuit connection status by using the command show l2circuit connection for both the primary and secondary neighbors. The primary will show the status as UP whereas the backup neighbor will show as BK (Backup).
show l2circuit connection
PE1
user@PE1> show l2circuit connections Layer-2 Circuit Connections: Legend for connection status (St) EI -- encapsulation invalid NP -- interface h/w not present MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down CM -- control-word mismatch Up -- operational VM -- vlan id mismatch CF -- Call admission control failure OL -- no outgoing label IB -- TDM incompatible bitrate NC -- intf encaps not CCC/TCC TM -- TDM misconfiguration BK -- Backup Connection ST -- Standby Connection CB -- rcvd cell-bundle size bad SP -- Static Pseudowire LD -- local site signaled down RS -- remote site standby RD -- remote site signaled down HS -- Hot-standby Connection XX -- unknown Legend for interface status Up -- operational Dn -- down Neighbor: 4.4.4.4 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt Up Nov 4 13:43:10 2019 1 Remote PE: 4.4.4.4, Negotiated control-word: Yes (Null) Incoming label: 299936, Outgoing label: 299776 Negotiated PW status TLV: No Local interface: ge-1/2/1.0, Status: Up, Encapsulation: ETHERNET Flow Label Transmit: No, Flow Label Receive: No Neighbor: 6.6.6.6 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt BK
After disabling and enabling interface ge-1/2/5 on PE2 a couple of times and checking for continuous ping on another session, no packet drops were observed:
PE2
user@PE2# set interfaces ge-1/2/5 disable user@PE2# show | compare [edit interfaces] + ge-1/2/5 { + disable; + } user@PE2# commit commit complete user@PE2# rollback 1 load complete user@PE2show | compare [edit interfaces] - ge-1/2/5 { - disable; - } [edit] user@PE2# commit commit complete
When the primary link or neighbor is down, the backup neighbor will come up quickly and traffic will start flowing on the backup link. In this condition, the status of the primary connection will show as "OL" (no outgoing label), which is expected because no labels are received from the primary neighbor to forward traffic. The backup connection will show state as "UP."
user@PE1# run show l2circuit connections Layer-2 Circuit Connections: Legend for connection status (St) EI -- encapsulation invalid NP -- interface h/w not present MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down CM -- control-word mismatch Up -- operational VM -- vlan id mismatch CF -- Call admission control failure OL -- no outgoing label IB -- TDM incompatible bitrate NC -- intf encaps not CCC/TCC TM -- TDM misconfiguration BK -- Backup Connection ST -- Standby Connection CB -- rcvd cell-bundle size bad SP -- Static Pseudowire LD -- local site signaled down RS -- remote site standby RD -- remote site signaled down HS -- Hot-standby Connection XX -- unknown Legend for interface status Up -- operational Dn -- down Neighbor: 4.4.4.4 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt OL Neighbor: 6.6.6.6 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt Up Nov 4 14:04:10 2019 1 Remote PE: 6.6.6.6, Negotiated control-word: Yes (Null) Incoming label: 300016, Outgoing label: 299776 Negotiated PW status TLV: No Local interface: ge-1/2/1.0, Status: Up, Encapsulation: ETHERNET Flow Label Transmit: No, Flow Label Receive: No user@PE1# run show l2circuit connections Layer-2 Circuit Connections: Legend for connection status (St) EI -- encapsulation invalid NP -- interface h/w not present MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down CM -- control-word mismatch Up -- operational VM -- vlan id mismatch CF -- Call admission control failure OL -- no outgoing label IB -- TDM incompatible bitrate NC -- intf encaps not CCC/TCC TM -- TDM misconfiguration BK -- Backup Connection ST -- Standby Connection CB -- rcvd cell-bundle size bad SP -- Static Pseudowire LD -- local site signaled down RS -- remote site standby RD -- remote site signaled down HS -- Hot-standby Connection XX -- unknown Legend for interface status Up -- operational Dn -- down Neighbor: 4.4.4.4 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt Up Nov 4 14:11:04 2019 1 Remote PE: 4.4.4.4, Negotiated control-word: Yes (Null) Incoming label: 300048, Outgoing label: 299776 Negotiated PW status TLV: No Local interface: ge-1/2/1.0, Status: Up, Encapsulation: ETHERNET Flow Label Transmit: No, Flow Label Receive: No Neighbor: 6.6.6.6 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt BK user@PE1# run show l2circuit connections Nov 04 14:14:17 Layer-2 Circuit Connections: Legend for connection status (St) EI -- encapsulation invalid NP -- interface h/w not present MM -- mtu mismatch Dn -- down EM -- encapsulation mismatch VC-Dn -- Virtual circuit Down CM -- control-word mismatch Up -- operational VM -- vlan id mismatch CF -- Call admission control failure OL -- no outgoing label IB -- TDM incompatible bitrate NC -- intf encaps not CCC/TCC TM -- TDM misconfiguration BK -- Backup Connection ST -- Standby Connection CB -- rcvd cell-bundle size bad SP -- Static Pseudowire LD -- local site signaled down RS -- remote site standby RD -- remote site signaled down HS -- Hot-standby Connection XX -- unknown Legend for interface status Up -- operational Dn -- down Neighbor: 4.4.4.4 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt OL Neighbor: 6.6.6.6 Interface Type St Time last up # Up trans ge-1/2/1.0(vc 3) rmt Up Nov 4 14:12:36 2019 1 Remote PE: 6.6.6.6, Negotiated control-word: Yes (Null) Incoming label: 300064, Outgoing label: 299776 Negotiated PW status TLV: No Local interface: ge-1/2/1.0, Status: Up, Encapsulation: ETHERNET Flow Label Transmit: No, Flow Label Receive: No
Parallel Monitoring on Another Window
user@PE1> ping 12.0.0.2 64 bytes from 12.0.0.2: icmp_seq=366 ttl=64 time=4.644 ms 64 bytes from 12.0.0.2: icmp_seq=367 ttl=64 time=27.053 ms 64 bytes from 12.0.0.2: icmp_seq=368 ttl=64 time=0.935 ms 64 bytes from 12.0.0.2: icmp_seq=369 ttl=64 time=1.164 ms <snip> 64 bytes from 12.0.0.2: icmp_seq=370 ttl=64 time=0.934 ms 64 bytes from 12.0.0.2: icmp_seq=371 ttl=64 time=0.915 ms 64 bytes from 12.0.0.2: icmp_seq=372 ttl=64 time=0.926 ms 64 bytes from 12.0.0.2: icmp_seq=373 ttl=64 time=0.905 ms 64 bytes from 12.0.0.2: icmp_seq=374 ttl=64 time=0.935 ms 64 bytes from 12.0.0.2: icmp_seq=375 ttl=64 time=0.893 ms 64 bytes from 12.0.0.2: icmp_seq=376 ttl=64 time=2.198 ms 64 bytes from 12.0.0.2: icmp_seq=377 ttl=64 time=1.242 ms 64 bytes from 12.0.0.2: icmp_seq=378 ttl=64 time=0.904 ms 64 bytes from 12.0.0.2: icmp_seq=379 ttl=64 time=0.872 ms 64 bytes from 12.0.0.2: icmp_seq=380 ttl=64 time=0.901 ms 64 bytes from 12.0.0.2: icmp_seq=381 ttl=64 time=0.938 ms 64 bytes from 12.0.0.2: icmp_seq=382 ttl=64 time=0.924 ms 64 bytes from 12.0.0.2: icmp_seq=383 ttl=64 time=0.903 ms 64 bytes from 12.0.0.2: icmp_seq=384 ttl=64 time=0.904 ms 64 bytes from 12.0.0.2: icmp_seq=385 ttl=64 time=0.902 ms 64 bytes from 12.0.0.2: icmp_seq=386 ttl=64 time=0.936 ms 64 bytes from 12.0.0.2: icmp_seq=387 ttl=64 time=0.895 ms 64 bytes from 12.0.0.2: icmp_seq=388 ttl=64 time=0.930 ms 64 bytes from 12.0.0.2: icmp_seq=389 ttl=64 time=0.885 ms ^C --- 12.0.0.2 ping statistics --- 390 packets transmitted, 389 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.752/1.800/32.411/3.424 ms