Next Hop Self Command on Juniper Routers

JUNIPER-BGP-next-hop-self-conf

Next Hop Self Command on Juniper Routers

When an eBGP route advertised to vie iBGP, normally the next-hop of the route stay unchanged. This behaviour causes unknown destinations at the iBGP peer. The route and the next-hop is in another network and there is no information to reach this next-hop.

To overcome this issue, a routing policy that provide “next-hop self” behaviour can be used.
Below, we will show this conffiguration with an example.


JUNIPER-BGP-next-hop-self-conf

Here, there are to steps to apply next-hop self characristic to the router. These are:

1. Create the Routing Policy at the Router
2. Apply the Routing Policy to the Protocol

Let’s start to configure next-hop self. By the way, for our topology, we will configure this, only on RouterA1.

Step 1 – Create the Routing Policy

Juniper-RouterA1@Kosem> configure

[edit]
Juniper-RouterA1@Kosem# set policy-options policy-statement next-hop-self

[edit policy-options policy-statement next-hop-self]
Juniper-RouterA1@Kosem# set term 1

[edit policy-options policy-statement next-hop-self term 1]
Juniper-RouterA1@Kosem# from route-type external

[edit policy-options policy-statement next-hop-self term 1]
Juniper-RouterA1@Kosem# then next-hop self

[edit policy-options policy-statement next-hop-self term 1]
Juniper-RouterA1@ top

Step 2 – Create the Routing Policy

[edit ]
Juniper-RouterA1@Kosem# set protocols bgp 

[edit protocols bgp]
Juniper-RouterA1@Kosem# group ibgp export next-hop-self

[edit protocols bgp]
Juniper-RouterA1@Kosem# commit
commit completed

Before this configuration, RouterA2 can not reach the network between RouterB1 and RouterB2. Because as a netxt-hop it has the address of RouterB1’s ip address. But it do not know how to reach this next-hop.

After the configuration, Router A2 received this route with the next-hop of its neighbour RouterA1. And after that, it can reach the network between RouterB1 and RouterB2 via its neighbour.

Lesson tags: BGP, junos, juniper, nect hop self
Back to: JNCIP > BGP

Comments are closed.




JNCIP