Lab 8.8.6 Changing the Local Preference

Objectives:

Configure the Local Preference attribute to indicate a preferred route to a destination with multiple routes.

Scenario:

You are the network administrator in AS 100. As shown in the diagram, network 170.10.0.0 can be reached via network 3.0.0.0 and 4.0.0.0. Configure the Local Preference attribute on Router C to prefer the 4.0.0.0 network over the 3.0.0.0 network.

Lab Tasks:

  1. Cable the lab and address the interfaces as shown in the graphic. Use the default subnet mask for all addresses. All Ethernet interfaces should use the .1 address. For example, 12.0.0.1.

  2. Enable BGP routing on each router. The configurations should be as follows:

RouterC(config)#router bgp 100
RouterC(config-router)#no synchronization
RouterC(config-router)#neighbor 3.3.3.1 remote-as 300
RouterC(config-router)#neighbor 4.4.4.2 remote-as 100
RouterC(config-router)#network 4.0.0.0

RouterB(config)#router bgp 100
RouterB(config-router)#neighbor 4.4.4.1 remote-as 100
RouterB(config-router)#neighbor 2.2.2.1 remote-as 300
RouterB(config-router)#no synchronization
RouterB(config-router)#network 4.0.0.0

RouterA(config)#router bgp 300
RouterA(config-router)#network 170.10.0.0
RouterA(config-router)#neighbor 2.2.2.2 remote-as 100
RouterA(config-router)#neighbor 3.3.3.2 remote-as 100

  1. Verify that you can see network 170.10.0.0 in the routing table of each router. Use the show ip route and show ip bgp commands to do this.

  2. Issue the show ip bgp command on Router C. What is the current preferred route to network 170.10.0.0?

  1. List the different paths to network 170.10.0.0.

  1. How do you know which path is preferred?

  1. Now it is time to change the preferred route. We are going to use a route map to accomplish this.

  2. Configure the route map as follows:

RouterC(config)#route-map setlocalpref permit 10
RouterC(config)#set local-preference 200

Since the default preference of the BGP route is 100, this route map will give a higher preference to the updates coming from network 4.0.0.0.

  1. The last step is to assign the route map to a neighbor. We want to apply it to updates coming from Router B IN to Router C. To do this issue the following commands:

RouterC(config)#router bgp 100
RouterC(config-router)#neighbor 4.4.4.2 route-map setlocalpref in

  1. Now issue the clear ip bgp * command on Router C and wait a few seconds for the router to relearn the routes.

  2. Issue the command show ip bgp. What is different about the bpg routing table?

  1. Which route is preferred to network 170.10.0.0?

  1. Is the Local preference applied to any other routes?