Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

OSPF TAGGING - BGP redistribution

Hello Community

Hope everyone is ok , i have a scenario which i need lil assistance with basically one of our customer has a layer 2 connection from us connecting there two site and they also have ipvpn service . customer wants to  enable ospf on layer two link and connect the two sites like below

customer core switch on site a (layer 2 link vpls link)

router ospf 1

net 0.0.0.0 0.0.0.0 are 0

customer core switch on site b (layer 2 link vpls link)

router ospf 1

network 0.0.0.0 0.0.0.0 are 0

they also want want us to enable same on both our cpe routers on both sites so site to site traffic prefers layer 2 link (vpls) and if thet goes down then traffic is senyt across via cpe routers. for that to avchieve we have to enable above configs on cpe and redistribute the opsf in bgp so routes are carried across to other site and lowet ospf AD to 10 via distance command on CE routers so bgp routes are not prefered till vpls link goes down.customer wants us to use community feature and tags to filter ospf-bgp redistribution...i was doing below

cpe router

router bgp 1

redistribute ospf 1 route-map TAG

route-map TAG permit 10

set tag 100

but this tagging is not taking affect and i get error message ...i want an option where like below i have seen this in cisco example

router ospf 1

rediis ospf 2 tag 6

so all of ospf 2 routes are tagged with 6 which makes filtering easy...can someone advised how this can be acieved...

however there is tag option when bgp is redistributed in ospf... customer wants tagging so they can identify which sites originated these routes. thankss

allot guys

4 REPLIES

OSPF TAGGING - BGP redistribution

Hi,

what your customer probably wants is you to "tag" the BGP prefixes with the community attribute.

Look here

http://evilrouters.net/2009/03/18/using-bgp-communities-to-influence-routing/

for some details.

Best regards,

Milan

OSPF TAGGING - BGP redistribution

Hello, Mohammad.

Could you please draw a diagram and name devices somehow (for further reference)?

Please also note who is managing each device (customer or you company).

Could you please clarify how routing protocol works over ipvpn - including CE and PE devices?

----

however there is tag option when bgp is redistributed in ospf... customer wants tagging so they can identify which sites originated these routes. thankss

To fulfill the request you will have to write detailed route-map per originated AS, assigning different tags.

I would suggest customer to do BGP-OSPF redistribution themselves (if they need to know original AS).

If you were using MBGP (over MPLS), then you could redistribute into OSPF from VRF providing native support for customer OSPF.

---

Anyway I would not recommend adjusting OSPF AD.

Per my understanding you must no worry what route does LAN choose (aren't you responsible for WAN only?).

You could redistribute OSPF (from BGP) with type-2 metric 1000. Suggest cutomer to use type-1 for external routes they inject into OSPF or use better metric.

OSPF TAGGING - BGP redistribution

Thanks Mikhail

Please see rough diagrma below before you read redistribution statment

Basically we have two sites, Each site has CPE with BGP (MPBGP). Customer also has seperate layer two link from us.Layer two linkl is point to point link while CPE has routes for other sites including site two. Custeomer wants to enable ospf 1 on layer two link and have both site in same area connected via layer link and ospf runing on top. That works fine when i tried in lab, in lab i tool router (customer end) point to point and enable ospf which works fine all the routes are learnt and prefered via point to point link. To ADD reseliency customer wants us to enable ospf 1 on CPE routers and do redistribution (mutual) so CPE link can carry the ospf 1 routes to other site and if layer goes down CPE link is used to carry site to site traffic between site 1 and site 2. So by enabaling ospf 1 are 0 on both CPE it has all the routes that are originated in area 0 (both the sites) and when i do redistributed ospf in bgp on both cpe, bgp carries same information accross to both routers and when layer 2 fails the traffic is re routed to bgp... Because bgp AD is 20 and ospf 110 when we first redistribute the same routes resditributed into bgp are installed in routing table because of better AD but when i do on CPE

router ospf 1

distance 10 0.0.0.0 0.0.0.0

0.0.0.0 0.0.0.0 are 0

because of distance OSPF is installed in routing table and if core and moment layer 2 goes down all the routing info is cleared and bgp route are installed...customer wants us to tag the routes which is only possible when bgp routes are given to ospf and want us to tag with communtyy which i can do in route map and associate that statment to redistribute command....

Two way redistribution happening on CPE router on both sites

router ospf 1

redistribute bgp 1 metric 10000 metric-type 1 subnets tag 200

router bgp 1

redistribute ospf 1 route-map 500

CPE1--SITE1-------------------------------MPBGP WAN------------------------CPE-SITE2

      I     LAN side                                                                               I           LAN SIDE

      I    router ospf 1                                                                                       router ospf 1

           net 0.0.0.0 0.0.0.0 are 0                                                           I           net 0.0.0.0 0.0.0.0 are 0

      I                                                                                                            

                                                                                                         I

      I                                                                                                  I

      I                                                                                                  I

      I                                                                                                  I

Cust-CORE-SWITCH1-------------------LAYER 2LINK----------------------CUST-CORE-SWITCH2

router ospf 1                                                                            router ospf 1

net 192.168.1.1 0.0.0.255 are 0                                                 net 192.168.2.0 0.0.0.255 are0

Re: OSPF TAGGING - BGP redistribution

Hello, Mohammad.

You should not worry what route does your CPE choose... and actuall WAN CE should preffer WAN direction almost all the time.

From the customer's point of view (check your LAB), core switch will always choos L2 link, as another core annouces prefixes as intra-area (most preffered), but your BGP will be announcing inter-area (if you redistribute to/from OSPF on PE) or external (if you redistribute to/from OSPF on CE).

So, I would say that primary challenge would be to tag routes per originating AS, but, per my understanding, you should not allow customer to push you around.

PS: by default redistribute into bgp from ospf works for internal routes only, that could be an issue, if customer would ask you for anything like that!

PS2: I would suggest to use static router-id for ospf process.

1280
Views
0
Helpful
4
Replies
CreatePlease login to create content