Reply
Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Our ISP has two BGP neighbors and are sending us a default 0.0.0.0/0 route.  However this is being overriden by our static route which is presently configured for both BGP neighbors.  If I try to remove the static routes (it would be ideal if I could do so) I see the error "Must add either a next-hop or blackhole for route 0.0.0.0/0".  I tried setting the static 0.0.0.0/0 route to blackhole, lost all outside world connectivity.  I also tried different distance settings to my two static 0.0.0.0/0 routes setting both for 50 at first then going to 210 for both, finally setting one to 220 and the other to 210 with the 210 matching the current received route for 0.0.0.0/0.  However in each of these distance settings my show ip route bgp output remains at:

IP Route table for VRF "default"

Gateway of last resort is not set

 

My show ip route output shows no "B" (BGP) routes (sanitized):

IP Route table for VFT "default"

S *>0.0.0.0/0 [210/0] via 192.168.1.1, eth0

S *>0.0.0.0/0 [220/0] via 192.168.1.2 inactive

C *>127.0.0.0/8 is directly connected, lo

C *>192.168.1.1/28 is directly connected, eth0

C *>172.13.1.0/24 is directly connected, eth1

 

The ISP is seeing, with distances equal or not configured, traffic going to one of their routers/neighbors, being received by us on the other of their routers/neighbors i.e. assymetrical routing which means applications will break and if we ever lose connectivity to either of these neighbors we will go down.  If I simply match the static route to the received route, this means that a manual intervention is required if that next-hop neighbor goes down - our testing confirms this as the ISP cut off our connectivity to the lower costed next-hop neighbor and connectivity could not be restored while that neighbor was offline without me re-ordering or changing the distance values for my two static 0.0.0.0/0 routes.  Which defeats the whole purpose of BGP.

 

To confirm we are receiving a 0.0.0.0/0 route from the neighbors I ran the command "show ip bgp neighbors 192.168.1.2 received routes"

     Network      Next Hop       Metric      LocPrf     Weight  Path

*> 0.0.0.0/0     192.168.1.2    0                            0             2544 i

 

How can I remove or modify my static routes for 0.0.0.0/0 so BGP received routes override those static routes?

 

Thank you for any assistance.  This is rather urgent as this is the final hurdle to clear for cutting over to BGP for production, this coming weekend.

 

 

Veteran Member
Posts: 4,030
Registered: ‎05-15-2014
Kudos: 1481
Solutions: 275

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Veteran Member
Posts: 7,474
Registered: ‎03-24-2016
Kudos: 1933
Solutions: 857

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

This command should remove all your static default routes:

delete protocols static route 0.0.0.0/0

And BGP route should already overrule current default routes, so I suspect error being present in BGP config / peering .

Member
Posts: 147
Registered: ‎02-28-2016
Kudos: 22
Solutions: 7

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

[ Edited ]

Where is your route to the BGP neighbors specifically?  Why do you have static routes for 0.0.0.0 in the first place?  you need specific static routes to your BGP peers if you wish to use BGP in the way you are attempting to use it (inheriting default routes).

 

there are few other requirements here at play as well that is being your two neighbors are in the same AS and the same number of hops away.  If they are, then this should work, however, it requires a little more configuration depending on your requirements and how your provider has this setup on their end.  A common best practice is to send bgp updates via a source-update on your loopback address to be peered with the ISP's loopback on their equipment hosting the BGP session on port 179 which requires static routes, I would ask the provider exactly what they want you to do to peer with them and your requirements.

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Running 1.9.1 - I think.  I am working at a remote site on another issue but will confirm when I get back

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

I tried exactly that it told me I needed either a next-hop or blackhole for 0.0.0.0/0

 

If I try to remove the static routes (it would be ideal if I could do so) I see the error "Must add either a next-hop or blackhole for route 0.0.0.0/0".  

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

