Configuration
PE1#
/* If logical systems are used for the lab, then
* The physical interface encapsulation (ethernet-ccc) is configured
* at the global level - NOT at logical system level
*/
interface {
ge-1/1/0 {
encapsulation ethernet-ccc;
unit 0 {
description "PE1->CE1 | Physical interface";
}
}
}
protocols {
mpls {
/* PE1->P1 */
interface lt-0/0/10.1101;
}
bgp {
group PE2 {
type internal;
local-address 11.11.11.11;
family l2vpn {
signaling;
}
neighbor 12.12.12.12;
}
}
ospf {
area 0.0.0.0 {
/* PE1->P1 */
interface lt-0/0/10.1101;
/* PE1 Loopback */
interface lo0.11;
}
}
ldp {
/* PE1->P1 */
interface lt-0/0/10.1101;
/* PE1 Loopback */
interface lo0.11;
}
}
routing-instances {
L2VPN_1 {
instance-type l2vpn;
interface ge-1/1/0.0;
route-distinguisher 11.11.11.11:1001;
vrf-target target:100:1001;
protocols {
l2vpn {
encapsulation-type ethernet;
interface ge-1/1/0.0;
site CE1 {
site-identifier 1;
interface ge-1/1/0.0;
}
}
}
}
}
PE2#
/* If logical systems are used for the lab, then
* The physical interface encapsulation (ethernet-ccc) is configured
* at the global level - NOT at logical system level
*/
interface {
ge-1/1/1 {
encapsulation ethernet-ccc;
unit 0 {
description "PE2->CE2 | Physical interface";
}
}
}
protocols {
mpls {
/* PE2->P3 */
interface lt-0/0/10.123;
}
bgp {
group PE1 {
type internal;
local-address 12.12.12.12;
family l2vpn {
signaling;
}
neighbor 11.11.11.11;
}
}
ospf {
area 0.0.0.0 {
/* PE2->P3 */
interface lt-0/0/10.123;
/* PE2 Loopback */
interface lo0.12;
}
}
ldp {
/* PE2->P3 */
interface lt-0/0/10.123;
/* PE2 Loopback */
interface lo0.12;
}
}
routing-instances {
L2VPN_1 {
instance-type l2vpn;
interface ge-1/1/1.0;
route-distinguisher 12.12.12.12:1001;
vrf-target target:100:1001;
protocols {
l2vpn {
encapsulation-type ethernet;
site CE2 {
site-identifier 2;
interface ge-1/1/1.0 {
remote-site-id 1;
}
}
}
}
}
}
Verification
pe1@MX:PE1> show bgp summary
Groups: 1 Peers: 1 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
bgp.l2vpn.0
1 1 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
12.12.12.12 100 63 64 0 0 26:27 Establ
bgp.l2vpn.0: 1/1/1/0
L2VPN_1.l2vpn.0: 1/1/1/0
pe1@MX:PE1> show route receive-protocol bgp 12.12.12.12 detail
inet.0: 24 destinations, 25 routes (24 active, 0 holddown, 0 hidden)
inet.3: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
mpls.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
bgp.l2vpn.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
* 12.12.12.12:1001:2:1/96 (1 entry, 0 announced)
Import Accepted
Route Distinguisher: 12.12.12.12:1001
Label-base: 800000, range: 2, status-vector: 0x0
Nexthop: 12.12.12.12
Localpref: 100
AS path: I
Communities: target:100:1001 Layer2-info: encaps:ETHERNET, control flags:Control-Word, mtu: 0, site preference: 100
L2VPN_1.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
* 12.12.12.12:1001:2:1/96 (1 entry, 1 announced)
Import Accepted
Route Distinguisher: 12.12.12.12:1001
Label-base: 800000, range: 2, status-vector: 0x0
Nexthop: 12.12.12.12
Localpref: 100
AS path: I
Communities: target:100:1001 Layer2-info: encaps:ETHERNET, control flags:Control-Word, mtu: 0, site preference: 100
pe1@MX:PE1> show route table l2vpn
L2VPN_1.l2vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
11.11.11.11:1001:1:1/96
*[L2VPN/170/-101] 00:08:09, metric2 1
Indirect
12.12.12.12:1001:2:1/96
*[BGP/170] 00:08:09, localpref 100, from 12.12.12.12
AS path: I
> to 100.1.11.1 via lt-0/0/10.1101, Push 300016
pe1@MX:PE1> show l2vpn connections | find L2VPN_1
Instance: L2VPN_1
Local site: CE1 (1)
connection-site Type St Time last up # Up trans
2 rmt Up Jul 20 06:13:15 2014 1
Remote PE: 12.12.12.12, Negotiated control-word: Yes (Null)
Incoming label: 800001, Outgoing label: 800000
Local interface: ge-1/1/0.0, Status: Up, Encapsulation: ETHERNET