Juniper Lab MPLS PE-CE eBGP
This post is about how to configure eBGP as PE to CE protocol on Juniper routers. This post uses and builds on the same MPLS core network which we configured in the previous 3 posts.
Below the diagram with the topology used for this post :

The thing we want to accomplish is to create connectivity over the MPLS network between the two loopback addresses of Router 5 and Router 6. The chosen PE-CE protocol in this post is eBGP.
First thing to do is to configure the CE routers Router 6 and Router 5 with a base configuration :
Base configurations CE Routers:
|
|
|
Router 5 :
set system host-name IPLOGIC-5
set interfaces fxp3 unit 450 vlan-id 450
set interfaces fxp3 unit 450 family inet address 10.0.45.2/30
set interfaces lo0 unit 0 family inet address 5.5.5.5/32
Router 6 :
set system host-name IPLOGIC-6
set interfaces fxp4 unit 160 vlan-id 160
set interfaces fxp4 unit 160 family inet address 10.0.16.2/30
set interfaces lo0 unit 0 family inet address 6.6.6.6/32
|
The configuration on the PE side :
Base configurations PE Routers:
|
|
|
Router 1 :
set interfaces fxp5 unit 160 vlan-id 160
set interfaces fxp5 unit 160 family inet address 10.0.16.1/30
set routing-instances VPNA interface fxp5.160
Router 4 :
set interfaces fxp3 unit 450 vlan-id 450
set interfaces fxp3 unit 450 family inet address 10.0.45.1/30
set routing-instances VPNA interface fxp3.450
|
Next we configure eBGP on the CE-routers :
eBGP configurations CE Routers:
|
|
|
Router 5 :
set routing-options autonomous-system 65005
set protocols bgp group VPNA-EBGP type external
set protocols bgp group VPNA-EBGP local-address 10.0.45.2
set protocols bgp group VPNA-EBGP export EXPORTBGP1
set protocols bgp group VPNA-EBGP neighbor 10.0.45.1 peer-as 65001
set policy-options policy-statement EXPORTBGP1 term 10 from route-filter 5.5.5.5/32 exact
set policy-options policy-statement EXPORTBGP1 term 10 then accept
set policy-options policy-statement EXPORTBGP1 term REJECT then reject
Router 6 :
set routing-options autonomous-system 65006
set protocols bgp group EBGP-VPNA type external
set protocols bgp group EBGP-VPNA local-address 10.0.16.2
set protocols bgp group EBGP-VPNA export EXPORTBGP1
set protocols bgp group EBGP-VPNA neighbor 10.0.16.1 peer-as 65001
set policy-options policy-statement EXPORTBGP1 term 10 from route-filter 6.6.6.6/32 exact
set policy-options policy-statement EXPORTBGP1 term 10 then accept
set policy-options policy-statement EXPORTBGP1 term REJECT then reject
|

