Sunday 23 December 2007

BGP Summarization and Path-Selection

Objective In the previous exercises we have set up an inter-network spanning several AS’s. BGP is routing advertisement for several networks as you will have verified in with different “show ip” commands. Although it is not a large amount of advertisements, we can slim down our routing table with “Route Aggregation”. In larger networks aggregation is imperative.


Download Equipment list, configuration files and network topology. ccnp-c9t1.zip

Setup
This exercise starts where "Configuring Full-Mesh IBGP" ended. Above is a link to the completed config files of the "Configuring Full-Mesh IBGP" exercise. You may have to bring up some interfaces. Run “show ip interface brief” to work out which.

In this exercise it is a matter of only running one command on the edge routers and then discovering how this affects the networks.

On the edge routers, summarize the pod network to 10.1.0.0/16 to the core AS’s using the “aggregate-address” command with the “summary-only” option. You do not need to include the loopback interfaces of the internal routers in the summary.
P1R1(config-router)#aggregate-address 10.1.0.0 255.255.0.0 summary-only
P1R1(config-router)#end

Telnet to either of the backbone routers. Now, have a look at the routing tables. Can you see where the aggregate address is for your pod?

The following output is from the BBR2 router.
BBR2>sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

172.31.0.0/16 is variably subnetted, 3 subnets, 2 masks
B 172.31.1.0/24 [20/0] via 10.254.0.1, 05:43:37
R 172.31.0.0/16 [120/1] via 10.254.0.1, 00:00:29, Ethernet0/0
C 172.31.11.0/24 is directly connected, Serial0/0.1
10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
B 10.97.97.0/24 [20/0] via 10.254.0.3, 06:25:30
B 10.1.0.0/16 [20/0] via 172.31.11.1, 00:07:39
C 10.254.0.0/24 is directly connected, Ethernet0/0
BBR2>

Can you still ping the internal routers from the backbone?
BBR1#ping 10.1.3.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.2.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/50/52 ms
BBR1#

With the summary-only option, the more specific routes are suppressed. This is indicated in the BGP table with the “s” character at the start of the line.
P1R1>sh ip bgp
BGP table version is 18, local router ID is 10.200.200.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
s> 10.1.0.0/24 0.0.0.0 0 32768 i
* i10.1.0.0/16 10.1.0.2 0 100 0 i
*> 0.0.0.0 32768 i
s> 10.1.1.0/24 0.0.0.0 0 32768 i
s> 10.1.2.0/24 10.1.1.3 2 32768 i
s> 10.1.3.0/24 10.1.1.3 1 32768 i
* i10.97.97.0/24 172.31.11.4 0 100 0 64999 64997 i
* 172.31.11.4 0 64999 64997 i
*> 172.31.1.3 0 64998 64997 i
* i10.254.0.0/24 172.31.1.3 0 100 0 64998 i
* 172.31.11.4 0 64999 64998 i
*> 172.31.1.3 0 0 64998 i
r i172.31.1.0/24 172.31.1.3 0 100 0 64998 i
r 172.31.11.4 0 64999 64998 i
r> 172.31.1.3 0 0 64998 i
r i172.31.11.0/24 172.31.11.4 0 100 0 64999 i
r> 172.31.11.4 0 0 64999 i
Network Next Hop Metric LocPrf Weight Path
r 172.31.1.3 0 64998 64999 i
P1R1>

Path-Selection:

You’ll notice in the BGP Table there are 3 routes to the 10.97.97.0 network.
* i10.97.97.0/24 172.31.11.4 0 100 0 64999 64997 i
* 172.31.11.4 0 64999 64997 i
*> 172.31.1.3 0 64998 64997 i

I’ll use these routes as an opportunity to run over route selection briefly and introduce the “show ip bgp network” command.
P1R1>sh ip bgp 10.97.97.0
BGP routing table entry for 10.97.97.0/24, version 4
Paths: (3 available, best #3, table Default-IP-Routing-Table)
Advertised to non peer-group peers:
10.1.0.2 10.200.200.13 10.200.200.14 172.31.11.4
64999 64997
172.31.11.4 from 10.1.0.2 (10.200.200.12)
Origin IGP, metric 0, localpref 100, valid, internal
64999 64997
172.31.11.4 from 172.31.11.4 (172.31.22.4)
Origin IGP, localpref 100, valid, external
64998 64997
172.31.1.3 from 172.31.1.3 (172.31.2.3)
Origin IGP, localpref 100, valid, external, best
P1R1>

The weight & local preference are the same for all routes so this does not decide on route selection. Nor are any of the routes originated from the local router.
All the AS paths are the same length, as are the origin codes & the MED’s.

Therefore the path-selection process looks at EBGP vs IBGP with a preference to EBGP. Finally one of the candidates is eliminated as it has an “internal” reference. Two routes are left and at this stage the path-selection process chooses the router with the lowest neighbor BGP route-id. The route through 172.31.1.3 is preferred over the route through 172.31.11.4

No comments: