Transit Network Using Edge Routers as Next Hops Example

The next-hop attribute is normally not changed on IBGP updates. When the border router forwards the incoming EBGP update over an outgoing IBGP session, the border router changes the next-hop address to the IP address that is used as the source address of the IBGP session.

The receiver of IBGP updates will see next-hop information that indicates a destination, which might not be directly connected. To resolve this problem, it will check its routing table and see if and how the next-hop address can be reached. Then it will route IP packets with destination addresses that match the network in the BGP update in the same direction as it would have routed an IP packet with the destination address equal to the IP address in the next-hop attribute. In this case, it is obvious that the next-hop address can be reached, because the IBGP session would not have been established otherwise.

In the figure, R-12 sends a BGP update about network X. Because it is sending a BGP update over an EBGP session to RTR-A, the next-hop attribute is set to the IP address that is used at the R-12 side of the EBGP session, RTR-A can use this information and route packets to network X by forwarding them to R-12.

RTR-A also forwards the BGP update on all its IBGP sessions. It changes the next-hop attribute to the IP address of its own loopback interface, so RTR-B, RTR-C, and RTR-D will get information that they can reach network X by forwarding packets to But that address is not directly connected. The routers will inspect the routing table to see if and how they can reach They can then route packets to network X in the same direction that they would use to route packets to

RTR-D also forwards the BGP update about network X to R-14. This is an EBGP session, which means that RTR-D will set the next-hop attribute to its own IP address that is used on that EBGP session,

Differences Between EBGP and IBGP Sessions

This topic describes the differences between EBGP and IBGP sessions.

This topic describes the differences between EBGP and IBGP sessions.

Both EBGP and IBGP sessions forward BGP updates; however, they do it in slightly different ways:

■ The router does not change BGP attributes when an update is sent across an IBGP session, unless next-hop-self is configured. When a BGP-speaking router sends an update across an EBGP session, the next-hop attribute is always set and the AS number of the router is prepended to the AS-path attribute.

■ IBGP uses split horizon to prevent routing information loops. EBGP does not use split horizon and instead uses the AS path to detect loops. In both cases, a router forwards only the best route and never sends a route back on the session from which it was received. But IBGP split-horizon rules also prohibit a router from forwarding any information that is received on an IBGP session to another IBGP session.

■ IBGP border routers remove the local preference attribute from a BGP route before the BGP update is sent over an EBGP session. This difference means that the local preference attribute is distributed on IBGP sessions only.

■ Two routers with an EBGP session between them normally establish the session using the IP addresses from a common, shared subnet. Using the shared subnet to establish the session guarantees that the two routers can exchange IP packets without any IGP running between them. Also, recursive routing will always succeed because the next-hop address is reachable using a directly connected route.

■ IBGP sessions are normally established between all routers in the AS in a full mesh. But all routers in an AS might not have physical connections to every other router within the AS. Because IBGP sessions are established between routers using IP addresses of different subnets, an IGP must be running within the AS in order to establish IBGP sessions.

■ BGP route selection rules slightly favor EBGP routes over equivalent IBGP routes.

2-28 Configuring BGP on Cisco Routers (BGP) v3.2 © 2005, Cisco Systems, Inc.

Was this article helpful?

0 0

Post a comment