Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to understand what is meant by an network interface up? Because ip addr or ifconfig command shows an interface as up even when there is no IP associated with it.

for example on RHEL7 :

[root@IDCDVAM887 ~]# ifconfig ens256
ens256: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:50:56:9e:19:5b  txqueuelen 1000  (Ethernet)
        RX packets 229406  bytes 59265584 (56.5 MiB)
        RX errors 0  dropped 229454  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

(or)

[root@IDCDVAM887 ~]# ip addr show ens256
5: ens256: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP qlen 1000
link/ether 00:50:56:9e:19:5b brd ff:ff:ff:ff:ff:ff

What is the real use of showing as UP when the interface doesn't have IP at all? I believe when there is no IP, there could be no communication on that? Then what is the use of it?

share|improve this question
    
Ethernet frames can do more than just contain IP packets. –  casey Sep 1 at 12:10

3 Answers 3

The LOWER_UP is the state of the Ethernet link (or other link layer protocol). It's defined as Driver signals L1 up, which basically means the cable is fitted and it can see another device on the other end of the cable.

The UP means that it has been enabled. This can be controlled by you (or a script) using the ip link set <device> up of ifconfig <device> up command.

There are other protocols, such as IPX that use Ethernet, but will not have an IP address as they are not part of the Internet Protocol stack. So it's is perfectly acceptable for the link to be UP but not have an IP address.

share|improve this answer
    
DHCP is actually built on top of UDP broadcast, which requires an IP layer (in fact, it can be routed). Another example of historically used alternative to IP was NetBIOS (before being ported to NetBIOS over IPX/SPX and then as NetBIOS over TCP/IP) –  pqnet Sep 1 at 11:59
    
[root@IDCDVAM887 ~]# ip addr show eno33557248 3: eno33557248: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:9e:68:86 brd ff:ff:ff:ff:ff:ff inet 10.54.2.7/32 scope global eno33557248:1 valid_lft forever preferred_lft forever In the above format there is a virtual interface 'eno33557248:1' with some IP. Why it has not shown UP as separately ? Is it enough to show only the original interface as UP ? –  Srikanth Ganesan Sep 1 at 12:07
    
@pqnet - I was trying to expalin that the "no IP, no communication" part of the OP's question isn't true. Maybe it wasn't the best example then! I'll remove it as it'll only cause confusion. –  garethTheRed Sep 1 at 12:08
    
That part now I understood thank you both..!!! –  Srikanth Ganesan Sep 1 at 12:11
    
ip addr command out in RHEL7 for a interface that has configured multiple virtual interface or alias causing lot of confusion as how to find whether it is up or not –  Srikanth Ganesan Sep 1 at 12:12

The UP status is the administrative state of the interface, i.e. whether the interface has been enabled. You can enable any interface using e.g.

ip l s eth0 up

If the cable is plugged in and a link is established, the interface will also get the operational state of RUNNING.

Many cards will inhibit outgoing carrier generation if the administrative state is not UP, and an interface that is not UP cannot be RUNNING either, so if I set

ip l s eth0 down

I'd expect my local interface to lose both UP and RUNNING, and the corresponding interface on the remote side would also no longer be RUNNING (but still UP, so if I enable my side again, I'd get a link).

That is just the Ethernet link though. On top of the link, various protocols can be bound, one of them being IPv4. By default, IPv4 is bound to all interfaces that support the protocol family.

When the protocol is bound, I can send and receive packets with any address assigned to the interface. If no address is assigned, this simply means that there is no valid address that can be used for outgoing packets (so sending a packet fails), nor any unicast address an incoming packet can be addressed to that the system would recognize as local (so only broadcast/multicast packets can be received).

This does not concern the link layer in the slightest, as it will only establish a link.

Certain programs, such as the DHCP client, have special permission to send arbitrarily formatted packets, filling in a fantasy source address or 0.0.0.0, and to receive arriving packets regardless of whether they are destined for the local machine. This is used during automatic IP address configuration, where the DHCP request is sent using a source address of 0.0.0.0, and the reply from the server is addressed to the broadcast address 255.255.255.255.

Thus, there is a valid use case where IP packets are exchanged even without an address bound to the interface.

In addition to IPv4, there is also IPv6, IPX, AppleTalk, etc., which can all share the same physical layer. As soon as the link is established, any of these higher-level protocols can use its own activation sequence to get into an operational state.

share|improve this answer

an interface can be "up" even without any address. The "up" status refers to data link layer (also known as layer 2), that is "up" means that you can send and receive ethernet packets. IP is something built on top of it.

An example of configuration in which an interface is up but does not have an IP (and it shouldn't be assigned one) is when the interface is a bridge slave.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.