I had input a static route for 0.0.0.0/0 when I first configured the router, to one of the neighbors.  This was before I had BGP configured.  This is a test uplink with our ISP going to the same routers but different IPs, as we will when we cutover our production link to BGP.  Without the static route for 0.0.0.0/0 I had no Internet connectivity, before configuring BGP.  And now that its in place, I can't remove it.  In short what the ISP wants us to do, is have us have the 0.0.0.0/0 routes, in our routing table so if there is a failure to one of those neighbors, we will receive a new 0.0.0.0/0 route which will then populate our routing table (IF the static 0.0.0.0/0 route doesn't override it) and restore connectivity.

 

Say 192.168.1.1 is our 0.0.0.0/0 route and both 192.168.1.1 and 192.168.1.2 is our neighbor.  We are receiving a 0.0.0.0/0 route for 192.168.1.1.  However 192.168.1.1 goes down, the ISP will send us a route for 192.168.1.2 for 0.0.0.0/0.  If our static 0.0.0.0/0 didn't override, this new route would then populate our routing table so 0.0.0.0/0 would point to 192.168.1.2 and connectivity would be restored.

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Confirmed yes I am running 1.9.1.  A Cisco resource (below) was found explaining distance values for the related protocols, not surprising Connected is 0, static is next at 1.  As everything in this table outside of "Unknown" is 200 or less, why would setting the distance for my two static routes to 210 and 220, NOT cause the received 0.0.0.0/0 route to override the static 0.0.0.0/0 route?  Sure seems like a bug to me.  Along with my not being able to delete the next-hop 0.0.0.0/0 static route object other than by replacing it with a blackhole object?  Why does the OS not enforce the distance values and why does it not let me delete my static 0.0.0.0/0 routes?  This is the final hurdle for us to clear before cutting our production uplink to BGP.  As we have police, fire and other 24/7/365 staff we cannot perform the cutover with this problem in place as it means that if the preferred 0.0.0.0/0 route (enforced by static 0.0.0.0/0) goes down, it will require manual intervention to change the preferred 0.0.0.0/0 to the other neighbor which will first require notification (to me at whatever hour/day it is), then my needing to remote in or physically come into work, to perform this intervention.  If these bugs didn't exist, the cutover under this scenario (preferred 0.0.0.0/0 route going down) would occur in approximately one minute, without intervention.  My calling these problems a bug is of course a presumption but until someone explains how to resolve this, I am sticking with this presumption.

 

Default Distance Value Table

This table lists the administrative distance default values of the protocols that Cisco supports:

Route Source

Default Distance Values

Connected interface

0

Static route

1

Enhanced Interior Gateway Routing Protocol (EIGRP) summary route

5

External Border Gateway Protocol (BGP)

20

Internal EIGRP

90

IGRP

100

OSPF

110

Intermediate System-to-Intermediate System (IS-IS)

115

Routing Information Protocol (RIP)

120

Exterior Gateway Protocol (EGP)

140

On Demand Routing (ODR)

160

External EIGRP

170

Internal BGP

200

Unknown*

255

* If the administrative distance is 255, the router does not believe the source of that route and does not install the route in the routing table.

When you use route redistribution, occasionally you need to modify the administrative distance of a protocol so that it takes precedence. For example, if you want the router to select RIP-learned routes (default value 120) rather than IGRP-learned routes (default value 100) to the same destination, you must increase the administrative distance for IGRP to 120+, or decrease the administrative distance of RIP to a value less than 100.

You can modify the administrative distance of a protocol through the distance command in the routing process subconfiguration mode. This command specifies that the administrative distance is assigned to the routes learned from a particular routing protocol. You need to use this procedure generally when you migrate the network from one routing protocol to another, and the latter has a higher administrative distance. However, a change in the administrative distance can lead to routing loops and black holes. So, use caution if you change the administrative distance.

Here is an example that shows two routers, R1 and R2, connected through Ethernet. The loopback interfaces of the routers are also advertised with RIP and IGRP on both the routers. You can observe that the IGRP routes are preferred over the RIP routes in the routing table because the administrative distance is 100.

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

