0

I have an anycast setup for DNS using BIRD OSPF: Migrating Quagga to BIRD

However, using "show routes" in the birdc command I see lots of OSPF learned routes from our internal network.

As it is, in this anycast setup (and normally), there is only a need to announce routes, and not to receive them.

How to create a filter in BIRD to ignore the OSPF routes?

My OSPF setup is this one:

 protocol ospf {
        tick 2;
        rfc1583compat yes;

        area 0.0.0.0 {

            networks {
                1.1.1.0/22;
            };
            stubnet 2.2.2.2/32 {
                 cost 100;
            };
            stubnet 3.3.3.3/32 {
                 cost 500;  
            };
            stubnet 4.4.4.4/32 {
                 cost 1000;
            };
            stubnet 5.5.5.5/32 {
                 cost 900;
            };
            interface "eth0" {
                cost 1000;
                password "MySecretPassword" {
                    id 5;
                };
                authentication cryptographic; 
            };

            interface "dummy0" {
                stub;
            };
            interface "dummy1" {
                stub;
            };
            interface "dummy2" {
                stub;
            };
            interface "dummy3" {
                stub;
            };

        };
}
0

I found the answer here, How redistribute routes from kernel table to OSPF protocol?, and modified the OSPF configuration for creating the filter for dropping the routes learned from OSPF.

The modification will be done accordingly to all the elements of the anycast DNS cluster.

Take heed for the import_OSPF filter added in the modified OSPF config.

filter import_OSPF {
    reject;
}

protocol ospf {
        tick 2;
        rfc1583compat yes;

        import filter import_OSPF;
        area 0.0.0.0 {

            networks {
                1.1.1.0/22;
            };
            stubnet 2.2.2.2/32 {
                 cost 100;
            };
            stubnet 3.3.3.3/32 {
                 cost 500;  
            };
            stubnet 4.4.4.4/32 {
                 cost 1000;
            };
            stubnet 5.5.5.5/32 {
                 cost 900;
            };
            interface "eth0" {
                cost 1000;
                password "MySecretPassword" {
                    id 5;
                };
                authentication cryptographic; 
            };

            interface "dummy0" {
                stub;
            };
            interface "dummy1" {
                stub;
            };
            interface "dummy2" {
                stub;
            };
            interface "dummy3" {
                stub;
            };

        };
}

After restarting BIRD, the "show route" diagnostic command in birdc already does not show any imported OSPF routes, as it is intended.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.