Re: Some tests (Was: Probable bug in handling disabled network interfaces (2.2.12))

kuznet@ms2.inr.ac.ru
Mon, 20 Sep 1999 19:54:16 +0400 (MSK DST)


Hello!

> /sbin/ifconfig eth1 192.168.0.51

Interface is UP, address 192.168.0.51 is assigned to it.

> /sbin/ifconfig eth1 0.0.0.0

Address is removed, but the interface hardware is UP
and the interface still receives IP packets destined
to another addresses of this host.

> /sbin/ifconfig eth1:?rap 10.10.10.10

Dummy address is added.

> /sbin/ifconfig eth1:?rap down

Dummy address is deleted. It was the last IP address on this
interface, so that IP is completely disabled now.

> As you can see from the below eth1 is still receiving packets
> And if this is not considered UP I do not know what is .

Exactly. It is UP for another protocols, but IP is disabled on it.

> /sbin/ifconfig eth1 down

Hardware is down too. The interface is completely dead.

> ifconfig eth1 192.168.0.51

It is UP and has address.

> ifconfig eth1 down , ...

Hardware is down, but address is configured and this host recieves
packets destined to it on other interfaces.

> /sbin/ifconfig eth1 0.0.0.0

Yes, it is dead. But if you UP it again, it will receive IP packets.

Seems, the confusion is related to the fact, that interface has two modes
looking absolutely similarly (except for entry in /proc/sys/net/ipv4/conf/):
no IP and addressless IP. ifconfig 0.0.0.0 makes it addressless,
magic sequence with adding and deleting ?rap really disables IP.

Alexey

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/