Use case

An enterprise wishes to create a private L3 interconnect between two of its remote sites. Each site uses its own private IP range. The two sites are connected to two different service providers. There exist several scenarios to enable this kind of private interconnect (GRE tunnels with or without IPSec, OpenVPN, MPLS, etc). Here, we will focus on an MPLS based solution that requires cooperation between the 2 ISPs (which makes it a very rare case to be found in real life networks).

Configuration

Here is the configuration that enables this scenario.

CE1

Interfaces configuration:

em0 {
vlan-tagging;
unit 18 {
vlan-id 18;
family inet {
address 10.18.0.8/24;
}
}
}
lo0 {
unit 1 {
family inet {
address 192.0.2.1/32;
address 8.8.8.8/32;
}
}
}

BGP Configuration

group ext-65002 {
type external;
export adv-ext-bgp;
peer-as 65002;
neighbor 10.18.0.1 {
local-address 10.18.0.8;
}
}

Routing options configuration:

routing-options {
static {
route 192.0.2.0/24 discard;
}
router-id 8.8.8.8;
autonomous-system 65101;
}

Policy options configuration

policy-options {
policy-statement adv-ext-bgp {
term adv-200 {
from {
route-filter 192.0.2.0/24 exact;
}
then accept;
}
}
}

Routing tables

inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
8.8.8.8/32 *[Direct/0] 00:20:03
> via lo0.1
10.18.0.0/24 *[Direct/0] 00:03:50
> via em0.18
10.18.0.8/32 *[Local/0] 00:03:50
Local via em0.18
192.0.2.0/24 *[Static/5] 00:20:02
Discard
192.0.2.1/32 *[Direct/0] 00:20:03
> via lo0.1
192.168.1.0/24 *[Direct/0] 00:20:03
> via em1.0
192.168.1.18/32 *[Local/0] 00:20:03
Local via em1.0
198.51.100.0/24 *[BGP/170] 00:03:18, localpref 100
AS path: 65002 65003 65002 I, validation-state: unverified
> to 10.18.0.1 via em0.18

Connectivity test CE1 <--> CE2

admin@CE1> ping 198.51.100.1 source 192.0.2.1 
PING 198.51.100.1 (198.51.100.1): 56 data bytes
64 bytes from 198.51.100.1: icmp_seq=0 ttl=58 time=1.263 ms
64 bytes from 198.51.100.1: icmp_seq=1 ttl=58 time=1.273 ms
64 bytes from 198.51.100.1: icmp_seq=2 ttl=58 time=1.443 ms
64 bytes from 198.51.100.1: icmp_seq=3 ttl=58 time=1.071 ms
^C
--- 198.51.100.1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.071/1.262/1.443/0.132 ms

PE1

Interfaces Configuration

em0 {
vlan-tagging;
unit 12 {
description to-p1;
vlan-id 12;
family inet {
address 10.12.0.1/24;
}
family iso;
family mpls;
}
unit 18 {
description to-ce1;
vlan-id 18;
family inet {
address 10.18.0.1/24;
}
}
}
em1 {
unit 0 {
family inet {
address 192.168.1.11/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 1.1.1.1/32;
}
family iso {
address 49.0001.0001.0001.0101.00;
}
}
}

Routing protocols configuration

mpls {
traffic-engineering mpls-forwarding;
interface all;
}
bgp {
group to-pe2 {
type external;
neighbor 5.5.5.5 {
multihop {
ttl 20;
}
local-address 1.1.1.1;
family inet-vpn {
unicast;
}
peer-as 65003;
}
}
}
isis {
interface all {
level 2 disable;
}
}
ldp {
interface all;
}

Routing options configuration

router-id 1.1.1.1;
autonomous-system 65002;

Policy configuration