And last but not least the eBGP configuration on the PE-routers in the VPNA routing-instance.
eBGP configurations PE Routers:
|
|
|
Router 1 :
set routing-instances VPNA routing-options autonomous-system 65001
set routing-instances VPNA routing-options autonomous-system independent-domain
set routing-instances VPNA protocols bgp family inet unicast
set routing-instances VPNA protocols bgp group VPNA-EBGP type external
set routing-instances VPNA protocols bgp group VPNA-EBGP local-address 10.0.16.1
set routing-instances VPNA protocols bgp group VPNA-EBGP neighbor 10.0.16.2 peer-as 65006
set policy-options policy-statement export-VPNA term 10 from protocol bgp
set policy-options policy-statement export-VPNA term 10 from route-filter 6.6.6.6/32 exact
set policy-options policy-statement export-VPNA term 10 then community add VPNA
set policy-options policy-statement export-VPNA term 10 then accept
set policy-options policy-statement export-VPNA term REJECT then reject
set policy-options policy-statement import-VPNA term 10 from protocol bgp
set policy-options policy-statement import-VPNA term 10 from community VPNA
set policy-options policy-statement import-VPNA term 10 then accept
set policy-options policy-statement import-VPNA term REJECT then reject
Router 4 :
set routing-instances VPNA routing-options autonomous-system 65001
set routing-instances VPNA routing-options autonomous-system independent-domain
set routing-instances VPNA protocols bgp group VPNA-EBGP type external
set routing-instances VPNA protocols bgp group VPNA-EBGP local-address 10.0.45.1
set routing-instances VPNA protocols bgp group VPNA-EBGP family inet unicast
set routing-instances VPNA protocols bgp group VPNA-EBGP neighbor 10.0.45.2 peer-as 65005
set policy-options policy-statement export-VPNA term 10 from protocol bgp
set policy-options policy-statement export-VPNA term 10 from route-filter 5.5.5.5/32 exact
set policy-options policy-statement export-VPNA term 10 then community add VPNA
set policy-options policy-statement export-VPNA term 10 then accept
set policy-options policy-statement export-VPNA term REJECT then reject
set policy-options policy-statement import-VPNA term 10 from protocol bgp
set policy-options policy-statement import-VPNA term 10 from community VPNA
set policy-options policy-statement import-VPNA term 10 then accept
set policy-options policy-statement import-VPNA term REJECT then reject
|
Below the route table and ping results between the two loopback addresses :
Route table and ping :
|
|
|
Router 5 :
chris@IPLOGIC-5# run show route
inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
5.5.5.5/32 *[Direct/0] 01:39:53
> via lo0.0
6.6.6.6/32 *[BGP/170] 01:38:42, localpref 100
AS path: 65001 65006 I
> to 10.0.45.1 via fxp3.450
10.0.45.0/30 *[Direct/0] 01:39:53
> via fxp3.450
10.0.45.2/32 *[Local/0] 01:39:53
Local via fxp3.450
__juniper_private2__.inet.0: 1 destinations, 1 routes (0 active, 0 holddown, 1 hidden)
[edit]
chris@IPLOGIC-5# run ping 6.6.6.6
PING 6.6.6.6 (6.6.6.6): 56 data bytes
^C
--- 6.6.6.6 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
[edit]
chris@IPLOGIC-5# run ping 6.6.6.6 source 5.5.5.5
PING 6.6.6.6 (6.6.6.6): 56 data bytes
64 bytes from 6.6.6.6: icmp_seq=0 ttl=63 time=5.171 ms
64 bytes from 6.6.6.6: icmp_seq=1 ttl=63 time=1.615 ms
64 bytes from 6.6.6.6: icmp_seq=2 ttl=63 time=1.658 ms
64 bytes from 6.6.6.6: icmp_seq=3 ttl=63 time=2.445 ms
^C
--- 6.6.6.6 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.615/2.722/5.171/1.452 ms
Router 6 :
chris@IPLOGIC-6# run show route
inet.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
5.5.5.5/32 *[BGP/170] 01:39:12, localpref 100
AS path: 65001 65005 I
> to 10.0.16.1 via fxp4.160
6.6.6.6/32 *[Direct/0] 01:40:23
> via lo0.0
10.0.16.0/30 *[Direct/0] 01:40:23
> via fxp4.160
10.0.16.2/32 *[Local/0] 01:40:23
Local via fxp4.160
__juniper_private2__.inet.0: 1 destinations, 1 routes (0 active, 0 holddown, 1 hidden)
[edit]
chris@IPLOGIC-6# run ping 5.5.5.5
PING 5.5.5.5 (5.5.5.5): 56 data bytes
^C
--- 5.5.5.5 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
[edit]
chris@IPLOGIC-6# run ping 5.5.5.5 source 6.6.6.6
PING 5.5.5.5 (5.5.5.5): 56 data bytes
64 bytes from 5.5.5.5: icmp_seq=0 ttl=63 time=4.962 ms
64 bytes from 5.5.5.5: icmp_seq=1 ttl=63 time=1.688 ms
64 bytes from 5.5.5.5: icmp_seq=2 ttl=63 time=1.627 ms
64 bytes from 5.5.5.5: icmp_seq=3 ttl=63 time=1.701 ms
^C
--- 5.5.5.5 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.627/2.494/4.962/1.425 ms
|