This morning i tried the shorter version of the command - as mentioned in that previous post by ? i.e. delete protocols static route 0.0.0.0/0, and it worked.  I believe I was specifying the full .....0.0.0.0/0 next-hop and next-hop IP address and the OS wasn't allowing THAT command. 

 

So statics are removed, I am still receiving a 0.0.0.0/0 route from the 192.168.1.1 neighbor however this received route is still NOT populating the routing table.  Again it is critical that this - received route populating the routing table - occur.

 

Here is my current show ip route output, no 0.0.0.0/0 route in this output:

 

IP Route Table for VRF "default"

C *> 127.0.0.0/8 is directly connected, lo

C *> 192.168.1.0/28 is directly connected, eth0

C *> 172.15.1.0/24 is directly connected, eth1 - can't recall what RFC 1918 network I used for eth1 to sanitize my config - in actuality this is public IP space.

 

Received route via BPG

show ip bgp neighbors 192.168.1.1 received-routes

*> 0.0.0.0/0    192.168.1.1 0 0 2544 i

 

 

Veteran Member
Posts: 7,474
Registered: ‎03-24-2016
Kudos: 1933
Solutions: 857

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

That also was my conclusion:

"And BGP route should already overrule current default routes, so I suspect error being present in BGP config / peering"

 

post your config so we can see why BGP disfunctions

 

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Here is sanitized config - public IPs were changed to RFC 1918 private IPs

Veteran Member
Posts: 7,474
Registered: ‎03-24-2016
Kudos: 1933
Solutions: 857

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

try without the route-maps, they're my prime suspect

 

 

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

I deleted my 4 route maps, saved changes, and still no 0.0.0.0/0 route in the routing table and no connectivity beyond my connected networks.  I did forget to include the "Gateway of last resort is not set" from the show ip route output

 

show ip route

 

C *> 127.0.0.0/8 is directly connected, lo

C *> 192.168.1.0/28 is directly connected, eth0

C *> 172.15.1.0/24 is directly connected, eth1

 

Gateway of last resort is not set

Veteran Member
Posts: 7,474
Registered: ‎03-24-2016
Kudos: 1933
Solutions: 857

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Can you also try after removing route-maps statements under <protocols bgp>

And if you afterwards still don't see BGP routes making it to the routing table, I'll try myself 

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

I removed the route-map references in Protocols>BGP and no change i.e. I am still receiving the 0.0.0.0/0 route from my BGP neighbors via the "show ip bgp neighbors 192.168.1.1 received-routes" command yet when I perform the "show ip route" I see no 0.0.0.0/0 route in the routing table nor do I see any "B" (for BGP) route in the routing table.

 

I have rougly two hours to get this working in order for the ISP to put in their Change Management, in order for the cutover to take place this Sunday.  The good news will be if this happens, I get the weekend off;-) but also if this happens we may well have to wait until our next maintenance window which won't happen for another two months.

Veteran Member
Posts: 7,474
Registered: ‎03-24-2016
Kudos: 1933
Solutions: 857

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

[ Edited ]

Over here, I do get the default route.  ER-X 1.9.1.1

 

Spoiler
 

