Re: bird adversites a direct route from an interface without carrier

2021-10-21 Thread Ondrej Zajicek
On Thu, Oct 21, 2021 at 02:47:12PM +0200, Alarig Le Lay wrote:
> Hi,
> 
> On Tue 19 Oct 2021 13:48:53 GMT, Ondrej Zajicek wrote:
> > Hi
> > 
> > You use route from Direct protocol exported to OSPF. Contrary to other
> > protocols, default value of 'check link' option for Direct protocol is
> > 'no'. Just enable it:
> > 
> > https://bird.network.cz/?get_doc=20=bird-6.html#direct-check-link
> 
> Ah yes, indeed, the route has now disappeared, thanks!
> 
> May I ask why it’s not enabled by default? I don’t see why one would to
> announce an down link without an explicit configuration for it.

At first, i thought it is mostly for historical reasons, as we generally
do not change defaults during minor releases, but there are two arguments
against it:

1) It is the same behavior as Linux kernel, which also does not remove
direct route when link goes down. Although recently they added 'linkdown'
route flag for that purpose.

2) There is one address that is reachable even when link is down - the
local IP address of that iface. If routes from the Direct protocol are
announced to say RIP or Babel, then removing then when link is down would
lead to loss ofvalid connectivity to the router's address. This could be
handled by announcing the IP address as /32 instead of the full prefix
(which IIRC is done by OSPF in such situation), but that is complex and
perhaps unexpected behavior to be done by default.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."



Re: bird adversites a direct route from an interface without carrier

2021-10-21 Thread Alarig Le Lay
Hi,

On Tue 19 Oct 2021 13:48:53 GMT, Ondrej Zajicek wrote:
> Hi
> 
> You use route from Direct protocol exported to OSPF. Contrary to other
> protocols, default value of 'check link' option for Direct protocol is
> 'no'. Just enable it:
> 
> https://bird.network.cz/?get_doc=20=bird-6.html#direct-check-link

Ah yes, indeed, the route has now disappeared, thanks!

May I ask why it’s not enabled by default? I don’t see why one would to
announce an down link without an explicit configuration for it.

Regards,
-- 
Alarig


Re: bird adversites a direct route from an interface without carrier

2021-10-19 Thread Ondrej Zajicek
On Tue, Oct 19, 2021 at 12:35:20PM +0200, Alarig Le Lay wrote:
> Hello Ondrej,
> 
> On Mon 18 Oct 2021 17:39:44 GMT, Ondrej Zajicek wrote:
> > On Mon, Oct 11, 2021 at 01:20:52PM +0200, Alarig Le Lay wrote:
> > > Hi,
> > > 
> > > On one router I have an interface that used to be connected to another
> > > machine, so the state is NO-CARRIER:
> > > core01-arendal ~ # ip addr show enp1s0
> > > 2: enp1s0:  mtu 1500 qdisc mq state 
> > > DOWN group default qlen 1000
> > > link/ether 00:0d:b9:48:c1:c0 brd ff:ff:ff:ff:ff:ff
> > > inet 10.0.4.1/31 scope global enp1s0
> > >valid_lft forever preferred_lft forever
> > > inet6 2001:4640:a14f:fffd::2/127 scope global
> > >valid_lft forever preferred_lft forever
> > > inet6 fe80::20d:b9ff:fe48:c1c0/64 scope link
> > >valid_lft forever preferred_lft forever
> > 
> > Hi
> > 
> > What do you see in 'show interfaces' 'show ospf interface' and
> > 'show ospf state' on given router? Is it Linux or BSD?

Hi

You use route from Direct protocol exported to OSPF. Contrary to other
protocols, default value of 'check link' option for Direct protocol is
'no'. Just enable it:

https://bird.network.cz/?get_doc=20=bird-6.html#direct-check-link

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


Re: bird adversites a direct route from an interface without carrier

2021-10-19 Thread Alarig Le Lay
Hello Ondrej,

