cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1470
Views
0
Helpful
2
Replies

BGP to OSPF redistribution

bcbvale
Level 1
Level 1

I need to redistribute some, not all, of my BGP routes into OSPF. What would be the best way to do this?

Thanks,

bcbv

2 Replies 2

ahojmark
Level 1
Level 1

Redistribution can be controlled in several ways, and which one is 'best' really depends on what you're trying to achieve. One of the most flexible ways is by using route maps, such as the following example (off the top of my head):

router ospf 1

bla. bla.

router bgp 65101

redist ospf 1 route-map SOME-ROUTES

route-map SOME-ROUTES permit 10

match ip address 10

access-list 10 deny 10.0.0.0 0.3.255.255

access-list 10 permit 10.0.0.0 0.255.255.255

access-list 10 permit 172.16.0.0 0.0.255.255

You can also match on tons of other stuff, such as metrix, next hop etc. in the route map

-A

Asbjoern Hoejmark | CTO | CCIE #8525
Wingmen Solutions A/S | Gyngemose Parkvej 50, 1. | DK-2860 Søborg | Denmark
M: +4525162108 | E: ah@wingmen.dk | W: www.wingmen.dk

ERIK LAWAETZ
Level 1
Level 1

A generic config:

router bgp 99999

....

router ospf 99999

redistribute bgp 99999 subnets route-map bgp2ospf out

....

route-map bgp2ospf permit 10

match ...

http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/12cgcr/np1_c/1cprt1/1cospf.htm#5439

http://www.cisco.com/pcgi-bin/Support/browse/psp_view.pl?p=Internetworking:OSPF&s=Implementation_and_Configuration

http://www.cisco.com/pcgi-bin/Support/browse/psp_view.pl?p=Internetworking:BGP&s=Implementation_and_Configuration

The important thing here is that you need to determine which routes you want to redistribute and how to match them in the route map, be it based on AS number of specific IP prefixes.

You should be very restrictive about what you redistribute into your IGP from BGP!