ubnt@ubnt:~$ show configuration
interfaces {
    ethernet eth0 {
        address 192.168.1.1/24
        duplex auto
        speed auto
    }
    ethernet eth1 {
        address 10.10.10.1/24
        duplex auto
        poe {
            output off
        }
        speed auto
    }
    ethernet eth2 {
        duplex auto
        speed auto
    }
    ethernet eth3 {
        duplex auto
        speed auto
    }
    ethernet eth4 {
        duplex auto
        speed auto
    }
    ethernet eth5 {
        duplex auto
        speed auto
    }
    loopback lo {
    }
    switch switch0 {
        mtu 1500
        switch-port {
            interface eth3 {
            }
            vlan-aware disable
        }
    }
}
protocols {
    bgp 1234 {
        neighbor 10.10.10.2 {
            nexthop-self
            remote-as 2345
            soft-reconfiguration {
                inbound
            }
        }
        parameters {
            router-id 10.10.10.1
        }
    }
    static {
        route 0.0.0.0/0 {
            blackhole {
                distance 220
            }
        }
    }
}
service {
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    ssh {
        port 22
        protocol-version v2
    }
}
system {
    host-name ubnt
    login {
        user ubnt {
            authentication {
                encrypted-password ****************
            }
            level admin
        }
    }
    ntp {
        server 192.168.1.100 {
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone UTC
}
ubnt@ubnt:~$ show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       > - selected route, * - FIB route, p - stale info
IP Route Table for VRF "default"
B    *> 0.0.0.0/0 [20/0] via 10.10.10.2, eth1, 00:02:25
S       0.0.0.0/0 [220/0] is a summary, Null inactive
C    *> 10.10.10.0/24 is directly connected, eth1
C    *> 127.0.0.0/8 is directly connected, lo
C    *> 192.168.1.0/24 is directly connected, eth0

ubnt@ubnt:~$ #now disable Cisco interface  (commands in seperate session not shown)
ubnt@ubnt:~$ show ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       > - selected route, * - FIB route, p - stale info
IP Route Table for VRF "default"
S    *> 0.0.0.0/0 [220/0] is a summary, Null
C    *> 10.10.10.0/24 is directly connected, eth1
C    *> 127.0.0.0/8 is directly connected, lo
C    *> 192.168.1.0/24 is directly connected, eth0

ubnt@ubnt:~$ #enable cisco interface, and access it
ubnt@ubnt:~$ telnet 10.10.10.2

Entering character mode
Escape character is '^]'.

Only authorized personel have access to this restricted system

User Access Verification

Username: admin
Password:
R1#show run | s bgp|0\1|0\0|route
% invalid Back reference
% Failed to compile regular expression.
R1# ! relevant Cisco config
R1#show run | s bgp|route|0/0|0/1
no ip source-route
interface Ethernet0/0
 ip address 10.10.10.2 255.255.255.0
interface Ethernet0/1
 ip address 2.2.2.1 255.255.255.0
router bgp 2345
 bgp log-neighbor-changes
 redistribute static
 neighbor 10.10.10.1 remote-as 1234
 default-information originate
ip route 0.0.0.0 0.0.0.0 2.2.2.2
R1#

R1#sh ver
Cisco IOS Software, Linux Software (I86BI_LINUX-ADVENTERPRISEK9-M), Version 15.2(4)M1, DEVELOPMENT TEST SOFTWARE
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2012 by Cisco Systems, Inc.
Compiled Fri 27-Jul-12 10:57 by prod_rel_team

ROM: Bootstrap program is Linux

R1 uptime is 30 minutes
System returned to ROM by reload at 0
System image file is "unix:/mnt/data1/gns3/images/IOU/i86bi_linux-adventerprisek9-ms.152-4"

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Yes I see the lovely "B" in your routing table!  Thanks for experimenting with this.  Still no joy on my end however.  I did send an email to support@ubnt.com on Friday about this.  Thus far I received something from "Vann" telling me he would check with his internals and get back to me.  Hopefully I hear something!

New Member
Posts: 34
Registered: ‎06-19-2016
Kudos: 1
Solutions: 2

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

@CityofRenton did you ever get this working?  We are working with @dmkjr Having the same issue.

Member
Posts: 155
Registered: ‎05-01-2013
Kudos: 1
Solutions: 6

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Yes we did get this working now I have to remember - 16 months or so later, how that happened.  I will attempt to do so and will certainly post if I either find related emails or other such information, or I have a forehead slap *duh* moment;-)

 

In fact we now have a two router BGP configuration with two EdgeRouter Pro-8s and it has been entirely stable.

New Member
Posts: 34
Registered: ‎06-19-2016
Kudos: 1
Solutions: 2

Re: BGP - received route for 0.0.0.0/0 not populating IP route table, overridden by static route

Thanks I am having the same issue where my neighbor that says they are not seeing my 0.0.0.0/0

 

Reply