Академический Документы
Профессиональный Документы
Культура Документы
This article oers some insight into how you could decide to build a multihomed Layer 3 IP
VPN or Layer 3 MPLS VPN. First Ill go over the topology. After this, you will find the PE and
CPE configuration. Ill end with some verification and show commands.
The topology:
There are three PE routers. These are Liber, Juno and Ceres. The three PE routers are
connected together via an MPLS network and have BGP configured to exchange routing
information for the IP VPN called ipvpn.
There are two locations connected to the IP VPN. On one location, Genius is the CPE. This
CPE has a connection to Liber. On Liber, a static route is configured with the prefixes in use
on Genius. This static route is being redistributed into BGP.
Two other CPEs connect the multihomed location to the IP VPN. These two CPE's are Luna
and Orcus. These two CPEs are oering the customer line- and node-redundancy. This is
achieved by using both BGP and VRRP. In order to exchange routing information, the CPEs
run BGP with each other and with the PEs they are connected to (Juno and Ceres). Luna and
Orcus also run VRRP to provide a single gateway to the customers device. The customers
device is named Saturn.
The prefix in which the VRRP address is configured as well as the CPEs loopback IP
addresses are made redundant across the EBGP sessions in use between the CPEs and the
PEs. Luna is acting as the primary CPE for all these prefixes and Orcus is acting as Lunas
backup.
To make sure all trac from the IP VPN to the location uses the connection Juno-Luna, the
local-preference BGP attribute is used. The local-preference attribute has the highest value on
Juno, making sure that all other PEs will prefer to install that route into their routing table as
opposed to the Ceres Orcus connection.
To make sure all trac from the customer location into the IP VPN also uses the Juno-Luna
connection, the MED BGP attribute is used. The MED value Juno is applying to the routes is
10. This is lower than the value Ceres applies to the routes, which is 150. Since Luna and
Orcus are running IBGP between them, they will exchange all the routes received from the
PEs. The BGP route selection will favor the route with the lowest MED. Therefore, as long as
the Juno-Luna BGP session is up, routes received from Juno will be favored over the routes
received by Ceres.
The CPEs also apply a community to all the advertised routes. This will prevent the PEs from
advertising CPE-learned routes back to the CPEs. The next-hop-self that is applied in the
policy configured between the CPEs is needed because in IBGP, the next-hop attribute
remains unaltered. If the next-hop would not be changed, we would have to redistribute the
prefixes in use between the PE and the CPE.
The configuration:
PE Liber:
PE Juno:
PE Ceres:
JGjmPTQF6p0yevL-d"
set protocols bgp group pe-connection export bgp-export
set protocols bgp group pe-connection peer-as 1
set protocols bgp group pe-connection neighbor 4.0.0.46 descrip
tion Ceres
set protocols bgp group cpe-connection type internal
set protocols bgp group cpe-connection hold-time 10
set protocols bgp group cpe-connection authentication-key "$9$t
y05O1EleMWL7wYDHqfF3"
set protocols bgp group cpe-connection export cpe-connection
set protocols bgp group cpe-connection peer-as 65500
set protocols bgp group cpe-connection neighbor 192.168.1.3 des
cription Luna
set policy-options prefix-list direct-lo0 apply-path "logical-s
ystems Orcus interfaces lo0 unit <*> family inet address <*>"
set policy-options policy-statement bgp-export term direct from
protocol direct
set policy-options policy-statement bgp-export term direct from
prefix-list direct-lo0
set policy-options policy-statement bgp-export term direct then
community add cpe-originated-route
set policy-options policy-statement bgp-export term direct then
accept
set policy-options policy-statement bgp-export term Saturn-pref
ix from protocol direct
set policy-options policy-statement bgp-export term Saturn-pref
ix from route-filter 192.168.1.0/24 exact
set policy-options policy-statement bgp-export term Saturn-pref
ix then community add cpe-originated-route
set policy-options policy-statement bgp-export term Saturn-pref
ix then accept
set policy-options policy-statement bgp-export term Saturn-Lo0
from protocol static
set policy-options policy-statement bgp-export term Saturn-Lo0
then community add cpe-originated-route
set policy-options policy-statement bgp-export term Saturn-Lo0
then accept
set policy-options policy-statement cpe-connection term all the
n next-hop self
set policy-options community cpe-originated-route members origi
n:1000:1000
set routing-options static route 10.0.0.12/32 next-hop 192.168.
1.254
The Verification:
Trac flow when both routers are up:
Lets start by verifying the end-to-end connectivity from the Saturn router:
The previous output shows us there is IP connectivity and that trac passes the Juno PE
(4.0.0.22).
On to Luna. Here we can see that the VRRP state is master and that the route via Juno is
used when trac is sent from Saturn to Genius:
Timer
A
T
0.560
192.168.1.1
d
> to 4.0.0.22 via xe-2/0/0.105
The CPEs were not configured to advertise inactive routes. Therefore, we will only see the
routes into the IPVPN through both PEs on Orcus:
d
> to 192.168.1.3 via xe-2/0/0.150
[BGP/170] 1w1d 01:19:45, MED 150, localpref
100
AS path: 1 I, validation-state: unverifie
d
> to 4.0.0.46 via xe-2/0/0.111
The previous output shows us that Orcus receives the route towards 10.0.0.3 from both Luna
and the PE, which is Ceres. Since the MED from the Ceres route is higher than the MED from
the Luna route, the Ceres route is not advertised to Luna and remains inactive.
On Liber, we can see that return trac towards Saturn will run via Luna as well. This is where
the local preference comes in:
The route that Liber is using was originated by Juno. On Ceres, we can see the following:
ified
> to 4.0.0.18 via xe-2/0/0.104, Push 16, Pu
sh 300144(top)
[BGP/170] 5d 22:29:55, localpref 150, from
10.0.0.4
AS path: 65500 I, validation-state: unver
ified
> to 4.0.0.18 via xe-2/0/0.104, Push 16, Pu
sh 300144(top)
[BGP/170] 1w2d 20:49:46, localpref 10
AS path: 65500 I, validation-state: unver
ified
> to 4.0.0.45 via xe-2/0/1.111
<-- Orcus
IP
Ceres is also using the route via Juno. The route that it received from Orcus is not active, this
is because the local preference is only 10. Note that there is no from state inactive in our PE
BGP policies as well. That is why the second route was is not visible on the Liber PE.
Lets continue and disable the BGP session between Juno and Luna:
The connectivity between Saturn and Genius remains, but trac now flows through Orcus:
The first IP address in the traceroute is still Luna. This is because the VRRP mastership did
not change. On Luna, we can see the following in our routing table:
d
> to 192.168.1.2 via xe-2/0/1.150
When the Luna router fails, the Orcus router will assume the Master state in VRRP. From that
moment, trac will flow directly via Orcus. Alternatively, by using some tracking mechanism,
you could also make Orcus pre-empt Lunas VRRP mastership and thereby making Orcus the
immediate next-hop for the customer router Saturn. Furthermore, by creating extra policy
terms and referring to from state inactive, you can make sure that all the routers will
constantly see all the possible routes.
The complete configuration for the engire MPLS VPN lab can be found here
(juniper_ipvpn_basics_the_complete_configuration.php).
That's all.
26-1-2015