It is time for us to tackle the last of the well-known, mandatory BGP path attributes we must master. It is none other than the NEXT_HOP path attribute.
This certainly seems like a simple path attribute and it is perfectly understandable that this would be in the well-known and mandatory category. What is surprising to some about this attribute, however, is the fact that it functions differently from the IGPs that we might be more accustomed to working with. While it might seem off putting at first, you will quickly acclimate to the rules of the NEXT_HOP behavior in BGP. Here are these rules:
- For eBGP peers, the NEXT_HOP is the IP address of the advertising router’s interface. This acts just as we would expect coming from the world of IGPs.
- For iBGP peers, the NEXT_HOP is the IP address of the advertising router’s interface, but only if the destination is in the local AS. Again, this behavior would be consistent with what we expect to see in our IGPs, and you will notice this behavior when your iBGP speaker is actually originating the prefix in the local AS, therefore setting its own NEXT_HOP for the prefix.
- For iBGP peers, the NEXT_HOP is the IP address of the external peer from which the prefix was learned. This is DEFINITELY different from what we are accustomed to with our IGPs.
Rule #3 really shows how BGP is more of an AS to AS routing protocol, as opposed to a router to router protocol as we are accustomed to in the world of IGPs. This can often cause reachability issues of course. We must remember that the NEXT_HOP attribute may be populated with a value outside of our AS and one that might present reachability issues.
Remember, also, from your study of the BGP best path selection algorithm, you realize that BGP quickly ignores a prefix for best path selection should the NEXT_HOP value of that prefix be unreachable. This is often why we do not see the prefixes we might expect in our practice labbing with the protocol.
What are common solutions to potential reachability issues with NEXT_HOP in BGP? Well, there are plenty and they include:
- Ensuring the remote subnet is reachable using static routing
- Using an IGP configured passively on the external facing interface (to advertise the subnet into the IGP)
- Use the next-hop-self command in BGP to change the behavior of Rule #3
When you are in your multiple-choice based SPCOR exam, this is all very simple. Where things can get, well, interesting, is when we are in a CCIE lab exam environment. Here, you will have to read very closely to see what method you may use to “fix” any issues with NEXT_HOP. Remember, make no assumptions and be sure to see what solution(s) are acceptable given the opening rules of the exam, and the precise wording of the tasks in the IGP and EGP sections.