system { host-name PE1; } interfaces { ge-0/0/0 { encapsulation flexible-ethernet-services; flexible-vlan-tagging; unit 10 { encapsulation vlan-vpls; vlan-id 10; } } ge-0/0/1 { mtu 2000; unit 0 { family inet { address 10.0.11.1/30; } family mpls; } } ge-0/0/2 { mtu 2000; unit 0 { family inet { address 10.0.12.1/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.0.0.1/32; } } } } routing-options { router-id 10.0.0.1; autonomous-system 65412; } protocols { rsvp { interface lo0.0; interface ge-0/0/1.0; interface ge-0/0/2.0; } mpls { label-switched-path PE1-PE2 { to 10.0.0.2; no-cspf; } label-switched-path PE1-PE3 { to 10.0.0.3; no-cspf; } label-switched-path PE1-PE4 { to 10.0.0.4; no-cspf; } interface ge-0/0/1.0; interface ge-0/0/2.0; } ospf { area 0.0.0.0 { interface ge-0/0/1.0 { interface-type p2p; } interface ge-0/0/2.0 { interface-type p2p; } interface lo0.0; } } }
system { host-name P1; } interfaces { ge-0/0/0 { mtu 2000; unit 0 { family inet { address 10.0.11.2/30; } family mpls; } } ge-0/0/1 { mtu 2000; unit 0 { family inet { address 10.0.13.2/30; } family mpls; } } ge-0/0/2 { mtu 2000; unit 0 { family inet { address 10.0.21.1/30; } family mpls; } } lo0 { unit 0 { family inet { address 10.0.0.11/32; } } } } routing-options { router-id 10.0.0.11; autonomous-system 65412; } protocols { rsvp { interface lo0.0; interface ge-0/0/0.0; interface ge-0/0/1.0; interface ge-0/0/2.0; } mpls { interface ge-0/0/0.0; interface ge-0/0/1.0; interface ge-0/0/2.0; } ospf { area 0.0.0.0 { interface ge-0/0/0.0 { interface-type p2p; } interface ge-0/0/1.0 { interface-type p2p; } interface ge-0/0/2.0 { interface-type p2p; } interface lo0.0; } } }
lab@PE1> traceroute mpls rsvp PE1-PE2 Probe options: retries 3, exp 7 ttl Label Protocol Address Previous Hop Probe Status 1 10.0.12.2 (null) Egress Path 1 via ge-0/0/2.0 destination 127.0.0.64 lab@PE1> traceroute mpls rsvp PE1-PE3 Probe options: retries 3, exp 7 ttl Label Protocol Address Previous Hop Probe Status 1 299888 RSVP-TE 10.0.11.2 (null) Success 2 3 RSVP-TE 10.0.13.1 10.0.11.2 Egress Path 1 via ge-0/0/1.0 destination 127.0.0.64 lab@PE1> traceroute mpls rsvp PE1-PE4 Probe options: retries 3, exp 7 ttl Label Protocol Address Previous Hop Probe Status 1 299936 RSVP-TE 10.0.11.2 (null) Success 2 299792 RSVP-TE 10.0.13.1 10.0.11.2 Success 3 3 RSVP-TE 10.0.34.2 10.0.13.1 Egress Path 1 via ge-0/0/1.0 destination 127.0.0.64
hostname CE1 ! spanning-tree mode rapid-pvst spanning-tree extend system-id ! vlan 10 ! interface GigabitEthernet0/0 switchport trunk allowed vlan 10 switchport trunk encapsulation dot1q switchport mode trunk ! interface Vlan10 ip address 192.168.10.1 255.255.255.0 no shutdown !
hostname CE2 ! spanning-tree mode rapid-pvst spanning-tree extend system-id ! vlan 10 ! interface GigabitEthernet0/0 switchport trunk allowed vlan 10 switchport trunk encapsulation dot1q switchport mode trunk ! interface Vlan10 ip address 192.168.10.2 255.255.255.0 no shutdown !
hostname CE3 ! spanning-tree mode rapid-pvst spanning-tree extend system-id ! vlan 10 ! interface GigabitEthernet0/0 switchport trunk allowed vlan 10 switchport trunk encapsulation dot1q switchport mode trunk ! interface GigabitEthernet0/1 switchport trunk allowed vlan 10 switchport trunk encapsulation dot1q switchport mode trunk ! interface Vlan10 ip address 192.168.10.3 255.255.255.0 no shutdown !
protocols { bgp { group IBGP { type internal; local-address 10.0.0.X; family l2vpn { signaling; } neighbor 10.0.0.11; neighbor 10.0.0.22; } } }
routing-options { rib inet.3 { static { route 10.0.0.0/24 discard; } } } protocols { bgp { group IBGP { type internal; local-address 10.0.0.11; family l2vpn { signaling; } cluster 10.0.0.0; neighbor 10.0.0.1; neighbor 10.0.0.2; neighbor 10.0.0.3; neighbor 10.0.0.4; } } }
routing-options { rib inet.3 { static { route 10.0.0.0/24 discard; } } } protocols { bgp { group IBGP { type internal; local-address 10.0.0.22; family l2vpn { signaling; } cluster 10.0.0.0; neighbor 10.0.0.1; neighbor 10.0.0.2; neighbor 10.0.0.3; neighbor 10.0.0.4; } } }
routing-instances { VPLS { instance-type vpls; interface ge-0/0/0.10; route-distinguisher 10.0.0.1:1; vrf-target target:65412:10; protocols { vpls { no-tunnel-services; site CE1 { site-identifier 1; interface ge-0/0/0.10; } } } } }
routing-instances { VPLS { instance-type vpls; interface ge-0/0/0.10; route-distinguisher 10.0.0.2:1; vrf-target target:65412:10; protocols { vpls { no-tunnel-services; site CE2 { site-identifier 2; interface ge-0/0/0.10; } } } } }
lab@PE1> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS Local site: CE1 (1) connection-site Type St Time last up # Up trans 2 rmt Up May 30 17:29:28 2015 1 Remote PE: 10.0.0.2, Negotiated control-word: No Incoming label: 262146, Outgoing label: 262145 Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 1 remote site 2
lab@PE2> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS Local site: CE2 (2) connection-site Type St Time last up # Up trans 1 rmt Up May 30 17:29:30 2015 1 Remote PE: 10.0.0.1, Negotiated control-word: No Incoming label: 262145, Outgoing label: 262146 Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 2 remote site 1
CE1>ping 192.168.10.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 10/119/207 ms
routing-instances { VPLS { instance-type vpls; interface ge-0/0/0.10; route-distinguisher 10.0.0.3:1; vrf-target target:65412:10; protocols { vpls { no-tunnel-services; site CE3 { site-identifier 3; multi-homing; site-preference primary; interface ge-0/0/0.10; } } } } }
routing-instances { VPLS { instance-type vpls; interface ge-0/0/0.10; route-distinguisher 10.0.0.4:1; vrf-target target:65412:10; protocols { vpls { no-tunnel-services; site CE3 { site-identifier 3; multi-homing; site-preference backup; interface ge-0/0/0.10; } } } } }
lab@PE1> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS Local site: CE1 (1) connection-site Type St Time last up # Up trans 2 rmt Up May 30 17:29:28 2015 1 Remote PE: 10.0.0.2, Negotiated control-word: No Incoming label: 262146, Outgoing label: 262145 Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 1 remote site 2 3 rmt Up May 30 20:16:41 2015 1 Remote PE: 10.0.0.3, Negotiated control-word: No Incoming label: 262147, Outgoing label: 262145 Local interface: lsi.1048579, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 1 remote site 3
lab@PE2> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS Local site: CE2 (2) connection-site Type St Time last up # Up trans 1 rmt Up May 30 17:29:30 2015 1 Remote PE: 10.0.0.1, Negotiated control-word: No Incoming label: 262145, Outgoing label: 262146 Local interface: lsi.1048576, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 2 remote site 1 3 rmt Up May 30 20:16:42 2015 1 Remote PE: 10.0.0.3, Negotiated control-word: No Incoming label: 262147, Outgoing label: 262146 Local interface: lsi.1048578, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 2 remote site 3
lab@PE3> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS Local site: CE3 (3) connection-site Type St Time last up # Up trans 1 rmt Up May 30 20:16:35 2015 1 Remote PE: 10.0.0.1, Negotiated control-word: No Incoming label: 262145, Outgoing label: 262147 Local interface: lsi.1048833, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 3 remote site 1 2 rmt Up May 30 20:16:35 2015 1 Remote PE: 10.0.0.2, Negotiated control-word: No Incoming label: 262146, Outgoing label: 262147 Local interface: lsi.1048832, Status: Up, Encapsulation: VPLS Description: Intf - vpls VPLS local site 3 remote site 2 3 rmt RN
lab@PE4> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS Local site: CE3 (3) connection-site Type St Time last up # Up trans 1 rmt LN 2 rmt LN 3 rmt LN
routing-instances { STP { instance-type layer2-control; protocols { vstp { interface ge-0/0/0 { mode point-to-point; no-root-port; } vlan 10 { bridge-priority 24k; } } } } }
routing-instances { STP { instance-type layer2-control; protocols { vstp { interface ge-0/0/0 { mode point-to-point; no-root-port; } vlan 10 { bridge-priority 28k; } } } } }
lab@PE1> show spanning-tree interface ge-0/0/0 routing-instance STP Spanning tree interface parameters for VLAN 10 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ge-0/0/0 128:1 128:1 24586.00058671c3d0 20000 FWD DESG
lab@PE2> show spanning-tree interface ge-0/0/0 routing-instance STP Spanning tree interface parameters for VLAN 10 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ge-0/0/0 128:1 128:1 32778.500000080000 20000 BLK ALT (Root-Prev)
protocols { ldp { interface lo0.0; } } routing-instances { VPLS { instance-type vpls; interface ge-0/0/0.10; protocols { vpls { no-tunnel-services; vpls-id 1; mac-flush; neighbor 10.0.0.2; neighbor 10.0.0.3; neighbor 10.0.0.4; } } } }
lab@PE1> show ldp neighbor Address Interface Label space ID Hold time 10.0.0.2 lo0.0 10.0.0.2:0 33 10.0.0.3 lo0.0 10.0.0.3:0 44 10.0.0.4 lo0.0 10.0.0.4:0 41
lab@PE1> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS VPLS-id: 1 Neighbor Type St Time last up # Up trans 10.0.0.2(vpls-id 1) rmt Up May 30 23:50:32 2015 1 Remote PE: 10.0.0.2, Negotiated control-word: No Incoming label: 262401, Outgoing label: 262401 Negotiated PW status TLV: No Local interface: lsi.1048580, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls VPLS neighbor 10.0.0.2 vpls-id 1 Flow Label Transmit: No, Flow Label Receive: No 10.0.0.3(vpls-id 1) rmt Up May 30 23:51:49 2015 1 Remote PE: 10.0.0.3, Negotiated control-word: No Incoming label: 262402, Outgoing label: 262401 Negotiated PW status TLV: No Local interface: lsi.1048581, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls VPLS neighbor 10.0.0.3 vpls-id 1 Flow Label Transmit: No, Flow Label Receive: No 10.0.0.4(vpls-id 1) rmt Up May 30 23:52:00 2015 1 Remote PE: 10.0.0.4, Negotiated control-word: No Incoming label: 262403, Outgoing label: 262401 Negotiated PW status TLV: No Local interface: lsi.1048582, Status: Up, Encapsulation: ETHERNET Description: Intf - vpls VPLS neighbor 10.0.0.4 vpls-id 1 Flow Label Transmit: No, Flow Label Receive: No
lab@PE2> show vpls connections Layer-2 VPN connections: <...> Instance: VPLS VPLS-id: 1 Neighbor Type St Time last up # Up trans 10.0.0.1(vpls-id 1) rmt ST 10.0.0.3(vpls-id 1) rmt ST 10.0.0.4(vpls-id 1) rmt ST
CE3>ping 192.168.10.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/14/18 ms
lab@PE3> show vpls mac-table MAC flags (S -static MAC, D -dynamic MAC, L -locally learned, C -Control MAC SE -Statistics enabled, NM -Non configured MAC, R -Remote PE MAC) Routing instance : VPLS Bridging domain : __VPLS__, VLAN : NA MAC MAC Logical NH RTR address flags interface Index ID 50:00:00:08:80:0a D lsi.1049088 50:00:00:09:80:0a D ge-0/0/0.10
lab@PE1> show spanning-tree interface ge-0/0/0 routing-instance STP Spanning tree interface parameters for VLAN 10 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ge-0/0/0 128:1 128:1 24586.00058671c3d0 20000 FWD DESG
lab@PE2> show spanning-tree interface ge-0/0/0 routing-instance STP Spanning tree interface parameters for VLAN 10 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ge-0/0/0 128:1 128:1 28682.0005867142d0 20000 FWD DESG
CE3>ping 192.168.10.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 7/13/19 ms
lab@PE3> show vpls mac-table MAC flags (S -static MAC, D -dynamic MAC, L -locally learned, C -Control MAC SE -Statistics enabled, NM -Non configured MAC, R -Remote PE MAC) Routing instance : VPLS Bridging domain : __VPLS__, VLAN : NA MAC MAC Logical NH RTR address flags interface Index ID 50:00:00:08:80:0a D lsi.1049089 50:00:00:09:80:0a D ge-0/0/0.10
Source: https://habr.com/ru/post/259645/