3

If no link on enp0s18 i have

root@route:~# ip r
default via a.a.a.1 dev enp0s18 metric 10 linkdown 
default via a.a.b.1 dev enp0s10 metric 20 onlink linkdown 
default via x.x.x.49 dev wwx001e101f0000 metric 30 

Expected that default swiches to x.x.x.49, but it tries linkdown route

root@route:~# ping -n ya.ru
PING ya.ru (87.250.250.242) 56(84) bytes of data.
From a.a.a.231 icmp_seq=1 Destination Host Unreachable
From a.a.a.231 icmp_seq=2 Destination Host Unreachable
From a.a.a.231 icmp_seq=3 Destination Host Unreachable
^C

Link state

4: enp0s10: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 1c:af:f7:08:27:e2 brd ff:ff:ff:ff:ff:ff
5: enp0s18: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:13:d3:14:83:f1 brd ff:ff:ff:ff:ff:ff

Result: Traffic black-holed

2 Answers 2

7

In new kernel we have new defaults. Solution is

echo 1 > /proc/sys/net/ipv4/conf/enp0s10/ignore_routes_with_linkdown
echo 1 > /proc/sys/net/ipv4/conf/enp0s18/ignore_routes_with_linkdown

And make new default

echo net.ipv4.conf.all.ignore_routes_with_linkdown=1 > /etc/sysctl.d/10-linkdown.conf
sysctl -p /etc/sysctl.d/10-linkdown.conf
2
  • Why have you not accepted your own answer? It does work... Nov 13, 2020 at 0:32
  • @AJSmith'Smugger' because there is 2 day timeout before I can accept my own answer. I switched to another tasks and forget it:)
    – eri
    Nov 13, 2020 at 1:43
0

I am also facing the same issue of "inactive linkdown"

And I do not have /etc/sysctl.d/10-linkdown.conf file in my development board.

So I tried with the solution "echo 1 > /proc/...../ignore_routes_with_linkdown"

and next checking ip route show gives "dead inactive linkdown".

Any comments/suggestions?

3
  • Create this file. If you have no /etc/sysctl.d/ dir - append this "net.ipv4.conf.all.ignore_routes_with_linkdown=1" to /etc/sysctl.conf
    – eri
    Nov 16, 2018 at 8:41
  • But there is no /etc/sysctl.conf as well
    – Nikita
    Nov 16, 2018 at 8:45
  • create it. look to dmesg to check
    – eri
    Nov 17, 2018 at 22:59

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.