projectcalico / bird

Calico's fork of the BIRD protocol stack
90 stars 86 forks source link

Does bird support config ospf? #84

Closed lyyao09 closed 4 years ago

lyyao09 commented 4 years ago

Expected Behavior

Hope bird support config ospf.

Current Behavior

Bird can't configure ospf, or is I missed something? When I add the ospf configuration in bird.cfg, I get a syntax error.

bird.cfg:

cat /etc/calico/confd/config/bird.cfg
...
 30
 31 protocol ospf test {
 32      rfc1583compat yes;
 33      area 0.0.0.0 {
 34        stub no;
 35        interface "eth0" {
 36            hello 10;
 37            retransmit 6;
 38            cost 10;
 39            transmit delay 5;
 40            dead count 5;
 41            wait 50;
 42            type broadcast;
 43        };
 44     };
 45 }

After restart bird:

tail -f /var/log/calico/bird/current
2020-07-14_06:03:19.22444 bird: /etc/calico/confd/config/bird.cfg:31:10 syntax error
2020-07-14_06:03:20.22758 bird: /etc/calico/confd/config/bird.cfg:31:10 syntax error
2020-07-14_06:03:21.22991 bird: /etc/calico/confd/config/bird.cfg:31:10 syntax error
2020-07-14_06:03:22.23217 bird: /etc/calico/confd/config/bird.cfg:31:10 syntax error
2020-07-14_06:03:23.23448 bird: /etc/calico/confd/config/bird.cfg:31:10 syntax error
2020-07-14_06:03:24.23685 bird: /etc/calico/confd/config/bird.cfg:31:10 syntax error

When I use native bird(version 1.6.8) test, adding ospf successful.

Possible Solution

Steps to Reproduce (for bugs)

In order to facilitate testing, I directly use the calico-node image to create a container.

  1. Create a container using calico-node image. docker run -it --rm --privileged --network=host --name=calico-node calico/node:v3.15.1 bash
  2. Create a bird.cfg file and add the ospf configuration.
    ...
    protocol ospf test {
     rfc1583compat yes;
     area 0.0.0.0 {
       stub no;
       interface "eth0" {
           hello 10;
           retransmit 6;
           cost 10;
           transmit delay 5;
           dead count 5;
           wait 50;
           type broadcast;
       };
    };
  3. View bird logs. tail -f /var/log/calico/bird/current

Context

Your Environment

caseydavenport commented 4 years ago

BIRD itself does support OSPF, but Calico does not provide any way to configure OSPF, as it's not part of the Calico architecture.