static default route not always pushed to kernel (2.0.4)

Kenth Eriksson Kenth.Eriksson at infinera.com
Thu May 2 11:10:32 CEST 2019


On Tue, 2019-04-30 at 13:24 +0200, Ondrej Zajicek wrote:
> On Mon, Apr 29, 2019 at 03:46:09PM +0000, Kenth Eriksson wrote:
> > On Mon, 2019-04-29 at 15:42 +0200, Ondrej Zajicek wrote:
> > > CAUTION: This email originated from outside of the organization.
> > > Do
> > > not click links or open attachments unless you recognize the
> > > sender
> > > and know the content is safe.
> > > 
> > > 
> > > On Mon, Apr 29, 2019 at 01:01:13PM +0000, Kenth Eriksson wrote:
> > > > > 'ip' tool, perhaps harder in other cases). It would be great
> > > > > if
> > > > > there
> > > > > existed sysctl option for default IPv4 route metric.
> > > > > 
> > > > 
> > > > There is no overwrite involed here. The default route in the
> > > > kernel
> > > > here has metric 100. As you said, bird pushes with metric 32 so
> > > > it
> > > > should push again.
> > > 
> > > Well, i misread your mail. If i understand it correctly, the
> > > issue is
> > > not that routes are not pushed into kernel, but that they are not
> > > pushed into master table. I guess you have two routes for the
> > > same
> > > network in one static protocol. That is not valid case, although
> > > we are missing error checks for that configuration.
> > > 
> > > You could either use two separate static protocol instances, or
> > > you
> > > could use this patch:
> > > 
> > > https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.labs.nic.cz%2Flabs%2Fbird%2Fcommit%2F9861dba5230da539e6ce7d2b6baa4f2631556d09&data=02%7C01%7CKenth.Eriksson%40infinera.com%7Cc239548bfa554327784c08d6cd5e7822%7C285643de5f5b4b03a1530ae2dc8aaf77%7C1%7C0%7C636922202971698401&sdata=Wv%2Be2YRd%2Fo2efHVjKT8wPlnjC3KUF8jGVTFsGwKsQpk%3D&reserved=0
> > > 
> > 
> > That patch did not work for me, still same issue. I had to add
> > DISTANCE
> > to the CF_KEYWORDS to make it compile. But is it anything else that
> > is
> > required?
> 
> Hi
> 
> The patch should be more-or-less all that is required, but it is not
> fully
> ready for master branch, so it has a bit awkward behavior. Namely it
> requires
> that preference is specified without '=', like in example i provided:
> 
> > >   route 0.0.0.0/0 via 10.210.137.1 { preference 220; };
> > >   route 0.0.0.0/0 via 192.168.120.1 { preference 230; };
> 
> If you used the same config like without patch (i.e. with 'preference
> = XXX'),
> it would not work.
> 

I have attached three patches can you review them? It is your first
commit, then a patch to make it compile and a patch to fix the syntax
to be compliant with the filter syntax. 

Can this be upstreamed so you will support this use-case in upcoming
releases?

> 
> > I thought two prefixes differing only on metric should be perfectly
> > valid? The kernel accepts that, so why would bird not?
> 
> Mainly implementation reasons. In BIRD, preference is generally not
> part
> of key, therefore route update for one network could replace a route
> for
> route with different preference (which makes sense with filter-based
> dynamic preference).
> 
> Traditionally BIRD supported in one routing table one route per
> network
> and protocol instance. With BGP ADD_PATH extension the key was
> extended
> with arbitrary u32 distinguisher, which in BGP case is the path ID
> value
> from BGP ADD_PATH, but most other protocols does not use that. The
> patch
> above uses preference as distinguisher in case of static routes.
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Static-Allow-multiple-routes-to-the-same-network-wit.patch
Type: text/x-patch
Size: 4716 bytes
Desc: 0001-Static-Allow-multiple-routes-to-the-same-network-wit.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20190502/d34b2392/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-missing-keyword-DISTANCE.patch
Type: text/x-patch
Size: 971 bytes
Desc: 0002-Add-missing-keyword-DISTANCE.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20190502/d34b2392/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Align-preference-syntax-for-static-routes-and-filter.patch
Type: text/x-patch
Size: 1083 bytes
Desc: 0003-Align-preference-syntax-for-static-routes-and-filter.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20190502/d34b2392/attachment-0002.bin>


More information about the Bird-users mailing list