"ip addr show" returns interface names that won't work with "ip addr show dev <ifname>"

3 messages, 2 authors, 2021-06-14 · open the first message on its own page

"ip addr show" returns interface names that won't work with "ip addr show dev <ifname>"

From: Scott Fields <hidden>
Date: 2021-06-11 10:30:10

“ip addr show” will return a list of devices that may not work with “ip addr show dev <ifname>”.

If you have list vlan device, it will return it as “<vlan ifname>@<parent ifname>”.

However, “ip addr show dev <ifname>” will not work with that name.

“ip addr show dev <ifname>” should work with interface names that “ip addr show” returns.

Re: "ip addr show" returns interface names that won't work with "ip addr show dev <ifname>"

From: Scott Fields <hidden>
Date: 2021-06-14 19:53:55

Has this been received? I’ve not seen any response.
On Jun 11, 2021, at 5:27 AM, Scott Fields [off-list ref] wrote:

“ip addr show” will return a list of devices that may not work with “ip addr show dev <ifname>”.

If you have list vlan device, it will return it as “<vlan ifname>@<parent ifname>”.

However, “ip addr show dev <ifname>” will not work with that name.

“ip addr show dev <ifname>” should work with interface names that “ip addr show” returns.

Re: "ip addr show" returns interface names that won't work with "ip addr show dev <ifname>"

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-06-14 21:20:55

On Mon, 14 Jun 2021 14:52:50 -0500
Scott Fields [off-list ref] wrote:
Has this been received? I’ve not seen any response.
quoted
On Jun 11, 2021, at 5:27 AM, Scott Fields [off-list ref] wrote:

“ip addr show” will return a list of devices that may not work with “ip addr show dev <ifname>”.

If you have list vlan device, it will return it as “<vlan ifname>@<parent ifname>”.

However, “ip addr show dev <ifname>” will not work with that name.

“ip addr show dev <ifname>” should work with interface names that “ip addr show” returns.  
The % syntax is how ip commands show the link field of the device.
It has been that way since the initial versions of iproute2 back in 2.4 Linux kernel.
So it is a historical behavior that won't change.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help