Thursday, January 31, 2008

Redistributing customer routes into BGP

Redistributing customer routes into BGP

For example, if you use static routing with your customers and want to redistribute the static routes into BGP, use the following configuration (I’ve used tag 123 to tag static routes that should get inserted into
BGP).

router bgp 65001
redistribute static route-map StaticToBGP
!
route-map StaticToBGP permit 10
match tag 123
set community no-export additive

When you configure a static route toward the IP subnet 10.1.2.0/24 …

ip route 10.1.2.0 255.255.255.0 Null0 tag 123

… it’s automatically inserted in the BGP table and marked with the no-export community:


R1#show ip bgp 10.1.2.0
BGP routing
table entry for 10.1.2.0/24, version 3
Advertised to
update-groups:
1
Local
0.0.0.0 from 0.0.0.0 (10.0.1.1)
Origin
incomplete, metric 0, localpref 100, weight 32768, valid, sourced,
best
Community: no-export

No comments: