cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1082
Views
0
Helpful
4
Replies

convert OSPF interarea routes (IA) to OSPF E1 for BGP redistrib

dmooreami
Level 3
Level 3

I can barely spell OSPF, much less convert it. But here goes.

I need to convert all OSPF inter area routes (IA) to OSPF external routes E1/E2.

This is so my vendors MPLS upstream router on Vlan160 can redistribute

my OSPF into BGP and back to OSPF on 3 sites. Vendor will weight the MPLS

circuits cost to be more desirable than my exsiting circuits.

Cpe6509(ospf)---v160--->VzMPLS-Rtr(bgp)----mplscloud

I only have an Area Zero

The end game here is if the MPLS cloud "dies", my GRE/IPSEC Vpn network running OSPF

will "kick in" and route traffic over it till MPLS come back to life.

---Current----

router ospf 1

router-id 10.122.100.1

log-adjacency-changes

redistribute static subnets route-map VPN

network 10.122.0.0 0.0.255.255 area 0

network 10.250.250.12 0.0.0.3 area 0

network 10.250.250.64 0.0.0.3 area 0

network 10.250.250.76 0.0.0.3 area 0

network 10.250.250.92 0.0.0.3 area 0

network 10.250.250.112 0.0.0.3 area 0

network 10.250.250.128 0.0.0.3 area 0

network 10.250.250.156 0.0.0.3 area 0

network 10.251.251.0 0.0.0.63 area 0

maximum-paths 1

------new----------

My 1st attempt is below:

router ospf 1

router-id 10.122.100.1

log-adjacency-changes

redistribute connected metric 1 metric-type 1 subnets route-map OSPF_CONNECTED

redistribute static metric 1 metric-type 1 subnets route-map STATIC

redistribute static subnets route-map VPN

network 10.122.0.0 0.0.255.255 area 0

network 10.250.250.12 0.0.0.3 area 0

network 10.250.250.64 0.0.0.3 area 0

network 10.250.250.76 0.0.0.3 area 0

network 10.250.250.92 0.0.0.3 area 0

network 10.250.250.112 0.0.0.3 area 0

network 10.250.250.128 0.0.0.3 area 0

network 10.250.250.156 0.0.0.3 area 0

network 10.251.251.0 0.0.0.63 area 0

route-map OSPF_CONNECTED permit 10

match interface Vlan160

set tag 1111

route-map STATIC permit 10

match tag 1111

access-list 10 permit 10.122.0.0 0.0.255.255

access-list 10 permit 10.250.250.12 0.0.0.3

access-list 10 permit 10.250.250.64 0.0.0.3

access-list 10 permit 10.250.250.112 0.0.0.3

access-list 10 permit 10.250.250.156 0.0.0.3

Interface Vlan160

Ip add 10.122.160.1

Ip policy route-map OSFP_Connected

IP policy route-map Static

------end-----

So am I close? shouldn't this config let OSPF run normal, but when it

hits Vlan160 it gets tagged so vendor and re-weight/cost the tagged routes?

4 Replies 4

Giuseppe Larosa
Hall of Fame
Hall of Fame

hello Doug,

ip policy routing commands ip policy route-map applies to user traffic packets not to routes.

What you need here is a second ospf process running only on the link towards the MPLS provider.

in this second process you can redistribute the routes of ospf process 1 by doing this you convert them to O E2 or O E1 (depending on your choices) and you have a chance to attach the desired route tag value.

Hope to help

Giuseppe

ok so I remove:

nterface Vlan160

Ip add 10.122.160.1

Ip policy route-map OSFP_Connected

IP policy route-map Static

If my border router connected to Vlan160 is running OSPF on process 1, then I don't need to run a 2nd instance of OSPF on my router.

I have:

route-map OSPF_CONNECTED permit 10

match interface Vlan160

set tag 1111

This should just allow only OSPF tagged info from OSPF 1 out this Vlan160 interface which connects to my vendors router, correct?

My Mpls provider is going to redistrib the OSPF into BGP on his side. So the Mpls vendor is running OSPF 1 on his device also.

yes/no? Thanks

Hello Doug,

>> route-map OSPF_CONNECTED permit 10

match interface Vlan160

set tag 1111

This should just allow only OSPF tagged info from OSPF 1 out this Vlan160 interface which connects to my vendors router, correct?

it is unfortunately wrong.

First of all to pass OSPF E1 routes to someone you need a common subnet where you execute an ospf process using the same Area id and other parameters

So removing vlan 160 is not a good idea if that is the subnet where your device talks with border routers.

The PBR rules have to be removed this is fine.

The route-map that you have suggested does the following:

tries to match interface vlan 160 only

and sets = assigns a route tag of 1111 to the route. (if any)

you basically need :

router ospf 1

network 10.122.160.0 0.0.0.255 area 0

redistribute connected route-map myconn subnets

where the route-map can be expressed as:

route-map myconn permit 10

match ip prefix-list conn_to_advertise

set tag 1111

set type 1

where the prefix-list simply is a list of subnets associated to interfaces you want

to advertise

example:

vlan 50 is 10.122.50.0 255.255.255.0

ip prefix-list conn_to_advertise permit 10.122.50.0/24

and so on you add a line for each vlan / interface you want to advertise.

I recommend you to read more on OSPF for example

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml

Hope to help

Giuseppe

Since that original post have refined down down to this:

ew ospf Config:

router ospf 1

router-id 10.124.16.1

log-adjacency-changes

redistribute connected metric 1 metric-type 1 subnets route-map ospf2mpls

redistribute static metric 1 metric-type 1 subnets route-map static2mpls

network 10.249.249.68 0.0.0.3 area 0

network 10.250.250.24 0.0.0.3 area 0

route-map ospf2mpls permit 16

!add all switch vlans here, no vlan, won't route to that subnet

match interface Vlan160

match interface Vlan160

match interface vlan20

match interface vlan99

match interface vlan100

match interface vlan202

match interface vlan124

match interface vlan8

set tag 10124

route-map static2mpls permit 16

match tag 10124

=============

Guess all I don't have in my config is "Set type 1".

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco