Messages in this thread | | | From | kuznet@ms2 ... | Subject | Re: ifconfig eth0:0 down removes all virtual interfaces [CONFIRMED 2.2.1] | Date | Sun, 21 Feb 1999 18:45:52 +0300 (MSK) |
| |
Hello!
> If I down the *first* of the alias interfaces, then all > of the *aliases* go down, but if I down any of the latter > aliases, just that alias goes away: .... > Now the question is, why net/ipv4/devinet.c: inet_del_ifa() works > quite this way ? ANK, DaveM ?
Yes, aliases with the same prefix (i.e. with the same addr&netmask) are clustered together and the first address becomes group leader. Group leader is special because its address is used as default source address of packets on subnet addr&mask.
Really, the situation is similar to 2.0, where downing device destroyed all the aliases. The only difference is that downing device hardware does not affect aliases/addresses in 2.1 at all, and destruction occurs, when leader is deleted.
Alternative would be to make next available address leader, when old leader is deleted. I do not make it, because it would be too expensive: either we would have number of fib_info records proportional to number of addresses (which is not acceptable, when this number becomes large. Now we keep only one record for leader), or to write more hairy code to prune old leader and to graft new one.
If someone really wants to make slaves not depending on leader, he can add them with netmask 255.255.255.255, which is even more clever, if number of aliases is low. With lots of aliases clustering or even direct adding local addresses to routing tables is preferred however.
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/
| |