radvd-project / radvd

radvd | Official repository: https://github.com/radvd-project/radvd
https://radvd.litech.org/
Other
203 stars 107 forks source link

FR: A including of config files #208

Open tsv1991 opened 1 year ago

tsv1991 commented 1 year ago

For large installations (more than 1000 interfaces) a including of config files is very lacking. It would be convenient to store a configuration for each interface in separate files. For example: /run/radvd/radvd.conf.d/br145.conf

stappersg commented 1 year ago

On Fri, Aug 11, 2023 at 05:39:04AM -0700, Stanislav Tretiakov wrote:

It would be convenient to store a configuration for each interface in separate files.

The Feature Request has been seen.

robbat2 commented 1 year ago

@tsv1991 can you provide some more details about this running with "more than 1000 interfaces".

tsv1991 commented 1 year ago

@robbat2

robbat2 commented 1 year ago
tsv1991 commented 1 year ago

@robbat2 I think that all included files should processed as a single file config. Included files are just extension of main config. For example: radvd.conf:

interface dum3{
  IgnoreIfMissing on;
};
include{
 ./*.conf
};

config1.conf:

interface br9551 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:1::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};

config2.conf:

interface br9553 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:2::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};

And RADVD shoud treat this construct as a single config:

interface dum3{
  IgnoreIfMissing on;
};
interface br9551 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:1::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};
interface br9553 {
    IgnoreIfMissing on;
    AdvDefaultPreference medium;
    AdvManagedFlag off;
    MaxRtrAdvInterval 600;
    AdvReachableTime 0;
    AdvIntervalOpt on;
    AdvSendAdvert on;
    AdvOtherConfigFlag off;
    AdvRetransTimer 0;
    AdvCurHopLimit 64;
    prefix 2a0f:2::/64 {
        AdvAutonomous on;
        AdvValidLifetime 2592000;
        AdvOnLink on;
        AdvPreferredLifetime 14400;
    };
};

I think that nginx has good config including implementation.