Re: FW: Configuring down one alias brings down all aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I see in the code (2.4.17) that the secondary flag to an interface 
address is set by the kernel 
and cannot be specified. I also see the rationale behind flagging 
addresses as primary or secondary. Please correct me if I am wrong.

The rationale is based on the addition/deletion of route entries.
Each primary address results in adding a route entry in FIB.
Secondary addresses do not result in creating additional entries,
thus keeping the route table small. When a primary is deleted, the route 
entry is deleted and so are all of its associated secondary addresses.

To avoid deleting other addresses, we have two options:
1) Change kernel to treat all addresses as primaries; this would result
   in multiple copies of the same route entry.
   Hopefully deletion will work fine; one copy would be deleted as
   each address is deleted.

2) Reference count route entries. For each new address in an existing
   subnet, increment the count. Remove the route when the count goes
   to zero.

Any caveats against implementing either of these options?

-- 
Umesh



On Fri, 1 Nov 2002, Umesh Maheshwari wrote:

  > 
  > 
  > I tried to use "ip", as suggested, but it allows me to only _list_ the 
  > address type (primary/secondary), not _set_ the type specifically.
  > 
  > bash# ip -V             
  > ip utility, iproute2-ss010824
  > 
  > bash# ip addr ls dev eth1.5
  > 5: eth1.5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop 
  >     link/ether 00:02:b3:11:0f:38 brd ff:ff:ff:ff:ff:ff
  >     inet 1.2.3.4/24 scope global eth1.5
  >     inet 1.2.3.5/24 scope global secondary eth1.5
  > 
  > bash# ip addr add 1.2.3.6/24 dev eth1.5 primary
  > Error: either "local" is duplicate, or "primary" is a garbage.
  > 
  > From ip_cref.ps in the iproute2 rpm, page 14,
  > "Address flags are set by the kernel and cannot be changed 
  > administratively."
  > 
  > 

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux