Tshoot BGP: Path unchanged despite local preference has been modified.

1841-1 = 1.1.1.1, 1841-2 = 2.2.2.2, 2651-1 = 3.3.3.3, 2651-2 = 4.4.4.4

All routers within their own AS has been configured with IGP, routers within their own AS are reachable to one another (imagine the above diagram is part of an AS network). The border routers are connected to each other AS and exchanging prefixes.

As shown in the diagram, two paths have different bandwidth, suboptimal routing is occurring. The requirement is to use 4mbps to reach the 172 networks (172.30.0.0/24 and 172.30.1.0/24), the remaining networks can use the default path as shown in show ip bgp command.

1841-2 to network 172.30.0.0/24  and 172.30.1.0/24 before path manipulation

Notice the path to network 172.30.0.0/24 and 172.30.1.0/24, the outbound exits to 2651-2

Influence traffic destined for 172.30.0.0/24 and 172.30.1.0/24 to use 4mbps

1841-1#sh run | i access-list 1
access-list 1 permit 172.30.0.0 0.0.0.255
access-list 1 permit 172.30.1.0 0.0.0.255

1841-1(config)#do sh run | s route-map
route-map set-pref permit 10
match ip address 1
set local-preference 200
route-map set-pref permit 20
set local-preference 100

1841-1(config-router)#neighbor 3.3.3.3 route-map set-pref in

1841-1#clear ip bgp * soft

BGP table of 1841-2 still chose next-hop 4.4.4.4 as best path to 172 network

Hmm...no change in best route? BGP prefers route with the highest local preference.

1841-2 does not have a route to 3.3.3.3 in RIB

1841-2#sh ip route | b Gateway
Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
O       1.1.1.1 [110/2] via 192.168.1.1, 02:50:48, FastEthernet0/0
2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback100
100.0.0.0/30 is subnetted, 1 subnets
C       100.1.10.4 is directly connected, Serial0/1/0
4.0.0.0/32 is subnetted, 1 subnets
S       4.4.4.4 [1/0] via 100.1.10.6
172.30.0.0/24 is subnetted, 2 subnets
B       172.30.0.0 [20/2] via 4.4.4.4, 00:08:45
B       172.30.1.0 [20/0] via 4.4.4.4, 00:30:53
10.0.0.0/24 is subnetted, 2 subnets
B       10.10.10.0 [20/2] via 4.4.4.4, 01:22:44
B       10.10.20.0 [20/0] via 4.4.4.4, 01:21:39
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
O       192.168.1.1/32 [110/1] via 192.168.1.1, 02:50:48, FastEthernet0/0
C       192.168.1.0/24 is directly connected, FastEthernet0/0
C    192.168.2.0/24 is directly connected, Loopback2
O    192.168.3.0/24 [110/2] via 192.168.1.1, 02:49:37, FastEthernet0/0

1841-2#sh ip bgp 172.30.0.0
BGP routing table entry for 172.30.0.0/24, version 18
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
200
3.3.3.3 (inaccessible) from 1.1.1.1 (1.1.1.1)
Origin IGP, metric 0, localpref 200, valid, internal
200
4.4.4.4 from 4.4.4.4 (4.4.4.4)
Origin IGP, metric 2, localpref 100, valid, external, best
1841-2#sh ip bgp 172.30.1.0
BGP routing table entry for 172.30.1.0/24, version 16
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
2
200
3.3.3.3 (inaccessible) from 1.1.1.1 (1.1.1.1)
Origin IGP, metric 2, localpref 200, valid, internal
200
4.4.4.4 from 4.4.4.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, external, best

So the reason the path was not chosen despite local preference was changed is because 3.3.3.3 is unreachable!

Neighbor <peer ip> next-hop-self command

1841-2(config)#router bgp 100
1841-2(config-router)#neighbor 1.1.1.1 next-hop-self

1841-1(config)#router bgp 100
1841-1(config-router)#neighbor 2.2.2.2 next-hop-self

1841-1 has a static route to 3.3.3.3 of 2651-1 but 1841-2 does not, the command is to modify the next-hop address of the sending router.

Path manipulation succeed!

Best paths to 172 network are chosen as required. Also notice next-hop has been changed.

Make sure the route is reachable by IGP within your own AS!

Verify reachability from 1841-2

 

Verify multiple destination reachability through tcl scripting.

1841-2#sh ip route bgp
172.30.0.0/24 is subnetted, 2 subnets
B       172.30.0.0 [200/0] via 1.1.1.1, 00:20:38
B       172.30.1.0 [200/2] via 1.1.1.1, 00:20:38
10.0.0.0/24 is subnetted, 2 subnets
B       10.10.10.0 [20/2] via 4.4.4.4, 01:46:00
B       10.10.20.0 [20/0] via 4.4.4.4, 01:44:55

Advertisements
This entry was posted in BGP, Route, Tshoot and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s