BGP next-hop SET MANUALLY


I’ve decided to post this with Cisco usually once you’ve learnt something one way and you know how to fix it or configure it most of the time you do not look for another approach and I admit I used to be the same , simply learn it , understand it and move on.

The problem occurs when you’re being asked to do something and you are not allowed to do this and that etc …. what usually happens in the CCIE exam and even in real world. Imagine you show up for work and you’re assigned to go to one of your Company’s clients where an entire office is not able to access anything on the internet. You then log on to their internet facing devices where you know they are running BGP to their ISPs , you look at the config and you see something you’ve never seen before so let’s look at our simple topology :

BGP next hop

R1 and R2 (your office) learn prefix 56.0.0.0/8 from thier EBGP neighbors ISP_1 and ISP_2 in AS 200 and advertise this prefix to R3 (your office) however since R3 is their IBGP neighbor the next-hop value is not updated a what is result causes the route recursion process to fail and R3 will not be able to reach 56.0.0.0/8 network and this prefix can not be considered the BestPath for BGP.

The are two way to fix this problem , we either need to give R3 a route towards 122.122.122.X/24 and 112.112.112.X/24 with a static route or change the next-hop to something R3 has a route to.

Normally in real world although not always we would issue below statement on R1 and R2 in order to enable R3 reach 56.0.0.0/8 prefix

R1
router bgp 100
 neighbor 192.168.123.3 next-hop-self

R2
router bgp 100
 neighbor 192.168.123.3 next-hop-self

but just in case you’re in the CCIE lab and you are not allowed to do this or you have your manager calling every 10 mins asking for an update here’s another approach:

R3
router bgp 100
 neighbor 192.168.123.1 route-map NEXT_HOP_FROM_R1 in

route-map NEXT_HOP_FROM_R1 permit 10
 set ip next-hop 192.168.123.1

R2
router bgp 100
 neighbor 122.122.122.100 remote-as 200
 no neighbor 192.168.123.3 next-hop-self
 neighbor 192.168.123.3 route-map NEXT_HOP_TO_R3 out

route-map NEXT_HOP_TO_R3 permit 10
 set ip next-hop 192.168.123.2

R1
router bgp 100
 neighbor 112.112.112.100 remote-as 200
 no neighbor 192.168.123.3 next-hop-self

 

That way prefixes R1 send to R3 will have a next-hop of 192.168.123.1 and prefixes R2 sends to R3 will have a next-hop value of 192.168.123.2

As I mentioned before we can accomplish the same using a next-hop-self command on R1 and R2 but just in case …..

Go ahead lab it up and see what happens 🙂

 

Enjoy !

Tom

Advertisements

About ccie4all
Hello, and welcome to the first post of my CCIE blog This blog has got one simple goal and that is to improve our skills in Cisco Networking field so we can become best engineers on a job market. Wordpress Blog https://ccie4all.wordpress.com/ information about the changes made to Gns3 BGP , MPLS and R&S CCIE labs. In order to access and download all provided materials and receive important updates from Gns3 BGP , MPLS and R&S CCIE labs under GNS3 tab in the main header please go ahead and subscribe to https://ccie4all.wordpress.com/ ! All other posts have not been affected and can be accessed at any given time. Enjoy ! Tom

2 Responses to BGP next-hop SET MANUALLY

  1. anirban says:

    you have done a good job.keep it up

    • ccie4all says:

      thanks a lot Anirban!

      more to come soon ….

      Best
      Tom

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: