BGP redistribution tips
Vikas Aggarwal
aggarwal at nisc.jvnc.net
Mon Nov 15 12:13:49 UTC 1993
Folks,
I had taken notes during my last (whenever it was) fiasco with
redistributing IGP and BGP routes into each other. Finally got
a chance to type it all up... am posting it to this list
for feedback.
Sorry if its a bit Cisco centric!!
-vikas (609) 897-7307
vikas at jvnc.net ...rutgers!jvncnet!vikas
-------------------------------------------------------------------------
BGP Route Redistribution
========================
Vikas Aggarwal
(vikas at jvnc.net)
(Some notes on redistributing BGP -> IGP routes... a 'bit' inclined
towards cisco routers).
There are 3 kinds of IP routes on ciscos (pertaining to BGP):
1. External: learnt from external BGP peers (other AS's)
2. Internet: learnt via IBGP from other routers within the same AS
3. Local: those nets that are explicitly listed using
"network x.y.z" in the BGP routing process.
BGP has a routing table separate from the main routing table.
By default, BGP will advertise all those nets that are listed using
'network x.y.z' AND exist in the IGP/static routing table.
Remember, IBGP neighbors need not be on the same net/subnet. However,
EBGP neighbors HAVE to be on the same subnet.
A.
--
In practice, it is 'difficult' for sites with large number of nets to list
every net that they carry in their IGP using "network x.y.z". They usually
trust the routes in their IGP and want to advertise *all* (or most) of the
IGP routes via BGP to the external peers.
Thus, one would use:
router bgp 97
redistribute igrp 97
Note that IGRP-97 must not have *any* static/other routing information
about sites that are NOT part of the local AS (since the redistribution
is based on the assumption that the IGP only carries local AS routes).
redist
IGP Routing ------------> BGP Routing
Table Table
If you *do* redistribute non-local nets into your IGP (e.g. for default
net 140.222), then you must put a filter to block redistributing these
non-local nets into the BGP routing table. Else you will announce exterior
(and non-local routes) to your exterior neighbors.
B.
--
The IGP routes redistributed into BGP will show up in the BGP table
with the 'incomplete' attribute (and listed as '?'). On the other hand,
if you list IGP networks using 'network x.y.z', then these nets will
show up in BGP table with the 'igp' attribute (listed as a 'i').
AS path filters (regular expressions) for BGP should ignore the '?' and
the 'i' that show up in the output of 'show ip bgp'. Instead match these
using the NULL string:
ip as-path access-list 3 permit ^$
C.
--
The last aspect is redistributing BGP information into your IGP (e.g.
for injecting default exterior net 140.222 into your IGP). The problem
here is that in this sort of redistribution, the AS path information is
lost and the information appears to come from the IGP (not BGP). This
might cause a routing loop.
redist
IGP Routing ------------> BGP Routing --- 140.222 (via external
Table <----------- Table peer )
Normally, the BGP info will override the redistributed IGP information
because EBGP has a lower distance (more trusted), and the route to
140.222 will be stable. However, if the route is lost via the EBGP
peer, then the route will loop between the IGP and the BGP routing
tables since each will listen to the other's update on this net.
More information about the NANOG
mailing list