[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] bind with link down
From: |
Massimiliano Cialdi |
Subject: |
Re: [lwip-users] bind with link down |
Date: |
Fri, 3 Apr 2020 00:40:43 +0200 |
On Thu, Apr 2, 2020 at 11:25 PM Sylvain Rochet <address@hidden> wrote:
> "ip link set <if> up/down" is interface administrative state.
>
> Link state is whether the cable is plugged or unplugged, i.e. "ethtool"
> for linux equivalent.
This answer confuses me.
I tried: on linux the link state and the admin state *are* related to
each other.
with the cable connected both ip and ethtool report the states up
max@jarvis:~$ ip link show enx0050b6e9a99e && ethtool enx0050b6e9a99e | tail -n2
5: enx0050b6e9a99e: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 00:50:b6:e9:a9:9e brd ff:ff:ff:ff:ff:ff
Cannot get wake-on-lan settings: Operation not permitted
drv probe link
Link detected: yes
and even with the cable disconnected they both say down:
max@jarvis:~$ ip link show enx0050b6e9a99e && ethtool enx0050b6e9a99e | tail -n2
5: enx0050b6e9a99e: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc
fq_codel state DOWN mode DEFAULT group default qlen 1000
link/ether 00:50:b6:e9:a9:9e brd ff:ff:ff:ff:ff:ff
Cannot get wake-on-lan settings: Operation not permitted
drv probe link
Link detected: no
but you said:
> "Admin state" is "netif_set_up()".
>
> > How should the admin state be affected by the link state?
> Not at all. Just call "netif_set_link_up()" or down when you found out a
> state change. Leave "netif_set_up()" as it is.
>From this I understand that the links state and admin state are not
related. I may have (and you say so) links down but admin state up.
Tell me if I understand correctly.
So I find myself forced to ask you the question again: on linux how
can I have admin state up and link down?
the last thing: you say that "ip link set <if> up/down" is interface
administrative state.
But if I force down the "admin state" with the cable connected, both
ip and ethtool tell me the link is down. And once again, that seems
contrary to what you say (link and admin state are not related).
best regards
Max
--
Et nunc, auxilium solis, vincam!
Oppugnatio solaris!
VIS!
Massimiliano Cialdi
address@hidden
- Re: [lwip-users] bind with link down, address@hidden, 2020/04/02
- Re: [lwip-users] bind with link down, Massimiliano Cialdi, 2020/04/02
- Re: [lwip-users] bind with link down, Sylvain Rochet, 2020/04/02
- Re: [lwip-users] bind with link down,
Massimiliano Cialdi <=
- Re: [lwip-users] bind with link down, Sylvain Rochet, 2020/04/02
- Re: [lwip-users] bind with link down, Massimiliano Cialdi, 2020/04/03
- Re: [lwip-users] bind with link down, address@hidden, 2020/04/03
- Re: [lwip-users] bind with link down, Massimiliano Cialdi, 2020/04/03
- Re: [lwip-users] bind with link down, address@hidden, 2020/04/03