policy-statement export-vpn-a {
term 1 {
from protocol bgp;
then {
community add vpn-a;
accept;
}
}
term 2 {
then reject;
}
}
policy-statement import-vpn-a {
term 1 {
from community vpn-a;
then accept;
}
term 2 {
then reject;
}
}
community target:65101:101 members target:65101:101;
community vpn-a members target:65101:101;

Routing instances configuration

vpn-a {
instance-type vrf;
interface em0.18;
route-distinguisher 1.1.1.1:1;
vrf-import import-vpn-a;
vrf-export export-vpn-a;
protocols {
bgp {
group ext-bgp-65001 {
type external;
peer-as 65101;
as-override;
neighbor 10.18.0.8;
}
}
}
}

Routing tables

inet.0: 10 destinations, 13 routes (10 active, 0 holddown, 0 hidden)
@ = Routing Use Only, # = Forwarding Use Only
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[Direct/0] 02:04:25
> via lo0.0
2.2.2.2/32 @[IS-IS/15] 00:27:55, metric 10
> to 10.12.0.2 via em0.12
#[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12
4.4.4.4/32 @[IS-IS/15] 00:27:55, metric 20
> to 10.12.0.2 via em0.12
#[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Push 300096
5.5.5.5/32 @[IS-IS/160] 00:27:55, metric 30
> to 10.12.0.2 via em0.12
#[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Push 300144
10.12.0.0/24 *[Direct/0] 00:27:55
> via em0.12
10.12.0.1/32 *[Local/0] 00:27:55
Local via em0.12
10.24.0.0/24 *[IS-IS/15] 00:27:55, metric 20
> to 10.12.0.2 via em0.12
150.0.0.0/32 *[Local/0] 02:04:25
Reject
192.168.1.0/24 *[Direct/0] 02:04:25
> via em1.0
192.168.1.11/32 *[Local/0] 02:04:25
Local via em1.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2.2.2.2/32 *[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12
4.4.4.4/32 *[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Push 300096
5.5.5.5/32 *[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Push 300144

vpn-a.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.18.0.0/24 *[Direct/0] 00:27:55
> via em0.18
10.18.0.1/32 *[Local/0] 00:27:55
Local via em0.18
192.0.2.0/24 *[BGP/170] 00:06:59, localpref 100
AS path: 65101 I, validation-state: unverified
> to 10.18.0.8 via em0.18
198.51.100.0/24 *[BGP/170] 00:17:24, localpref 100, from 5.5.5.5
AS path: 65003 65101 I, validation-state: unverified
> to 10.12.0.2 via em0.12, Push 303296, Push 300144(top)
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
49.0001.0001.0001.0101/72
*[Direct/0] 02:04:25
> via lo0.0
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 02:04:25, metric 1
Receive
1 *[MPLS/0] 02:04:25, metric 1
Receive
2 *[MPLS/0] 02:04:25, metric 1
Receive
13 *[MPLS/0] 02:04:25, metric 1
Receive
299840 *[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Pop
299840(S=0) *[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Pop
299856 *[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Swap 300096
299872 *[LDP/9] 00:17:49, metric 1
> to 10.12.0.2 via em0.12, Swap 300144
299904 *[VPN/170] 00:06:59
> to 10.18.0.8 via em0.18, Pop
bgp.l3vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1:1:192.0.2.0/24
*[BGP/170] 00:06:59, localpref 100
AS path: 65101 I, validation-state: unverified
> to 10.18.0.8 via em0.18
5.5.5.5:1:198.51.100.0/24
*[BGP/170] 00:17:24, localpref 100, from 5.5.5.5
AS path: 65003 65101 I, validation-state: unverified
> to 10.12.0.2 via em0.12, Push 303296, Push 300144(top)

P1

Interfaces Configuration

em0 {
vlan-tagging;
unit 12 {
vlan-id 12;
family inet {
address 10.12.0.2/24;
}
family iso;
family mpls;
}
unit 24 {
vlan-id 24;
family inet {
address 10.24.0.2/24;
}
family iso;
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 2.2.2.2/32;
}
family iso {
address 49.0001.0002.0002.0202.00;
}
}
}

Routing protocols configuration

mpls {
interface all;
}
isis {
interface all {
level 2 disable;
}
}
ldp {
interface all;
}

Routing options configuration

router-id 2.2.2.2;
autonomous-system 65002;

Routing tables

inet.0: 11 destinations, 11 routes (11 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32         *[IS-IS/15] 00:18:48, metric 10
> to 10.12.0.1 via em0.12
2.2.2.2/32 *[Direct/0] 1w1d 02:21:12
> via lo0.0
4.4.4.4/32 *[IS-IS/15] 2d 04:36:35, metric 10
> to 10.24.0.4 via em0.24
5.5.5.5/32 *[IS-IS/160] 2d 04:36:35, metric 20
> to 10.24.0.4 via em0.24
10.12.0.0/24 *[Direct/0] 2d 04:36:35
> via em0.12
10.12.0.2/32 *[Local/0] 2d 04:36:35
Local via em0.12
10.24.0.0/24 *[Direct/0] 2d 04:36:35
> via em0.24
10.24.0.2/32 *[Local/0] 2d 04:36:35
Local via em0.24
150.0.0.0/32 *[Local/0] 1w1d 02:21:12
Reject
192.168.1.0/24 *[Direct/0] 1w1d 02:21:12
> via em1.0
192.168.1.12/32 *[Local/0] 1w1d 02:21:12
Local via em1.0 inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both 1.1.1.1/32 *[LDP/9] 00:18:48, metric 1
> to 10.12.0.1 via em0.12
4.4.4.4/32 *[LDP/9] 01:48:47, metric 1
> to 10.24.0.4 via em0.24
5.5.5.5/32 *[LDP/9] 01:48:47, metric 1
> to 10.24.0.4 via em0.24, Push 301296 iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both 49.0001.0002.0002.0202/72
*[Direct/0] 1w1d 02:21:12
> via lo0.0 mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both 0 *[MPLS/0] 1w1d 02:21:15, metric 1
Receive
1 *[MPLS/0] 1w1d 02:21:15, metric 1
Receive
2 *[MPLS/0] 1w1d 02:21:15, metric 1
Receive
13 *[MPLS/0] 1w1d 02:21:15, metric 1
Receive
300096 *[LDP/9] 01:48:47, metric 1
> to 10.24.0.4 via em0.24, Pop
300096(S=0) *[LDP/9] 01:48:47, metric 1
> to 10.24.0.4 via em0.24, Pop
300144 *[LDP/9] 01:48:47, metric 1
> to 10.24.0.4 via em0.24, Swap 301296
300208 *[LDP/9] 00:18:48, metric 1
> to 10.12.0.1 via em0.12, Pop
300208(S=0) *[LDP/9] 00:18:48, metric 1
> to 10.12.0.1 via em0.12, Pop

ASBR1

Interfaces configuration

em0 {
vlan-tagging;
unit 24 {
description to-p1;
vlan-id 24;
family inet {
address 10.24.0.4/24;
}
family iso;
family mpls;
}
unit 34 {
description to-asbr2;
vlan-id 34;
family inet {
address 10.34.0.4/24;
}
family iso;
family mpls;
}
lo0 {
unit 0 {
family inet {
address 4.4.4.4/32;
}
family iso {
address 49.0001.0004.0004.0404.00;
}
}
}

Routing protocols configuration

mpls {
traffic-engineering mpls-forwarding;
interface all;
}
bgp {
group ext-65003 {
type external;
peer-as 65003;
neighbor 10.34.0.3 {
family inet {
labeled-unicast;
}
export to-as65003;
peer-as 65003;
}
}
}
isis {
export to-igp;
interface all {
level 2 disable;
}
}
ldp {
egress-policy to-igp;
interface all;
interface em0.34 {
disable;
}
}

Routing options configuration

router-id 4.4.4.4;
autonomous-system 65002;

Policy options configuration

policy-statement to-as65003 {
term 1 {
from {
route-filter 1.1.1.1/32 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement to-igp {
term 1 {
from {
route-filter 4.4.4.4/32 exact;
route-filter 5.5.5.5/32 exact;
}
then accept;
}
term 2 {
then reject;
}
}

Routing tables

inet.0: 13 destinations, 16 routes (13 active, 0 holddown, 0 hidden)
@ = Routing Use Only, # = Forwarding Use Only
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 @[IS-IS/15] 00:40:35, metric 20
> to 10.24.0.2 via em0.24
#[LDP/9] 00:40:34, metric 1
> to 10.24.0.2 via em0.24, Push 300208
2.2.2.2/32 @[IS-IS/15] 2d 04:58:51, metric 10
> to 10.24.0.2 via em0.24
#[LDP/9] 2d 04:58:10, metric 1
> to 10.24.0.2 via em0.24
4.4.4.4/32 *[Direct/0] 4d 04:00:52
> via lo0.0
5.5.5.5/32 *[BGP/170] 2d 04:58:47, MED 20, localpref 100
AS path: 65003 I, validation-state: unverified
> to 10.34.0.3 via em0.34, Push 302016
10.12.0.0/24 *[IS-IS/15] 2d 04:58:51, metric 20
> to 10.24.0.2 via em0.24
10.24.0.0/24 *[Direct/0] 2d 04:58:51
> via em0.24
[IS-IS/15] 2d 04:58:51, metric 20
> to 10.24.0.2 via em0.24
10.24.0.4/32 *[Local/0] 2d 04:58:51
Local via em0.24
10.34.0.0/24 *[Direct/0] 2d 04:58:51
> via em0.34
10.34.0.4/32 *[Local/0] 2d 04:58:51
Local via em0.34
150.0.0.0/31 *[Direct/0] 4d 04:00:52
> via em2.0
150.0.0.0/32 *[Local/0] 4d 04:00:52
Local via em2.0
192.168.1.0/24 *[Direct/0] 4d 04:00:52
> via em1.0
192.168.1.14/32 *[Local/0] 4d 04:00:52
Local via em1.0
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[LDP/9] 00:40:34, metric 1
> to 10.24.0.2 via em0.24, Push 300208
2.2.2.2/32 *[LDP/9] 2d 04:58:10, metric 1
> to 10.24.0.2 via em0.24
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
49.0001.0004.0004.0404/72
*[Direct/0] 4d 04:00:52
> via lo0.0
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 4d 04:00:54, metric 1
Receive
1 *[MPLS/0] 4d 04:00:54, metric 1
Receive
2 *[MPLS/0] 4d 04:00:54, metric 1
Receive
13 *[MPLS/0] 4d 04:00:54, metric 1
Receive
301296 *[LDP/9] 2d 04:58:47, metric 1
> to 10.34.0.3 via em0.34, Swap 302016
301360 *[LDP/9] 2d 04:58:10, metric 1
> to 10.24.0.2 via em0.24, Pop
301360(S=0) *[LDP/9] 2d 04:58:10, metric 1
> to 10.24.0.2 via em0.24, Pop
301536 *[LDP/9] 00:40:34, metric 1
> to 10.24.0.2 via em0.24, Swap 300208
301552 *[VPN/170] 00:40:34
> to 10.24.0.2 via em0.24, Swap 300208

ASBR2

Interface configuration

em0 {
vlan-tagging;
unit 34 {
description to-asbr1;
vlan-id 34;
family inet {
address 10.34.0.3/24;
}
family iso;
family mpls;
}
unit 36 {
description to-p2;
vlan-id 36;
family inet {
address 10.36.0.3/24;
}
family iso;
family mpls;
}
lo0 {
unit 0 {
family inet {
address 3.3.3.3/32;
}
family iso {
address 49.0001.0003.0003.0303.00;
}
}
}

Routing protocols configuration

mpls {
traffic-engineering mpls-forwarding;
interface all;
}
bgp {
group ext-65002 {
type external;
neighbor 10.34.0.4 {
family inet {
labeled-unicast;
}
export to-as65002;
peer-as 65002;
}
}
}
isis {
export to-igp;
interface all {
level 1 disable;
}
}
ldp {
egress-policy to-igp;
interface all;
interface em0.34 {
disable;
}
}

Routing options configuration

router-id 3.3.3.3;
autonomous-system 65003;
Policy options configuration
policy-statement to-as65002 {
term 1 {
from {
route-filter 5.5.5.5/32 exact;
}
then accept;
}
term 2 {
then reject;
}
}
policy-statement to-igp {
term 1 {
from {
route-filter 1.1.1.1/32 exact;
route-filter 3.3.3.3/32 exact;
}
then accept;
}
term 2 {
then reject;
}
}

Routing tables

inet.0: 11 destinations, 14 routes (11 active, 0 holddown, 0 hidden)
@ = Routing Use Only, # = Forwarding Use Only
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[BGP/170] 00:42:00, MED 20, localpref 100
AS path: 65002 I, validation-state: unverified
> to 10.34.0.4 via em0.34, Push 301552
3.3.3.3/32 *[Direct/0] 2w2d 20:23:57
> via lo0.0
5.5.5.5/32 @[IS-IS/18] 2d 04:57:55, metric 20
> to 10.36.0.6 via em0.36
#[LDP/9] 2d 04:57:52, metric 1
> to 10.36.0.6 via em0.36, Push 300624
6.6.6.6/32 @[IS-IS/18] 2d 04:57:55, metric 10
> to 10.36.0.6 via em0.36
#[LDP/9] 2d 04:57:52, metric 1
> to 10.36.0.6 via em0.36
10.34.0.0/24 *[Direct/0] 2d 04:57:55
> via em0.34
10.34.0.3/32 *[Local/0] 2d 04:57:55
Local via em0.34
10.36.0.0/24 *[Direct/0] 2d 04:57:55
> via em0.36
[IS-IS/18] 2d 04:57:55, metric 20
> to 10.36.0.6 via em0.36
10.36.0.3/32 *[Local/0] 2d 04:57:55
Local via em0.36
10.56.0.0/24 *[IS-IS/18] 2d 04:57:55, metric 20
> to 10.36.0.6 via em0.36
192.168.1.0/24 *[Direct/0] 2w2d 21:21:42
> via em1.0
192.168.1.13/32 *[Local/0] 2w2d 21:21:42
Local via em1.0
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
5.5.5.5/32 *[LDP/9] 2d 04:57:52, metric 1
> to 10.36.0.6 via em0.36, Push 300624
6.6.6.6/32 *[LDP/9] 2d 04:57:52, metric 1
> to 10.36.0.6 via em0.36

iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
49.0001.0003.0003.0303/72
*[Direct/0] 2w2d 20:14:58
> via lo0.0
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2w2d 21:09:14, metric 1
Receive
1 *[MPLS/0] 2w2d 21:09:14, metric 1
Receive
2 *[MPLS/0] 2w2d 21:09:14, metric 1
Receive
13 *[MPLS/0] 2w2d 21:09:14, metric 1
Receive
301952 *[LDP/9] 2d 04:57:52, metric 1
> to 10.36.0.6 via em0.36, Pop
301952(S=0) *[LDP/9] 2d 04:57:52, metric 1
> to 10.36.0.6 via em0.36, Pop
301968 *[LDP/9] 2d 04:57:52, metric 1
> to 10.36.0.6 via em0.36, Swap 300624
302016 *[VPN/170] 2d 04:57:04
> to 10.36.0.6 via em0.36, Swap 300624
302064 *[LDP/9] 00:42:00, metric 1
> to 10.34.0.4 via em0.34, Swap 301552

P2

Interfaces configuration

em0 {
vlan-tagging;
unit 36 {
description to-asbr2;
vlan-id 36;
family inet {
address 10.36.0.6/24;
}
family iso;
family mpls;
}
unit 56 {
description to-pe2;
vlan-id 56;
family inet {
address 10.56.0.6/24;
}
family iso;
family mpls;
}
}
em1 {
unit 0 {
family inet {
address 192.168.1.16/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 6.6.6.6/32;
}
family iso {
address 49.0001.0006.0006.0606.00;
}
}
}

Routing protocols configuration

mpls {
interface em1.0 {
disable;
}
interface all;
}
isis {
interface all {
level 2 {
inactive: disable;
}
level 1 disable;
}
interface em1.0 {
disable;
}
}
ldp {
interface all;
interface em1.0 {
disable;
}
}

Routing options configuration

router-id 6.6.6.6;
autonomous-system 65002;

Routing tables

inet.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[IS-IS/165] 01:23:54, metric 20
> to 10.36.0.3 via em0.36
3.3.3.3/32 *[IS-IS/18] 2d 05:44:41, metric 10
> to 10.36.0.3 via em0.36
5.5.5.5/32 *[IS-IS/18] 2d 05:44:41, metric 10
> to 10.56.0.5 via em0.56
6.6.6.6/32 *[Direct/0] 2w2d 21:26:18
> via lo0.0
10.36.0.0/24 *[Direct/0] 2d 05:44:42
> via em0.36
10.36.0.6/32 *[Local/0] 2d 05:44:42
Local via em0.36
10.56.0.0/24 *[Direct/0] 2d 05:44:42
> via em0.56
10.56.0.6/32 *[Local/0] 2d 05:44:42
Local via em0.56
192.168.1.0/24 *[Direct/0] 2w2d 22:25:27
> via em1.0
192.168.1.16/32 *[Local/0] 2w2d 22:25:27
Local via em1.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[LDP/9] 01:23:54, metric 1
> to 10.36.0.3 via em0.36, Push 302064
3.3.3.3/32 *[LDP/9] 2d 05:42:51, metric 1
> to 10.36.0.3 via em0.36
5.5.5.5/32 *[LDP/9] 2d 05:43:23, metric 1
> to 10.56.0.5 via em0.56
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
49.0001.0006.0006.0606/72
*[Direct/0] 2w2d 21:15:25
> via lo0.0

mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2w2d 04:18:30, metric 1
Receive
1 *[MPLS/0] 2w2d 04:18:30, metric 1
Receive
2 *[MPLS/0] 2w2d 04:18:30, metric 1
Receive
13 *[MPLS/0] 2w2d 04:18:30, metric 1
Receive
300624 *[LDP/9] 2d 05:43:23, metric 1
> to 10.56.0.5 via em0.56, Pop
300624(S=0) *[LDP/9] 2d 05:43:23, metric 1
> to 10.56.0.5 via em0.56, Pop
300640 *[LDP/9] 2d 05:42:51, metric 1
> to 10.36.0.3 via em0.36, Pop
300640(S=0) *[LDP/9] 2d 05:42:51, metric 1
> to 10.36.0.3 via em0.36, Pop
300704 *[LDP/9] 01:23:54, metric 1
> to 10.36.0.3 via em0.36, Swap 302064

PE2

Interfaces configuration

em0 {
vlan-tagging;
unit 56 {
description to-p2;
vlan-id 56;
family inet {
address 10.56.0.5/24;
}
family iso;
family mpls;
}
unit 57 {
description to-ce2;
vlan-id 57;
family inet {
address 10.57.0.5/24;
}
}
}
em1 {
unit 0 {
family inet {
address 192.168.1.15/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 5.5.5.5/32;
}
family iso {
address 49.0001.0005.0005.0505.00;
}
}
}

Routing protocols configuration

mpls {
traffic-engineering mpls-forwarding;
interface em1.0 {
disable;
}
interface all;
}
bgp {
group to-pe1 {
type external;
multihop {
ttl 20;
}
neighbor 1.1.1.1 {
local-address 5.5.5.5;
family inet-vpn {
unicast;
}
peer-as 65002;
}
}
}
isis {
interface all {
level 1 disable;
}
interface em1.0 {
disable;
}
}
ldp {
interface all;
interface em1.0 {
disable;
}
}

Routing options configuration

router-id 5.5.5.5;
autonomous-system 65003;

Policy configuration

policy-statement accept {
term 1 {
then accept;
}
}
policy-statement export-vpn-a {
term 1 {
from protocol bgp;
then {
community add vpn-a;
accept;
}
}
term 2 {
then reject;
}
}
policy-statement import-vpn-a {
term 1 {
from community vpn-a;
then accept;
}
term 2 {
then reject;
}
}
community vpn-a members target:65101:101;

Routing instances configuration

vpn-a {
instance-type vrf;
interface em0.57;
route-distinguisher 5.5.5.5:1;
vrf-import import-vpn-a;
vrf-export export-vpn-a;
inactive: vrf-target target:65101:101;
protocols {
bgp {
group ext-65101 {
type external;
export accept;
peer-as 65101;
as-override;
neighbor 10.57.0.7;
}
}
}
}

Routing tables

inet.0: 9 destinations, 12 routes (9 active, 0 holddown, 0 hidden)
@ = Routing Use Only, # = Forwarding Use Only
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 @[IS-IS/165] 01:39:32, metric 30
> to 10.56.0.6 via em0.56
#[LDP/9] 01:39:32, metric 1
> to 10.56.0.6 via em0.56, Push 300704
3.3.3.3/32 @[IS-IS/18] 2d 06:00:05, metric 20
> to 10.56.0.6 via em0.56
#[LDP/9] 2d 05:59:02, metric 1
> to 10.56.0.6 via em0.56, Push 300640
5.5.5.5/32 *[Direct/0] 2w2d 21:43:04
> via lo0.0
6.6.6.6/32 @[IS-IS/18] 2d 06:00:05, metric 10
> to 10.56.0.6 via em0.56
#[LDP/9] 2d 05:59:02, metric 1
> to 10.56.0.6 via em0.56
10.36.0.0/24 *[IS-IS/18] 2d 06:00:05, metric 20
> to 10.56.0.6 via em0.56
10.56.0.0/24 *[Direct/0] 2d 06:00:05
> via em0.56
10.56.0.5/32 *[Local/0] 2d 06:00:05
Local via em0.56
192.168.1.0/24 *[Direct/0] 2w2d 22:42:03
> via em1.0
192.168.1.15/32 *[Local/0] 2w2d 22:42:03
Local via em1.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[LDP/9] 01:39:32, metric 1
> to 10.56.0.6 via em0.56, Push 300704
3.3.3.3/32 *[LDP/9] 2d 05:59:02, metric 1
> to 10.56.0.6 via em0.56, Push 300640
6.6.6.6/32 *[LDP/9] 2d 05:59:02, metric 1
> to 10.56.0.6 via em0.56
vpn-a.inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.57.0.0/24 *[Direct/0] 2d 06:00:05
> via em0.57
10.57.0.5/32 *[Local/0] 2d 06:00:05
Local via em0.57
192.0.2.0/24 *[BGP/170] 01:28:42, localpref 100, from 1.1.1.1
AS path: 65002 65101 I, validation-state: unverified
> to 10.56.0.6 via em0.56, Push 299904, Push 300704(top)
198.51.100.0/24 *[BGP/170] 2d 05:59:33, localpref 100
AS path: 65101 I, validation-state: unverified
> to 10.57.0.7 via em0.57
iso.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
49.0001.0005.0005.0505/72
*[Direct/0] 2w2d 21:32:03
> via lo0.0
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 2w2d 04:34:41, metric 1
Receive
1 *[MPLS/0] 2w2d 04:34:41, metric 1
Receive
2 *[MPLS/0] 2w2d 04:34:41, metric 1
Receive
13 *[MPLS/0] 2w2d 04:34:41, metric 1
Receive
303152 *[LDP/9] 2d 05:59:02, metric 1
> to 10.56.0.6 via em0.56, Pop
303152(S=0) *[LDP/9] 2d 05:59:02, metric 1
> to 10.56.0.6 via em0.56, Pop
303168 *[LDP/9] 2d 05:59:02, metric 1
> to 10.56.0.6 via em0.56, Swap 300640
303280 *[LDP/9] 01:39:32, metric 1
> to 10.56.0.6 via em0.56, Swap 300704
303296 *[VPN/170] 01:39:07
> to 10.57.0.7 via em0.57, Pop
bgp.l3vpn.0: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1:1:192.0.2.0/24
*[BGP/170] 01:28:42, localpref 100, from 1.1.1.1
AS path: 65002 65101 I, validation-state: unverified
> to 10.56.0.6 via em0.56, Push 299904, Push 300704(top)
5.5.5.5:1:198.51.100.0/24
*[BGP/170] 2d 05:59:33, localpref 100
AS path: 65101 I, validation-state: unverified
> to 10.57.0.7 via em0.57

CE2

Interfaces configuration

em0 {
vlan-tagging;
unit 57 {
vlan-id 57;
family inet {
address 10.57.0.7/24;
}
}
}
em1 {
unit 0 {
family inet {
address 192.168.1.17/24;
}
}
}
lo0 {
unit 1 {
family inet {
address 198.51.100.1/32;
}
}
}

BGP configuration

group ext-65003 {
type external;
export adv-ext-bgp;
neighbor 10.57.0.5 {
local-address 10.57.0.7;
peer-as 65003;
}
}

Routing options configuration

static {
route 192.0.2.0/24 discard;
}
router-id 8.8.8.8;
autonomous-system 65101;

Policy options configuration

policy-statement adv-ext-bgp {
term adv-200 {
from {
route-filter 192.0.2.0/24 exact;
}
then accept;
}
}

Routing tables

inet.0: 8 destinations, 9 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.1.1/32 *[Static/5] 2w2d 03:56:46
> to 10.57.0.5 via em0.57
10.57.0.0/24 *[Direct/0] 2d 06:07:17
> via em0.57
[BGP/170] 2d 06:06:12, localpref 100
AS path: 65003 I, validation-state: unverified
> to 10.57.0.5 via em0.57
10.57.0.7/32 *[Local/0] 2d 06:07:17
Local via em0.57
192.0.2.0/24 *[BGP/170] 01:35:22, localpref 100
AS path: 65003 65002 65003 I, validation-state: unverified
> to 10.57.0.5 via em0.57
192.168.1.0/24 *[Direct/0] 2w2d 05:40:17
> via em1.0
192.168.1.17/32 *[Local/0] 2w2d 05:40:17
Local via em1.0
198.51.100.0/24 *[Static/5] 2d 22:53:18
Discard
198.51.100.1/32 *[Direct/0] 2d 22:53:18
> via lo0.1

Connectivity test CE2 <--> CE1

admin@CE2> ping 192.0.2.1 source 198.51.100.1 count 5 
PING 192.0.2.1 (192.0.2.1): 56 data bytes
64 bytes from 192.0.2.1: icmp_seq=0 ttl=58 time=1.141 ms
64 bytes from 192.0.2.1: icmp_seq=1 ttl=58 time=1.113 ms
64 bytes from 192.0.2.1: icmp_seq=2 ttl=58 time=1.209 ms
64 bytes from 192.0.2.1: icmp_seq=3 ttl=58 time=1.313 ms
64 bytes from 192.0.2.1: icmp_seq=4 ttl=58 time=1.198 ms
--- 192.0.2.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.113/1.195/1.313/0.069 ms