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

Nexus 7000 - Redundant MPLS with BGP

AMD_GAMER
Level 1
Level 1

I have two data centers each with a Nexus 7000. The two Nexus cores are directly connected with 10G Layer 2 trunks. In addition, each Nexus has an MPLS connection that connects to the edge sites. Below are the configs:

Primary DataCenter / Primary MPLS Link

- Local IP of Nexus is 10.0.0.2

router bgp 65005
  router-id 10.254.1.37
  address-family ipv4 unicast
    network 10.0.0.0/22
  neighbor 10.0.0.3 remote-as 65xxx
    address-family ipv4 unicast
  neighbor 10.254.1.2 remote-as 3737
  neighbor 10.254.1.38 remote-as 3737
    address-family ipv4 unicast
      default-originate

 

The primary site pushes out the default originate route 0.0.0.0 which is a next hop to our firewall.

0.0.0.0/0, ubest/mbest: 1/0
    *via 10.0.0.10, [1/0], 12w4d, static

 

Backup DataCenter / Backup MPLS Link

- Local IP of Nexus is 10.0.0.3


router bgp 65005
  router-id 10.254.1.1
  address-family ipv4 unicast
    network 10.0.0.0/22
  neighbor 10.0.0.2 remote-as 65005
    address-family ipv4 unicast
  neighbor 10.254.1.2 remote-as 3737
    address-family ipv4 unicast
      route-map prepend out – Sets prepend to make route less preferred

route-map prepend permit 10
  set as-path prepend 65005 65005 65005

Routing Table on Backup Nexus

0.0.0.0/0, ubest/mbest: 1/0
    *via 10.254.1.2, [20/0], 08:54:47, bgp-65005, external, tag 3737
     via 10.0.0.2, Vlan10, [120/2], 12w4d, rip-1, rip
     via 10.0.0.10, Vlan10, [110/20], 12w4d, ospf-1010, type-2

 

As you can see, the second Nexus is receiving the default last resort route from the primary Nexus. The problem is that it is preferring its own MPLS BGP connection instead of using VLAN10 and using the 10G Layer2 pipe.

 

1. If I create a 0.0.0.0 static route on the backup Nexus, would that cause it to override the MPLS BGP connection?

2. In addition, can I add the default-originate route on the backup Nexus? Our service provider will only advertise the best route to our edge sites, so the question is whether the default-originate will honor the prepend route map I have in place to weight/prefer connections.

 

4 Replies 4

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hi,

ebgp route will always be preferred over ibgp as best path selection criteria of BGP.

In order to do bgp manipulation in bgp check out the below link.

https://supportforums.cisco.com/document/126691/understanding-bgp-best-path-selection-manipulation

Hope it helps..

-GI 

Jon Marshall
Hall of Fame
Hall of Fame

David

Is that your full BGP configuration ?

I ask because the default route received from MPLS will have the same AS in the path as the AS the backup is using so it should not be accepted unless Nexus switches behave differently.

Or unless your SP is modifying the AS path.

You can change this behaviour with the "allowas-in" command but I can't see that anywhere.

So what does the BGP table for the default look like on the backup switch ?

Regarding your question you do need the backup to be advertising a default otherwise if the primary fails there is no path to the DC for the remote sites.

On IOS if you use the "default-originate" command you can use a route map with it and specifically prepend within the route map.

Note that the route map must be tied to that command ie. your current route map wouldn't prepend  the default route.

If you wanted to override the MPLS default then another way to get this to work is to create a static as you say and then use a network statement on the backup switch for the default.

If you did that then your current route map would prepend the route.

The above is based on IOS behaviour so take that into account because like I say it's not clear to me why your backup is using the MPLS default route at the moment.

Jon

Jon Marshall
Hall of Fame
Hall of Fame

Just as a follow up to my previous post there are some confusing things with your routing table on the backup switch.

So currently the default route on the backup points to the primary via MPLS.

But you also seem to be running both OSPF and RIP on the switch.

The RIP route points to the primary but the OSPF route doesn't.

So your setup is a bit confusing.

If you are receiving a default route via OSPF then you could simply use a network statement under BGP on your backup switch and the current prepending would apply.

Presumably if the primary fails that OSPF route is still available to the backup switch (because it doesn't point to the primary) so it would still be advertised out.

Unless of course to get to the next hop IP the only path is via the primary switch.

Perhaps you could clarify exactly how things are setup.

Jon

If you add a static route, your static route will be preferred. However, your backup site will never use Internet of you main site, if local internet is disconnected.  You can change administrative distance of Default route receiving from the primary site. It is 20 now, so it is preferred over your IGP. you can change it with this command on your back-up site.

 

Distance [Administrative distance] [ neighbor] [ACL]

router bgp 65005
  router-id 10.254.1.1
  address-family ipv4 unicast
  network 10.0.0.0/22
  neighbor 10.0.0.2 remote-as 65005

************Distance 190 10.0.0.2 0.0.0.0 10  *******

  address-family ipv4 unicast
  neighbor 10.254.1.2 remote-as 3737
  address-family ipv4 unicast
   route-map prepend out

 

access-list 10 permit 0.0.0.0 0.0.0.0   [ matches only default route]

 

Masoud