Troubleshooting guide
Additional BGP Configuration
28 Copyright © 2012 ADTRAN, Inc. 61200860L1-29.4E
Prepending Private AS Numbers for Load Balancing
A router sends identical routes to all neighbors unless policies are configured to filter and add
attributes to the routes. When service provider routers receive multiple identical routes from an
organization, it is up to the service provider to select the connection over which inbound traffic is sent
to the organization. The customer can attempt to load balance inbound traffic over multiple Internet
connections by influencing the service provider routers’ selection process. One way to accomplish this
is to prepend extra hops in the AS path of certain routes. For example, a router has two connections to
the Internet: one to Service Provider A and one to Service Provider B. Inbound traffic always arrives
over the connection from Service Provider A. Several fabricated AS hops can be prepended to the
routes for half of the private networks sent from the router to Service Provider A. The advertisements
containing extra AS hops would make the service provider routers more likely to route traffic destined
to these networks through Service Provider B.
To prepend AS hops to a route, a route map is created and the match command is used to select the
routes to which the router should prepend the AS hops. Generally, routes are selected according to
their network address and prefix length. However, routes can be selected according to other attributes
as well.
Use the set as-path prepend command to prepend the hops to the selected routes. The router can be
configured to prepend one or more fabricated AS hops to the selected routes.
(config-route-map)#set as-path prepend <number>
<number> Specifies a number to be prepended to the AS_PATH value as an AS number. Valid range is
1 to 4294967295.
Alternatively, the router can simply repeat the last AS in a route up to ten times.
(config-route-map)#set as-path prepend last-as <number>
<number> Specifies the number of times to repeat the last AS. Valid range is 1 to 10.
Setting a MED Metric
Another way to influence neighbors to select a certain connection for inbound traffic is to set different
metrics on the routes that are sent to separate neighbors. Since BGP prefers routes with a lower metric,
the connection to the neighbor that receives the route with the lowest metric is more likely to be
selected.
Refer to Route Map on page 23 for information on how to create a route map. Refer to
Filtering Routes According to Network IPv4 Address on page 25 for information on the
match command used to select routes according to network address and prefix length.
Be sure to consult with the service provider before prepending any fabricated AS
numbers to a path. It is important to ensure that the fabricated AS path does not conflict
with route policies that the service provider router implements. It is also important to
discuss with the ISP what BGP attributes they consider when making routing decisions.
This information will verify whether AS_PATH is a valid way to influence traffic to your
network.