OSPF passive interface

Hans van Kranenburg hans.van.kranenburg at mendix.com
Thu Apr 12 19:19:35 CEST 2018


On 04/12/2018 07:03 PM, Charles Butera wrote:
> Hello,
> 
> I am having trouble advertising my loopback interface into ospf as passive.

You can add lo as stub interface...

    interface "lo" {
      stub;
    };

Hans

> root at nms001]  # birdc
> BIRD 1.6.3 ready.
> bird> show route
> 10.192.111.0/24 <http://10.192.111.0/24>    dev bond0 [direct1
> 2018-03-05] * (240)
> 10.250.0.0/32 <http://10.250.0.0/32>      dev lo [direct1 2018-03-26] *
> (240)
> 
> I am currently advertising the route into the ospf domain using a filter
> as a workaround but this advertises as an External route (Type 5 LSA).
> I was wondering if there is a way to advertise the interface route as a
> Type1 LSA.
> 
> Output from OSPF router in the same Area0
> user at host> show ospf database
> 
>     OSPF database, Area 0.0.0.0
>  Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
> Router   10.192.1.61      10.192.1.61      0x80001d93  1028  0x22 0x4d67  96
> Router   10.192.1.62      10.192.1.62      0x80001d90  2565  0x22 0xb3f7  96
> Router   10.192.1.63      10.192.1.63      0x80001d8e  2537  0x22 0x1889  96
> Router   10.192.1.64      10.192.1.64      0x80001d76  2558  0x22 0xa805  96
> Router   10.192.1.65      10.192.1.65      0x80001d74  2568  0x22 0xd96   96
> Router   10.192.1.66      10.192.1.66      0x80001d7b   524  0x22 0x5f31  96
> Router  *10.192.1.67      10.192.1.67      0x8000167c  2942  0x22 0xae29 444
> Router   10.192.1.68      10.192.1.68      0x80001671  2947  0x22 0x9523 420
> Router   10.192.1.69      10.192.1.69      0x80001d7c  2559  0x22 0x9cde  96
> Router   10.192.1.70      10.192.1.70      0x80001981  2567  0x22 0xfe6f  96
> Router   10.192.1.71      10.192.1.71      0x8000198b   658  0x22 0x8f8d  96
> Router   10.192.1.72      10.192.1.72      0x80001984   174  0x22 0xb999  96
> Router   10.192.1.73      10.192.1.73      0x80001995  2567  0x22 0xf73e  96
> Router   10.192.1.74      10.192.1.74      0x80001d7b  2559  0x22 0x80bf  96
> Router   10.192.1.75      10.192.1.75      0x800013a7  1196  0x22 0xa66b  96
> Router   10.192.1.76      10.192.1.76      0x800013a3  1342  0x22 0xffa   96
> Router   10.192.1.77      10.192.1.77      0x80000060   839  0x22 0x3e09  72
> Router   10.192.1.81      10.192.1.81      0x8000003e    55  0x22 0xf6a4  84
> Router   10.192.1.82      10.192.1.82      0x8000003d  2943  0x22 0x147d  84
> Router   10.192.111.11    10.192.111.11    0x8000072f   493  0x2  0x8e79  36
> Network  10.192.111.1     10.192.1.71      0x8000044a   658  0x22 0x67de  32
>     OSPF AS SCOPE link state database
>  Type       ID               Adv Rtr           Seq      Age  Opt  Cksum  Len
> Extern  *0.0.0.0          10.192.1.67      0x800015a3  1463  0x22 0x816a  36
> Extern   0.0.0.0          10.192.1.68      0x8000120d  1465  0x22 0xb1d2  36
> Extern   10.250.0.0       10.192.111.11    0x80000338   663  0x2  0x779f  36
> 
> Bird configuration:
> root at nms001]  # cat /etc/bird.conf
> 
> router id 10.192.111.11;
> 
> filter loopback {
> if net ~ 10.250.0.0/32 <http://10.250.0.0/32> then accept;
> else reject;
> }
> 
> protocol direct {
> interface "bond0", "lo*";# Restrict network interfaces it works with
> }
> 
> protocol kernel {
> learn;# Learn all alien routes from the kernel
> persist;# Don't remove routes on bird shutdown
> scan time 20;# Scan kernel routing table every 20 seconds
> import none;# Default is import all
> export all;# Default is export none
> }
> 
> protocol device {
> scan time 10;# Scan interfaces every 10 seconds
> }
> 
> ############
> ### OSPF ###
> ############
> protocol ospf MyOSPF {
>      tick 2;
>      import none;
>      export filter loopback;
>      area 0.0.0.0 {
>         stub no;
>         interface "bond0" {
>            hello 10;
>            retransmit 6;
>            cost 10;
>            transmit delay 5;
>            dead count 4;
>            wait 50;
>            type broadcast;
>        };
>     };
> }
> 
> root at nms001]  # birdc
> BIRD 1.6.3 ready.
> bird> show route
> 10.192.111.0/24 <http://10.192.111.0/24>    dev bond0 [direct1
> 2018-03-05] * (240)
> 10.250.0.0/32 <http://10.250.0.0/32>      dev lo [direct1 2018-03-26] *
> (240)
> 
> 


-- 
Hans van Kranenburg


More information about the Bird-users mailing list