Multiple IP addresses without aliasing?

Mike Wright mike.wright at mailinator.com
Fri Aug 28 22:19:29 UTC 2009


Ryan Lynch wrote:
> On Fri, Aug 28, 2009 at 17:59, Mike Wright<mike.wright at mailinator.com> wrote:
>> Ryan Lynch wrote:
>>> On Fri, Aug 28, 2009 at 17:36, Sam Varshavchik<mrsam at courier-mta.com>
>>> wrote:
>>>> Ryan Lynch writes:
>>>>
>>>>> Do the Fedora network init scripts support additional secondary IP
>>>>> addresses without the use of alias labels?  Does an option for IPv4
>>>>> addresses exist that works like IPV6ADDR_SECONDARIES?
>>>>>
>>>>> I just skimmed /usr/share/doc/initscripts-*/sysconfig.txt, but I
>>>>> didn't see anything to that effect, so I'm guessing the answer is no,
>>>>> and I have to use aliases and 'ifcfg-eth?:0' files.
>>>> Yes, at least for IPv4. There is absolutely no support from the GUI, but
>>>> you
>>>> can manually install /etc/sysconfig/network-scripts/ifcfg-ethX:Y. For
>>>> example, I have an ifcfg-eth1 and an ifcfg-eth1:1, with a second IP
>>>> address.
>>>> Just copy ifcfg-ethX to ifcfg-ethX:1, and stick in an additional IP
>>>> address.
>>> That's exactly what I'm trying to avoid--I don't want Fedora to add
>>> the 'eth0:0', 'eth0:1', etc. labels.  I'm wondering if the init
>>> scripts support multiple addresses WITHOUT aliases.
>>>
>> I've never been able to find a solution to that that didn't require running
>> another script.  /etc/rc.local is a kind of "catch all".  There are also
>> /etc/sysconfig/network-scripts/ifup-post and ifdown-post.
>>
>> Using iproute2 certainly gives good control.
>>
>>  ip address add 10.20.30.40/8 dev eth0
>>  ip address add 10.20.30.41/16 dev eth0
>>  ip address add 10.20.30.42/24 dev eth0
>>  ip address add 10.20.30.43/32 dev eth0
>>  ip address add 192.168.1.1/24 dev eth0
>>
>> is an example of how to add addresses to an interface.
>>
>> You may also use the same command to setup routes for your new found
>> diversity of addresses :)
> 
> I'm familiar with the manual method.  What I'm wondering, now, is
> whether the init scripts support any method that achieve the same
> effect.

Forget what I said about ifup-post and ifdown-post.  That was a brain 
fart.  I think there used to be ifup-local and ifdown-local but they no 
longer seem to be called.  You could hack that into it, but from my 
point of view I'm trying to learn how to drink the fedora kool-aid. 
Looks like you are too.  Sorry I couldn't be of more help.




More information about the fedora-list mailing list