retitle 429689 removing primary address should not remove secondary addresses tags 429689 upstream severity 429689 wishlist thanks
So http://www.policyrouting.org/iproute2.doc.html has an explanation: "secondary --- this address is not used when selecting the default source address for outgoing packets. An IP address becomes secondary if another address within the same prefix (network) already exists. The first address within the prefix is primary and is the tag address for the group of all the secondary addresses. When the primary address is deleted all of the secondaries are purged too. See the examples for the actual functionality of these steps." I made sense of it like this: if I add an address to a device with 'ip add', ip also implicitly adds a link-scoped route according to the netmask. It only does this for primary addresses, so if I add a second address within the same network, the route is not duplicated. Thus, the net effect on the routing table is the same for the following two commands: ip a a 172.16.0.100/12 dev eth0 && ip a a 172.16.0.200/12 dev eth0 ip a a 172.16.0.100/12 dev eth0 && ip a a 172.16.0.200/32 dev eth0 ^^^^ In the first case, the .200 address becomes a secondary of the .100 address. In the second case, they are both primaries. In both cases, only one /12 link-scoped route will be created. However, in both cases, if I remove the .100 address, the .200 is affected: if it's secondary, it ceases to exist, and if it's primary (i.e. in the /32 case), then the host can no longer use it to communicate to hosts in the same link segment, only to hosts on the other side of the default gateway. I thus question the point of purging secondary addresses. Obviously, only one address can be primary (it is used as source address for packets leaving the machine by the respective route). But if the primary address is removed, the next secondary should be promoted and the route should *not* be deleted. Cheers, -- .''`. martin f. krafft <[EMAIL PROTECTED]> : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~madduck - http://debiansystem.info `- Debian - when you have better things to do than fixing systems
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)