From: Ouellette, Tim (tim.ouellette@eds.com)
Date: Sat Jan 11 2003 - 19:03:50 GMT-3
This is just a test, wondering why my last email didn't make it to the
groupstudy list but Sage got it okay...
R6-----R7------r2
R6 is advertise via ebgp 0.0.0.0/0 and 10.0.0.0/8 to r7 who is inturn
advertising via IBGP to r2
I then put a ADVERTISE map & NON_EXIST map on r7 to say only advertise
0.0.0.0 when 10.0.0.0/8 doesn't exist
Here's the quick config of r7 ( the box that will supress the 0.0.0.0 unless
10.x doesn't exist)
router bgp 3
neighbor 172.16.50.1 advertise-map ADVERTISE non-exist-map NON_EXIST
access-list 1 permit 10.0.0.0 0.255.255.255
access-list 2 permit 0.0.0.0 log
route-map NON_EXIST permit 10
match ip address 1
!
route-map ADVERTISE permit 10
match ip address 2
Here is the "sh ip bgp neighbor" of router 2
Notice the line that says WITHDREW. That means your conditional advertising
is holding back the other route so to speak.
r7#sh ip bgp neigh 172.16.50.1
BGP neighbor is 172.16.50.1, remote AS 3, internal link
<snippet>
For address family: IPv4 Unicast
BGP table version 19, neighbor version 19
Index 2, Offset 0, Mask 0x4
NEXT_HOP is always this router
Condition-map NON_EXIST, Advertise-map ADVERTISE, status: Withdraw
I'll turn on debugging so you can see. I'm going to shutdown the loopback
on r6 so that the advertise condition breaks
(the 10.0.0.0/8 is about to go away, so it'll advertise the 0.0.0.0 route)
*Feb 28 22:47:52: BGP(0): 172.16.20.1 rcv UPDATE about 10.0.0.0/8 --
withdrawn
<snippet>
*Feb 28 22:47:52: BGP(0): 172.16.50.1 send unreachable 10.0.0.0/8
*Feb 28 22:47:52: BGP(0): 172.16.50.1 send UPDATE 10.0.0.0/8 -- unreachable
*Feb 28 22:47:52: BGP(0): 172.16.50.1 1 updates enqueued (average=25,
maximum=25)
*Feb 28 22:48:06: BGP: Performing BGP general scanning
*Feb 28 22:48:06: BGP(0): scanning IPv4 Unicast routing tables
*Feb 28 22:48:06: BPG(0): Condition NON_EXIST changes to Advertise
<----------- HERE IS THE MONEY LINE!
*Feb 28 22:48:07: BGP(IPv4 Unicast): Performing BGP Nexthop scanning for
general scan
*Feb 28 22:48:07: BGP(0): net 0.0.0.0/0 matches ADV MAP ADVERTISE: bump
version to 21
*Feb 28 22:48:07: BGP(0): 172.16.50.1 0.0.0.0/0 matches advertise map
ADVERTISE, state: Advertise
*Feb 28 22:48:18: %SEC-6-IPACCESSLOGS: list 2 permitted 0.0.0.0 2 packets
Meanwhile on R2, Here's r2 getting the 10.0.0.0/8 network withdrawn and
then receiving the 0.0.0.0/0 default.
r2#
*Feb 28 22:48:01: BGP(0): 172.16.70.1 rcv UPDATE about 10.0.0.0/8 --
withdrawn
*Feb 28 22:48:01: BGP(0): no valid path for 10.0.0.0/8
*Feb 28 22:48:01: BGP(0): nettable_walker 10.0.0.0/8 no best path
*Feb 28 22:48:01: RT: del 10.0.0.0 via 172.16.70.1, bgp metric [200/0]
*Feb 28 22:48:01: RT: delete network route to 10.0.0.0
And then it advertises the 0.0.0.0 route as you can see!!!!
r2#
*Feb 28 22:48:16: BGP(0): 172.16.70.1 rcvd UPDATE w/ attr: nexthop
172.16.70.1, origin i, localpref 100, metric 0, path 1
*Feb 28 22:48:16: BGP(0): 172.16.70.1 rcvd 0.0.0.0/0
*Feb 28 22:48:16: BGP(0): Revise route installing 0.0.0.0/0 -> 172.16.70.1
to main IP table
*Feb 28 22:48:16: RT: add 0.0.0.0/0 via 172.16.70.1, bgp metric [200/0]
*Feb 28 22:48:16: RT: default path is now 0.0.0.0 via 172.16.70.1
*Feb 28 22:48:16: RT: new default network 0.0.0.0
When r7 got the route that it used to hold/supress the other route, it put
it in its bgp table. It then waited
until it's normal scan time to see if the "feasible" condition or advertise
condition was met. After it was (meaning
the route that causes the trigger was missing) then the default got
advertised.
Lemme know if you need some more info.
Tim
-----Original Message-----
From: Sage Vadi [mailto:sagevadi@yahoo.co.uk]
Sent: Friday, January 10, 2003 11:27 PM
To: ccielab@groupstudy.com
Subject: BGP: Conditional Advertisement
Dear all,
router bgp 5
neighbor b.b.b.b advertise-map x exist-map y
x = advertise this
y = if this exists
I want to send a default-route into my ATM cloud.
Condition: IF 'x' BGP route is in my route table
generate default route into ATM cloud.
Q) How can I do this?
NB: the ATM cloud is NOT running BGP. So basically
what I want this box to do, is that upon receiving a
particular BGP route, to generate a default route into
the ATM cloud. I think should be able to be done using
route-maps and matching on default-route...
... how exactly I am dumfounded, as I have only done
conditional advertising to BGP peers before.
PS:)- obviously I can do the exist-map part. I'm stuck
on the advertise-map!!!
Cheers,
Sage
This archive was generated by hypermail 2.1.4 : Sat Feb 01 2003 - 07:33:47 GMT-3