On Mon 18 Oct 2021 17:39:44 GMT, Ondrej Zajicek wrote:
> On Mon, Oct 11, 2021 at 01:20:52PM +0200, Alarig Le Lay wrote:
> > Hi,
> > 
> > On one router I have an interface that used to be connected to another
> > machine, so the state is NO-CARRIER:
> > core01-arendal ~ # ip addr show enp1s0
> > 2: enp1s0:  mtu 1500 qdisc mq state DOWN 
> > group default qlen 1000
> > link/ether 00:0d:b9:48:c1:c0 brd ff:ff:ff:ff:ff:ff
> > inet 10.0.4.1/31 scope global enp1s0
> >valid_lft forever preferred_lft forever
> > inet6 2001:4640:a14f:fffd::2/127 scope global
> >valid_lft forever preferred_lft forever
> > inet6 fe80::20d:b9ff:fe48:c1c0/64 scope link
> >valid_lft forever preferred_lft forever
> 
> Hi
> 
> What do you see in 'show interfaces' 'show ospf interface' and
> 'show ospf state' on given router? Is it Linux or BSD?

The router is a Linux (5.10).

And for the outputs:

bird> show interfaces
enp1s0 up (index=2)
MultiAccess Broadcast Multicast AdminUp LinkDown MTU=1500
10.0.4.1/31 (Preferred, opposite 10.0.4.0, scope site)
fe80::20d:b9ff:fe48:c1c0/64 (Preferred, scope link)
2001:4640:a14f:fffd::2/127 (Preferred, opposite 2001:4640:a14f:fffd::3, 
scope univ)
bird> show ospf interface "enp1s0"
ospf_ipv4:
Interface enp1s0 (10.0.4.0/31)
Type: ptp
Area: 4.8.8.4 (67635204)
State: Loopback
Priority: 1
Cost: 1
ECMP weight: 1
Hello timer: 10
Wait timer: 40
Dead timer: 40
Retransmit timer: 5

ospf_ipv6:
Interface enp1s0 (IID 0)
Type: broadcast
Area: 4.8.8.4 (67635204)
State: Loopback
Priority: 1
Cost: 1
ECMP weight: 1
Hello timer: 10
Wait timer: 40
Dead timer: 40
Retransmit timer: 5
Designated router (ID): 45.91.126.254
Designated router (IP): fe80::20d:b9ff:fe48:c1c0
Backup designated router (ID): 0.0.0.0
Backup designated router (IP): ::
bird> show ospf state ospf_ipv4
area 0.0.0.0
[…]
router 45.91.126.254
distance 0
external 10.0.4.0/31 metric2 1
[…]

If you want the full output, here they are:
https://paste.swordarmor.fr/raw/zpAv

The router from which I dumped the OSPF route is connected to enp3s0.50,
which is in area 4.8.8.4, like enp1s0.
However, both routers are inside 0.0.0.0 via other interfaces.

If my OSPF configuration might help, it’s https://paste.swordarmor.fr/raw/OIkL
The files matched by "/etc/bird.lag-*.conf" are generated by cron,
adapting the cost with the latency. (so lag as time, not aggregation
here)

If you want a more detailed view of my router, don’t hesitate to ask me,
or if you need more details as well :)

Regards,
-- 
Alarig


Re: bird adversites a direct route from an interface without carrier

2021-10-18 Thread Ondrej Zajicek
On Mon, Oct 11, 2021 at 01:20:52PM +0200, Alarig Le Lay wrote:
> Hi,
> 
> On one router I have an interface that used to be connected to another
> machine, so the state is NO-CARRIER:
> core01-arendal ~ # ip addr show enp1s0
> 2: enp1s0:  mtu 1500 qdisc mq state DOWN 
> group default qlen 1000
> link/ether 00:0d:b9:48:c1:c0 brd ff:ff:ff:ff:ff:ff
> inet 10.0.4.1/31 scope global enp1s0
>valid_lft forever preferred_lft forever
> inet6 2001:4640:a14f:fffd::2/127 scope global
>valid_lft forever preferred_lft forever
> inet6 fe80::20d:b9ff:fe48:c1c0/64 scope link
>valid_lft forever preferred_lft forever

Hi

What do you see in 'show interfaces' 'show ospf interface' and
'show ospf state' on given router? Is it Linux or BSD?

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."