CumulusNetworks / ifupdown2

GNU General Public License v2.0
157 stars 72 forks source link

bird can not learn default route because protocol kernel #193

Open li-kunkun opened 3 years ago

li-kunkun commented 3 years ago

hi, we find bird can not learn default route when using high version ifupdown2, because of high version using proto kernel when adding default route. Can some one explain why this was done ? Is it more appropriate not to use “proto kernel”?

ifup -a -d log show below:

version: 1.0~git20170314-1

debug: _cache_get(['eth0', 'addrs']) : ['addrs'] debug: _cache_get(['eth0', 'addrs']) : ['addrs'] info: executing ip -force -batch - [addr add 10.198.54.78/26 broadcast 10.198.54.127 dev eth0 addr add fdbd:dc01:20:154::78/64 dev eth0 ] info: executing ip route add default via 10.198.54.65 dev eth0 info: executing ip route add default via fdbd:dc01:20:154::1 dev eth0 debug: eth0: up : running module addressvirtual debug: eth0: up : running module usercmds

version: high version (>= 1.2.0)

warning: cmd '/bin/ip addr del 10.198.54.127/26 dev eth0' failed: returned 2 (RTNETLINK answers: Cannot assign requested address ) info: executing /bin/ip -force -batch - [addr add 10.198.54.78/26 broadcast 10.198.54.127 dev eth0 addr add fdbd:dc01:20:154::78/64 dev eth0 ] info: executing /bin/ip route add default via 10.198.54.65 proto kernel dev eth0 onlink info: executing /bin/ip route add default via fdbd:dc01:20:154::1 proto kernel dev eth0 onlink debug: eth0: up : running module addressvirtual

roopa-prabhu commented 3 years ago

Hi, thanks for the report. I vaguely recall that it was due to conflicts with routing daemons. We test mostly with FRR.

FRR seems to have redistribute kernel if it wants to redistribute these routes.

It sure can be made configurable in ifupdown2. But maybe bird is configurable too ?

thanks

On 1/21/21 1:11 AM, li-kunkun wrote:

hi, we find bird can not learn default route when using high version ifupdown2, because of high version using proto kernel when adding default route. Can some one explain why this was done ? Is it more appropriate not to use “proto kernel”?

ifup -a -d log show below:

version: 1.0~git20170314-1

debug: _cache_get(['eth0', 'addrs']) : ['addrs'] debug: _cache_get(['eth0', 'addrs']) : ['addrs'] info: executing ip -force -batch - [addr add 10.198.54.78/26 broadcast 10.198.54.127 dev eth0 addr add fdbd:dc01:20:154::78/64 dev eth0 ] info: executing ip route add default via 10.198.54.65 dev eth0 info: executing ip route add default via fdbd:dc01:20:154::1 dev eth0 debug: eth0: up : running module addressvirtual debug: eth0: up : running module usercmds

version: high version (>= 1.2.0)

warning: cmd '/bin/ip addr del 10.198.54.127/26 dev eth0' failed: returned 2 (RTNETLINK answers: Cannot assign requested address ) info: executing /bin/ip -force -batch - [addr add 10.198.54.78/26 broadcast 10.198.54.127 dev eth0 addr add fdbd:dc01:20:154::78/64 dev eth0 ] info: executing /bin/ip route add default via 10.198.54.65 proto kernel dev eth0 onlink info: executing /bin/ip route add default via fdbd:dc01:20:154::1 proto kernel dev eth0 onlink debug: eth0: up : running module addressvirtual

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FCumulusNetworks%2Fifupdown2%2Fissues%2F193&data=04%7C01%7Croopa%40nvidia.com%7Ce44f93a59db0489003ca08d8bdec96c2%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637468171126618853%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=b9J%2FBpJPScYpEBck1UqlYJmSfJ5MUfiGmtBYNkL4g%2FM%3D&reserved=0, or unsubscribe https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABG4ZPVYV7NJK5WDXHU55DLS27VUFANCNFSM4WMQLRVA&data=04%7C01%7Croopa%40nvidia.com%7Ce44f93a59db0489003ca08d8bdec96c2%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637468171126628809%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EqmZpnGdRIQRqklnYHHZdQxuf3zydLdiZaDSgDQ8PBA%3D&reserved=0.

li-kunkun commented 3 years ago

@roopa-prabhu Hi,thanks you for your explanation. But from the ip definition, route should not be set to proto kernel by default. It also broken backward compatibility with ifupdown. In addition, can you explain the "onflicts with routing daemons" case in more detail ?

excerpt from man ip(8): protocol RTPROTO the routing protocol identifier of this route. RTPROTO may be a number or a string from the file /etc/iproute2/rt_protos. If the routing protocol ID is not given, ip assumes protocol boot (i.e. it assumes the route was added by someone who doesn't understand what they are doing). Several protocol values have a fixed interpretation. Namely:

         redirect - the route was installed due to an ICMP redirect.

         kernel - the route was installed by the kernel during
               autoconfiguration.

         boot - the route was installed during the bootup sequence.
             If a routing daemon starts, it will purge all of them.

         static - the route was installed by the administrator to
               override dynamic routing. Routing daemon will
               respect them and, probably, even advertise them
               to its peers.

         ra - the route was installed by Router Discovery protocol.

      The rest of the values are not reserved and the administrator is free
      to assign (or not to assign) protocol tags.
anlancs commented 2 months ago

I have met this same issue. Any suggestion? Thanks! @roopa-prabhu @julienfortin