ip link and ip addr output meaning

13,844

Those are interface's flags. They are documented in the netdevice(7) man-page. Below is the relevant part (reordered alphabetically):

IFF_ALLMULTI      Receive all multicast packets.
IFF_AUTOMEDIA     Auto media selection active.
IFF_BROADCAST     Valid broadcast address set.
IFF_DEBUG         Internal debugging flag.
IFF_DORMANT       Driver signals dormant (since Linux 2.6.17)
IFF_DYNAMIC       The addresses are lost when the interface goes down.
IFF_ECHO          Echo sent packets (since Linux 2.6.25)
IFF_LOOPBACK      Interface is a loopback interface.
IFF_LOWER_UP      Driver signals L1 up (since Linux 2.6.17)
IFF_MASTER        Master of a load balancing bundle.
IFF_MULTICAST     Supports multicast
IFF_NOARP         No arp protocol, L2 destination address not set.
IFF_NOTRAILERS    Avoid use of trailers.
IFF_POINTOPOINT   Interface is a point-to-point link.
IFF_PORTSEL       Is able to select media type via ifmap.
IFF_PROMISC       Interface is in promiscuous mode. 
IFF_RUNNING       Resources allocated.
IFF_SLAVE         Slave of a load balancing bundle.
IFF_UP            Interface is running.

So, LOWER_UP means there is a signal at the physical level (i.e. something active is plugged in the network interface). NO-CARRIER, is the exact opposite: no signal is detected at the physical level.

Share:
13,844

Related videos on Youtube

Zaboj Campula
Author by

Zaboj Campula

Senior alcohol consumer. Many years experience with playing billiard, darts and bowling.

Updated on September 18, 2022

Comments

  • Zaboj Campula
    Zaboj Campula over 1 year

    I am searching for an explanation what exactly the output of the commands ip link and ip addr means on a linux box.

    # ip link
    3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 00:a1:ba:51:4c:11 brd ff:ff:ff:ff:ff:ff
    4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
    link/ether 00:a1:ba:51:4c:12 brd ff:ff:ff:ff:ff:ff
    

    What exactly are the LOWER_UP, NO-CARRIER and other flags? I have found a reference at http://download.vikis.lt/doc/iproute-doc-2.6.32/ip-cref.ps but it does not contain complete information and man pages are not detailed enough.

    • Attila Csipak
      Attila Csipak about 4 years
      Looks like swlx01.hs-esslingen.de is down, so the linked reference is not reachable :-(
    • Zaboj Campula
      Zaboj Campula about 4 years
      The broken link is updated. Nevertheless the man page referenced in the answer is better source of information.
  • Tran
    Tran over 5 years
    Interesting how NO-CARRIER is not documented in netdevice(7)...
  • xhienne
    xhienne about 5 years
    This is because NO-CARRIER is not an actual flag that you can get or set. It is defined as a combination of IFF_UP and not IFF_RUNNING.
  • maxschlepzig
    maxschlepzig almost 3 years
    Hm, most NIC interfaces under Linux never seem to reach UP and stay at LOWER_UP it seems. And this doesn't seem to indicate a real problem.
  • xhienne
    xhienne almost 3 years
    @maxschlepzig Sorry but I do not understand. Indeed, UP and LOWER_UP do not indicate a problem. Did I suggest they do?
  • maxschlepzig
    maxschlepzig almost 3 years
    @xhienne, no, you didn't. But the short description you quoted can be read that way. I mean since IFF_UP is described as Interface is running this can be understood as: since I don't see it on my interface -> it isn't running, so this is bad?!? But it is running, because traffic goes over it ... So, it would interesting to get more information what it really means since (at least some) drivers don't set it even when the interface is up and running.
  • xhienne
    xhienne almost 3 years
    @maxschlepzig Agreed my answer may seem too concise but I'll hardly do better (most descriptions seem self-explanatory to me and I don't have the knowledge to write more on them). I think what you are missing is that most of the flags are configuration flags, not a diagnostic reported by the lower layers like the hardware. In particular, IFF_UP is like your car engine: it is either turned on or off. UP just means you did ifconfig ... up or ip link ... up and if it's reported as !UP, your interface won't work but it's not necessarily a problem, it depends on what you intend it to be.
  • maxschlepzig
    maxschlepzig almost 3 years
    @xhienne interesting, the hosts I checked had networkd or NetworkManager in charge of those LOWER_UP interfaces. So it seems that those NIC managers don't set IFF_UP then for some reason.