netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* "ip addr show" returns interface names that won't work with "ip addr show dev <ifname>"
@ 2021-06-11 10:27 Scott Fields
  2021-06-14 19:52 ` Scott Fields
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Fields @ 2021-06-11 10:27 UTC (permalink / raw)
  To: netdev

“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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "ip addr show" returns interface names that won't work with "ip addr show dev <ifname>"
  2021-06-11 10:27 "ip addr show" returns interface names that won't work with "ip addr show dev <ifname>" Scott Fields
@ 2021-06-14 19:52 ` Scott Fields
  2021-06-14 21:20   ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Fields @ 2021-06-14 19:52 UTC (permalink / raw)
  To: netdev

Has this been received? I’ve not seen any response.

> On Jun 11, 2021, at 5:27 AM, Scott Fields <slfields66@gmail.com> 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "ip addr show" returns interface names that won't work with "ip addr show dev <ifname>"
  2021-06-14 19:52 ` Scott Fields
@ 2021-06-14 21:20   ` Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2021-06-14 21:20 UTC (permalink / raw)
  To: Scott Fields; +Cc: netdev

On Mon, 14 Jun 2021 14:52:50 -0500
Scott Fields <slfields66@gmail.com> wrote:

> Has this been received? I’ve not seen any response.
> 
> > On Jun 11, 2021, at 5:27 AM, Scott Fields <slfields66@gmail.com> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-14 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-11 10:27 "ip addr show" returns interface names that won't work with "ip addr show dev <ifname>" Scott Fields
2021-06-14 19:52 ` Scott Fields
2021-06-14 21:20   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).