BGP Route Manipulation and Load Balancing – OSPF, BGP, and Route Manipulation
By default, BGP chooses a single path to a destination. With thousands of routes, this choice can cause uneven traffic patterns. When you are working with BGP, there are different methods to control traffic paths and handle load balancing of traffic. Furthermore, outbound and inbound traffic flows are independent of each other.
For incoming traffic, the following methods can be used to manipulate traffic:
- You can advertise a subset of the network via ISP 1 and another via ISP 2. For example, if you have a /22 network, you can advertise subnet /23 on your side and the second /23 on the other side and the /22 on both sides.
- With AS_Path prepending, you can add one or more AS numbers to the left of the AS_Path to make it longer.
- You can use the BGP multi-exit discriminator (MED) attribute. When there are multiple entry points, MED tells the other AS how to route traffic into the AS.
- You can use BGP communities with local preference to set up flags in order to mark a set of routes. Then the service provider can use those flags to apply local preference within the network.
- You can use the BGP allow-as and as-override subcommands to allow eBGP routers to accept routes from the same AS.
For outbound traffic, the following methods can be used to manipulate traffic:
- You can use default routes to provide outbound traffic load balancing.
- You can use provider-advertised partial routes from each provider or request full Internet tables and perform AS_Path filtering.
- You can use the local preference attribute to indicate which path to use to exit the autonomous system. The higher local preference is used.
eBGP Multihop
eBGP Multihop can be used to connect to a BGP neighbor across multiple equal-cost links, as shown in Figure 4-17. The BGP peering is established between the loopback addresses and not the point-to-point links. This means the BGP peers do not have to be directly connected.

Figure 4-17 eBGP Multihop and Multipath
BGP Multipath
BGP Multipath Load Sharing for eBGP and iBGP allows you to configure multipath load balancing with both eBGP and iBGP paths in BGP networks that are configured to use MPLS. This is accomplished using the maximum-paths command. For example, in Figure 4-17, the eBGP peering can be established by using the interface address of each link and not the loopback address. As a result, the routers receive multiple paths—one for each link—and install all paths up to the maximum-paths value that was configured.
BGP Summary
The characteristics of BGP follow:
- BGP is an EGP used in routing on the Internet. It is an interdomain routing protocol.
- BGP is a path vector routing protocol suited for strategic routing policies.
- It uses TCP port 179 to establish connections with neighbors.
- BGPv4 implements CIDR.
- eBGP is used for external neighbors. It is used between different autonomous systems.
- iBGP is used for internal neighbors. It is used within an autonomous system.
- BGP uses several attributes in the routing-decision algorithm.
- It uses confederations and route reflectors to reduce BGP peering overhead.
- The MED attribute is used between autonomous systems to influence inbound traffic.
- Weight is used to influence the path of outbound traffic from a single router, configured locally.
- eBGP routes have an administrative distance of 20, and iBGP routes have an administrative distance of 200.