cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
785
Views
5
Helpful
4
Replies

question about command neighbor default-originate (BGP)

Pete89
Level 2
Level 2

Hello,

 

I have an edge router facing MPLS provider (9.9.9.9) on g0/1. Interface g0/0 faces a L3 switch. Here is the part of the config I don't quite get:

neighbor 9.9.9.9 remote-as 65000
neighbor 9.9.9.9 default-originate route-map DefaultFromFW
distance 180 9.9.9.9 0.0.0.0 DefaultRoute

route-map DefaultFromFW permit 10
 match ip address DefaultRoute
 match interface GigabitEthernet0/0

ip access-list standard DefaultRoute
 permit 0.0.0.0

-------------------------------------------------------------------

interface GigabitEthernet0/0
description To L3 switch
ip address 10.1.1.1 255.255.255.0

interface GigabitEthernet0/1
description to MPLS Provider
ip address 9.9.9.10 255.255.255.252

#show ip route

Gateway of last resort is 10.1.1.2 to network 0.0.0.0

D*EX  0.0.0.0/0 [170/3072] via 10.1.1.2 7w0d, GigabitEthernet0/0

 

What I don't understand is why the route-map is used and then why the distance command is using the ACL called DefaultRoute. In the end I imagine this router is sending 10.1.1.2 to the provider with an AD of 180. I just cant figure out how.

Thanks!

 

 


 

 

 

 

1 Accepted Solution

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

If you use a route-map with default-originate under BGP then it makes the route advertisement conditional ie. only if the router has a default route in it's IP routing table will it then generate one to it's BGP peer.

Without the route-map your router would advertise a default route even if it didn't have one in it's IP routing table.

The distance command is saying any default route learned from the BGP peer ie. your provider should have an AD of 180.

So I suspect what is happening is -

a) your BGP router receives a default route from the L3 switch which is EIGRP external ie. AD 170 and it also receives a default route from it's BGP peer (the provider router).

b) Under normal operations you want your router to prefer the default route learned from the L3 switch and also you want a default route to be advertised to the provider

So you change the AD of the default route received from the provider to be AD 180 which is greater than that AD of the default received from the L3 switch ie. AD 170.

c) if for some reason your L3 switch fails then you want your BGP router to stop advertising the default route and use the one that it receives from the provider ie. the one you set an AD of 180 for.

The only thing that isn't clear is that if your BGP router is advertising a default route and so is the provider then what happens at other sites you have on the MPLS network ie. which default route is preferred ?

Note the way to verify the above is check the BGP table ie. "sh ip bgp". 

You should see a default route in there pointing to the provider next hop IP. When you look at the IP routing table though you should see a default route pointing to the L3 switch.

The default route in the BGP table will also probably be marked as a RIB failure because it cannot be installed in the IP routing table.

Jon

View solution in original post

4 Replies 4

Jon Marshall
Hall of Fame
Hall of Fame

If you use a route-map with default-originate under BGP then it makes the route advertisement conditional ie. only if the router has a default route in it's IP routing table will it then generate one to it's BGP peer.

Without the route-map your router would advertise a default route even if it didn't have one in it's IP routing table.

The distance command is saying any default route learned from the BGP peer ie. your provider should have an AD of 180.

So I suspect what is happening is -

a) your BGP router receives a default route from the L3 switch which is EIGRP external ie. AD 170 and it also receives a default route from it's BGP peer (the provider router).

b) Under normal operations you want your router to prefer the default route learned from the L3 switch and also you want a default route to be advertised to the provider

So you change the AD of the default route received from the provider to be AD 180 which is greater than that AD of the default received from the L3 switch ie. AD 170.

c) if for some reason your L3 switch fails then you want your BGP router to stop advertising the default route and use the one that it receives from the provider ie. the one you set an AD of 180 for.

The only thing that isn't clear is that if your BGP router is advertising a default route and so is the provider then what happens at other sites you have on the MPLS network ie. which default route is preferred ?

Note the way to verify the above is check the BGP table ie. "sh ip bgp". 

You should see a default route in there pointing to the provider next hop IP. When you look at the IP routing table though you should see a default route pointing to the L3 switch.

The default route in the BGP table will also probably be marked as a RIB failure because it cannot be installed in the IP routing table.

Jon

Jon,

 

Thanks for the detailed answer. It gave me a better idea to what is going on here. You are right about the Edge router participating in EIGRP.

There is more to this config that I need to figure out. This is a remote office and there is another edge router that does VPN fail-over to the HQ VPN router that is a part of the whole picture.

I will continue to investigate and when I get it all figured out I will supply a drawing and complete configs for the solution.

 

Thanks again.

 

P.

No problem, although hearing that it is a remote office makes me wonder how it is all meant to work because I assumed this was a HQ site that provided internet connectivity to your other sites.

I would be interested to see what the final solution is and if you need any more help please feel free to post.

Jon

Hi,

 

IMHO, this could be some remote site used as a backup connection to the Internet?

So under normal conditions only devices on this remote site would use the local Internet connection while all other sites would use the HQ Internet connection?

In a case the HQ Internet connection fails this remote site would become used by all sites?

That's why this remote site would prefer the default route through its switch but still advertise the default route to the backbone (where the other deafult route originated from the HQ would be preferred though).

In a case the local Intenet connection would fail (the default route would not be received via EIGRP anymore) it would use the HQ Intenet connection (default route received from BGP).

 

Does it make a sense?

 

Best regards,

Milan

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: