From: Brian McGahan (brian@cyscoexpert.com)
Date: Thu Jul 03 2003 - 02:46:55 GMT-3
Jason,
This is default behavior in BGP; you only advertise your best
routes.
Suppose that two routers R1 and R2 are iBGP peers in AS 1 and
are both peering with AS 2. AS 2 is advertising prefix X to AS 1. For
one reason or another, R1 is routing through R2 to get to prefix X
instead of routing directly towards AS 2. If R1 were to advertise its
route through AS 2 to prefix X to R2, R1 runs the risk of R2 routing
through R1 to get to prefix X. If R1 routes through R2 to get to prefix
X, and R2 routes through R1 to get to prefix X... you get the picture.
In addition to this, only advertising your best routes cuts down
on the size of the BGP table. Here's a snapshot from a cable wireless
route-server:
route-server.cw.net>sh ip bgp sum | in network
134280 network entries and 268552 paths using 22155912 bytes of memory
As you can see, the global routing table is over 130000 prefixes
now.
Suppose we have a topology as follows:
R1 R2 R3 R4
\/ \/
R5 R6
\_R7_/
R5 and R6 are taking full BGP from two peers each, R1 & R2 and
R3 & R4 respectively. R5 and R6 each have over 260000 total paths now.
Now suppose that R5 & R6 advertise ALL of these prefixes to R7, not just
their best routes. R7 now has more than 500000 paths. Keep cascading
this and you get the idea.
By only advertising your best path in BGP, you ensure that your
neighbor is not routing through you to reach a prefix which you are
routing through them to get to, and you reduce the size of your
neightbors' BGP tables.
HTH
Brian McGahan, CCIE #8593
Director of Design and Implementation
brian@cyscoexpert.com
CyscoExpert Corporation
Internetwork Consulting & Training
Toll Free: 866.CyscoXP
Fax: 847.674.2625
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
Of
> Jason Cash
> Sent: Wednesday, July 02, 2003 8:20 PM
> To: ccielab@groupstudy.com
> Subject: BGP activity - withdrawn routes
>
> I am working on a BRP issue and this is making absolutely no sense R5
is
> getting three routes from BGP neighbors R2 and R6. Here is the topo
>
>
>
> R2(s0)----(s0)R5(e0)-----(e0)R6
>
>
>
> The problem is when I need to prefer the routes from R1 over R6
> (originating
> from AS1 over AS9).
>
>
>
> R5
>
> !
>
> router bgp 567
>
> no synchronization
>
> bgp log-neighbor-changes
>
> neighbor 192.168.2.2 remote-as 24
>
> neighbor 192.168.2.2 ebgp-multihop 5
>
> neighbor 192.168.2.2 update-source Loopback0
>
> neighbor 192.168.6.6 remote-as 567
>
> neighbor 192.168.6.6 update-source Loopback0
>
> neighbor 192.168.7.7 remote-as 567
>
> neighbor 192.168.7.7 update-source Loopback0
>
> no auto-summary
>
>
>
> r5#sb
>
> BGP table version is 5, local router ID is 192.168.5.5
>
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal
>
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
>
>
> Network Next Hop Metric LocPrf Weight Path
>
> * 10.34.19.0/28 192.168.2.2 0 24 1 i
>
> *>i 192.168.9.9 0 100 0 9 i
>
> * 10.34.19.16/28 192.168.2.2 0 24 1 i
>
> *>i 192.168.9.9 0 100 0 9 i
>
> * 10.34.19.32/28 192.168.2.2 0 24 1 i
>
> *>i 192.168.9.9 0 100 0 9 i
>
> *>i172.16.80.0/27 192.168.7.7 0 100 0 7 8 ?
>
>
>
>
>
> This is where it gets screwed up. I add the following to R5:
>
>
>
> ip as-path access-list 1 permit _1
>
> !
>
> access-list 5 permit 10.34.19.0 0.0.0.63
>
> route-map setlp permit 10
>
> match as-path 1
>
> set local-preference 150
>
> !
>
> router bgp 567
>
> neighbor 192.168.2.2 route-map setlp in
>
>
>
> Then clear BGP and then, the BGP table looks like this:
>
>
>
> r5#sb
>
> BGP table version is 5, local router ID is 192.168.5.5
>
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal
>
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
>
>
> Network Next Hop Metric LocPrf Weight Path
>
> *> 10.34.19.0/28 192.168.2.2 150 0 24 1 i
>
> *> 10.34.19.16/28 192.168.2.2 150 0 24 1 i
>
> *> 10.34.19.32/28 192.168.2.2 150 0 24 1 i
>
> *>i172.16.80.0/27 192.168.7.7 0 100 0 7 8 ?
>
>
>
> AARRRH! What the hell is happening? As you can see in a 'debug ip
bgp
> update' the routes from neighbors 192.168.6.6/.7.7 are being
"withdrawn" I
> have no idea why. Could someone please
>
> Help on this cause I am banging my head and it isn't to music:
>
>
>
> r5#clear ip bgp *
>
> r5#
>
> 1d00h: %BGP-5-ADJCHANGE: neighbor 192.168.2.2 Down User reset
>
> 1d00h: %BGP-5-ADJCHANGE: neighbor 192.168.6.6 Down User reset
>
> 1d00h: %BGP-5-ADJCHANGE: neighbor 192.168.7.7 Down User reset
>
> r5#
>
> r5#
>
> 1d00h: %BGP-5-ADJCHANGE: neighbor 192.168.7.7 Up
>
> 1d00h: BGP(0): 192.168.7.7 rcvd UPDATE w/ attr: nexthop 192.168.7.7,
> origin
> ?, localpref 100, metric 0, path 7 8
>
> 1d00h: BGP(0): 192.168.7.7 rcvd 172.16.80.0/27
>
> 1d00h: %BGP-5-ADJCHANGE: neighbor 192.168.6.6 Up
>
> 1d00h: BGP(0): 192.168.6.6 rcvd UPDATE w/ attr: nexthop 192.168.9.9,
> origin
> i, localpref 100, metric 0, path 9
>
> 1d00h: BGP(0): 192.168.6.6 rcvd 10.34.19.0/28
>
> 1d00h: BGP(0): 192.168.6.6 rcvd 10.34.19.16/28
>
> 1d00h: BGP(0): 192.168.6.6 rcvd 10.34.19.32/28
>
> 1d00h: %BGP-5-ADJCHANGE: neighbor 192.168.2.2 Up
>
> 1d00h: BGP(0): 192.168.2.2 rcv UPDATE w/ attr: nexthop 192.168.2.2,
origin
> ?, originator 0.0.0.0, path 24 567 7 8, community , extended community
>
> 1d00h: BGP(0): 192.168.2.2 rcv UPDATE about 172.16.80.0/27 -- DENIED
due
> to:
> AS-PATH contains our own AS;
>
> 1d00h: BGP(0): 192.168.2.2 rcvd UPDATE w/ attr: nexthop 192.168.2.2,
> origin
> i, path 24 1
>
> 1d00h: BGP(0): 192.168.2.2 rcvd 10.34.19.0/28
>
> 1d00h: BGP(0): 192.168.2.2 rcvd 10.34.19.16/28
>
> 1d00h: BGP(0): 192.168.2.2 rcvd 10.34.19.32/28
>
> 1d00h: BGP(0): Revise route installing 10.34.19.0/28 -> 192.168.2.2 to
> main
> IP table
>
> 1d00h: BGP(0): Revise route installing 10.34.19.16/28 -> 192.168.2.2
to
> main
> IP table
>
> 1d00h: BGP(0): Revise route installing 10.34.19.32/28 -> 192.168.2.2
to
> main
> IP table
>
> 1d00h: BGP(0): Revise route installing 172.16.80.0/27 -> 192.168.7.7
to
> main
> IP table
>
> 1d00h: BGP(0): 192.168.6.6 computing updates, afi 0, neighbor version
0,
> table version 5, starting at 0.0.0.0
>
> 1d00h: BGP(0): 192.168.6.6 NEXT_HOP part 1 net 10.34.19.0/28, next
> 192.168.2.2
>
> 1d00h: BGP(0): 192.168.6.6 send UPDATE (format) 10.34.19.0/28, next
> 192.168.2.2, metric 0, path 24 1
>
> 1d00h: BGP(0): 192.168.6.6 NEXT_HOP part 1 net 10.34.19.16/28, next
> 192.168.2.2
>
> 1d00h: BGP(0): 192.168.6.6 send UPDATE (prepend, chgflags: 0x208)
> 10.34.19.16/28, next 192.168.2.2, metric 0, path 24 1
>
> 1d00h: BGP(0): 192.168.6.6 NEXT_HOP part 1 net 10.34.19.32/28, next
> 192.168.2.2
>
> 1d00h: BGP(0): 192.168.6.6 send UPDATE (prepend, chgflags: 0x208)
> 10.34.19.32/28, next 192.168.2.2, metric 0, path 24 1
>
> 1d00h: BGP(0): 192.168.6.6 1 updates enqueued (average=65, maximum=65)
>
> 1d00h: BGP(0): 192.168.6.6 update run completed, afi 0, ran for 40ms,
> neighbor version 0, start version 5, throttled to 5
>
> 1d00h: BGP: 192.168.6.6 initial update completed
>
> 1d00h: BGP(0): 192.168.7.7 computing updates, afi 0, neighbor version
0,
> table version 5, starting at 0.0.0.0
>
> 1d00h: BGP(0): 192.168.7.7 NEXT_HOP part 1 net 10.34.19.0/28, next
> 192.168.2.2
>
> 1d00h: BGP(0): 192.168.7.7 send UPDATE (format) 10.34.19.0/28, next
> 192.168.2.2, metric 0, path 24 1
>
> 1d00h: BGP(0): 192.168.7.7 NEXT_HOP part 1 net 10.34.19.16/28, next
> 192.168.2.2
>
> 1d00h: BGP(0): 192.168.7.7 send UPDATE (prepend, chgflags: 0x208)
> 10.34.19.16/28, next 192.168.2.2, metric 0, path 24 1
>
> 1d00h: BGP(0): 192.168.7.7 NEXT_HOP part 1 net 10.34.19.32/28, next
> 192.168.2.2
>
> 1d00h: BGP(0): 192.168.7.7 send UPDATE (prepend, chgflags: 0x208)
> 10.34.19.32/28, next 192.168.2.2, metric 0, path 24 1
>
> 1d00h: BGP(0): 192.168.7.7 1 updates enqueued (average=65, maximum=65)
>
> 1d00h: BGP(0): 192.168.7.7 update run completed, afi 0, ran for 40ms,
> neighbor version 0, start version 5, throttled to 5
>
> 1d00h: BGP: 192.168.7.7 initial update completed
>
> 1d00h: BGP(0): 192.168.6.6 rcv UPDATE about 10.34.19.0/28 -- withdrawn
>
> 1d00h: BGP(0): 192.168.6.6 rcv UPDATE about 10.34.19.16/28 --
withdrawn
>
> 1d00h: BGP(0): 192.168.6.6 rcv UPDATE about 10.34.19.32/28 --
withdrawn
>
> 1d00h: BGP(0): 192.168.2.2 computing updates, afi 0, neighbor version
0,
> table version 5, starting at 0.0.0.0
>
> 1d00h: BGP(0): 192.168.2.2 send UPDATE (format) 172.16.80.0/27, next
> 192.168.5.5, metric 0, path 7 8
>
> 1d00h: BGP(0): 192.168.2.2 1 updates enqueued (average=50, maximum=50)
>
> 1d00h: BGP(0): 192.168.2.2 update run completed, afi 0, ran for 16ms,
> neighbor version 0, start version 5, throttled to 5
>
> 1d00h: BGP: 192.168.2.2 initial update completed
>
> r5#
>
> r5#sb
>
> BGP table version is 5, local router ID is 192.168.5.5
>
> Status codes: s suppressed, d damped, h history, * valid, > best, i -
> internal
>
> Origin codes: i - IGP, e - EGP, ? - incomplete
>
>
>
> Network Next Hop Metric LocPrf Weight Path
>
> *> 10.34.19.0/28 192.168.2.2 150 0 24 1 i
>
> *> 10.34.19.16/28 192.168.2.2 150 0 24 1 i
>
> *> 10.34.19.32/28 192.168.2.2 150 0 24 1 i
>
> *>i172.16.80.0/27 192.168.7.7 0 100 0 7 8 ?
>
>
>
This archive was generated by hypermail 2.1.4 : Wed Aug 06 2003 - 06:52:20 GMT-3