
The BGP Best Path Algorithm determines how the best path to an autonomous system is selected. The most common value that is used to determine the best path is the AS Path length. When two or more routes exist to reach a particular prefix the default in BGP is to prefer the route with the shortest AS Path length.
If we are a multi-homed customer of one or more service providers, we may prefer that incoming traffic take a particular path to reach our network. Perhaps we have two connections, but one costs only half as much as the other. Or, we may have one connection much faster than the other connection and we really only want to use the slower connection as a “backup” if our primary connection is down. Regardless of your reasons, AS-Path prepending is probably the easiest way to manipulate the AS-Path attribute of a BGP route.
Learning Objectives:
- Review of basic router configuration.
- Review of basic BGP configuration.
- Understand and configure AS-Path prepending.
In this free CCNP GNS3 lab we will use GNS3 to construct a simple multi-homed network consisting of four autonomous systems across five Cisco routers and a single switch, after which we will configure AS-Path Prepend to control the BGP autonomous system path.
Basic Configuration:
- Configure IP addresses and subnet mask on Loopback interfaces of all routers as shown in the network diagram.
- Configure IP addresses and subnet mask on Fastethernet interfaces of all routers as shown in the network diagram.
- Configure IP addresses and subnet mask on Serial interfaces of all routers as shown in the network diagram.
- Insure that all Fastethernet and serial interfaces are not administrative down.
OSPF Configuration:
- Enable OSPF process 100 on R4 and R5.
- Configure the 4.4.4.4/32 network on R4 as part of the OSPF.
- Configure the 150.45.45.0/29 network on R4 as part of the OSPF.
- Configure the 5.5.5.5/32 network on R4 as part of the OSPF.
- Configure the 150.45.45.0/29 network on R4 as part of the OSPF.
- Display the OSPF routing tables on R4 and R5.
Basic BGP Configuration:
- Enable BGP routing process on R1 in AS 65101.
- Configure R2 and R3 as R1 neighbors.
- Advertise the 1.1.1.1/32 network.
- Enable BGP routing process on R2 in AS 65102.
- Configure R1 and R4 as R2 neighbors.
- Enable BGP routing process on R3 in AS 65103.
- Configure R1 and R5 as R3 neighbors.
- Enable BGP routing process on R4 and R5 in AS 65145.
- Configure R2 and R5 as R4 neighbors.
- Configure R4 to use Lo0 interface as the BGP update source.
- Advertise the 150.45.45.0/29 network on R4.
- Configure R3 and R4 as R5 neighbors.
- Configure R5 to use Lo0 interface as the BGP update source.
- Advertise the 150.45.45.0/29 network on R4.
BGP Prepend Configuration:
- Display the routing tables on R4
- On R1 do the following:
- Create a prefix-list named NET-1 to permit the 1.1.1.1/32 network.
- Create a route-map named RM-AS_PATH to set the as-path prepend to 1 for ip addresses matching the NET-1 prefix-list.
- Apply the route-map to the 10.10.12.2 neighbor.
- Display the routing tables on R4
- Display the routing tables on R1.
- On R4 do the following:
- Create a prefix-list named NET-150 to permit the 150.45.45.0/26 network.
- Create a route-map named RM-AS_PATH to set the as-path prepend to 45 for ip addresses matching the NET-150 prefix-list.
- Apply the route-map to the 24.0.0.1 neighbor.
- Display the routing tables on R1.
Download this lab now for full details: AS-Path Prepend (125.2 KiB, 2,373 hits)
