On 02/11/2018 02:22 PM, Michael Rack wrote:
> Hi Guys,
> can anyone explain why the KENREL-Protocol does not support IPv4 and
> IPv6 Channels in one instance? BGP, OSPF and so on also supports that,
> what is so special on KERNEL that this is not supported? That makes a
> huge configuration mess.
>     The Kernel protocol supports both IPv4 and IPv6 channels; only one
>     of them can be configured in each protocol instance.
> *Source:* http://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.6
> So i have to double the instances to do IPv6 and IPv4 stuff on
> KERNEL-Protocol?

The kernel IPv4 and IPv6 tables are not related and the joint kernel
protocol would do both protocols separately. Therefore we would have to
move almost all the kernel protocol options to the channel config.

The same would happen with almost all the protocol's internal structures
-- there are state variables and also an internal route table for alien
routes -- all of these would need to be moved.

OSPF and BGP supporting IPv4+IPv6 together also send them together
through the socket to the network -- these are really one instance
handling both together. The kernel protocol on Linux has separate
netlink sockets for distinct address families but it is common for all
the tables (so there are structures across the kernel protocols in
another way); on BSD there is one sysctl and one socket for all.

To be correctly aligned with the system, the cleanest solution would be
to have only one kernel protocol for all. It would be possible but we
don't see any good reason to do this because it is quite a lot of highly
error-prone work. Split protocols may be also stopped and started
separately which includes error handling which is quite a good reason to
keep status quo.

If your config is much boilerplated, it should be possible to use this:

template kernel kdt { kernel table 253; ... other options; }

protocol kernel kernel_default4 from kdt {
        ipv4 { table default4; export all; };

protocol kernel kernel_default6 from kdt {
        ipv6 { table default6; export all; };


Reply via email to