netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jeff Silverman <jeffsilverm@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: I find one aspect of the ip link show command confusing and I'd like you to fix it, please
Date: Mon, 24 Apr 2017 08:54:07 -0700	[thread overview]
Message-ID: <20170424085407.2b9df529@xeon-e3> (raw)
In-Reply-To: <CAGu9dLLRVaiO-vHd_jzVuMM3O=sjLX_VOeu5n6-+eV6fEdhBug@mail.gmail.com>

On Sun, 23 Apr 2017 15:36:32 -0700
Jeff Silverman <jeffsilverm@gmail.com> wrote:

> People,
> 
> When my NIC is up, but not connected, I see:
> 
> root@jeff-desktop:~# ip link show enp3s0
> 2: enp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state
> DOWN mode DEFAULT group default qlen 1000
>     link/ether 00:10:18:cc:9c:77 brd ff:ff:ff:ff:ff:ff
> root@jeff-desktop:~# ip link show enp3s0
> 
> NO-CARRIER makes sense to me - if the wire is unplugged, then the NIC
> isn't seeing the humm at the beginning of each packet.  That's clear.
> Note that even though my link isn't plugged in,  ip still notes that
> it is up.  That's great.
> 
> 
> But if I down my NIC, there is no indication that it is DOWN other
> than you can't see the UP flag.  If somebody was new to linux, they
> would not see what's not there.
> 
> 2: enp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode
> DEFAULT group default qlen 1000
>     link/ether 00:10:18:cc:9c:77 brd ff:ff:ff:ff:ff:ff
> 
> 
> What I would like you to do is modify the ip command so that if the
> NIC has been downed by something, then it explicitly says DOWN.
> 
> What would be really nice would be if you enumerated all of the flags
> that an interface can have, and note if the flag is set or cleared.
> But that's more than what I want with this message.
> 
> 
> Many thanks,
> 
> 
> Jeff
> 

If you have a suggestion send a patch. The utility has shown the same
output since the earliest versions. Therefore the default output format
can't change since people do things like write scripts to parse it.
A more verbose output is possible but would have to be enabled by
a flag.

      reply	other threads:[~2017-04-24 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-23 22:36 I find one aspect of the ip link show command confusing and I'd like you to fix it, please Jeff Silverman
2017-04-24 15:54 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170424085407.2b9df529@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=jeffsilverm@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).