Re: Multiple IP-addresses on one interface

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

 



On Friday 07 May 2004 05:10, Ola Thoresen wrote:
> What is the _right_ way to set multiple ip addresses on a single
> interface.
>
> I know I could either use ifcfg-eth0:0, ifcfg-eth0:1 and so on but I
> would prefer not to have these "old" aliases.
>
> The problem with adding the addresses in rc.local
> (IE /sbin/ip addr add xx.xx.xx.xx/xx dev eth0) is that if services are
> configured to listen to different addresses they will not start, unless
> I also add 'service xxxx start' to the bottom of rc.local.
>
> This is not a huge problem, but there should be a better way than
> repeating the whole init after the addresses are set in rc.local.

The "easiest" way is to read this...
/etc/sysconfig/network-scripts/ifup-aliases

The create a file called...
/etc/sysconfig/network-scripts/ifcfg-eth0-range0

Containing something like...
IPADDR_START=xxx.xxx.xxx.131
IPADDR_END=xxx.xxx.xxx.191
BROADCAST=xxx.xxx.xxx.191
NETWORK=xxx.xxx.xxx.128
CLONENUM_START=1
NETMASK=255.255.255.192
#NO_ALIASROUTING=YES

This has been around forever, but is very hard to find if looking for it. The 
ifup-aliases script has lots of comments to help you understand what to put 
in.

-- 
Brian Ashe - CTO
Dee-Web Software Services, LLC.
http://www.dee-web.com/



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux