Thanks Jamie, the ifcfg-eth0:0 works perfectly. I wasn't sure if the boot scripts would pick up anything with a : after the ethernet device name.
Cheers, Paul ----- Original Message ----- From: "Jamie Wilkinson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 9:41 AM Subject: Re: [SLUG] ip aliases and netmasks > This one time, at band camp, Paul Robinson wrote: > >Running Redhat 7.3 on a server. I've got a bunch of ip aliases which I am running from /etc/rc.local to run them when the comp boots. > >Problem is that on boot it creates the aliased ip's but they have mask of Mask:255.0.0.0 instead of the required 255.255.255.248 > > > >An example line from rc.local is : > >/sbin/ifconfig eth0:0 netmask 255.255.255.248 xxx.xxx.xxx.xxx (with the x's being the additional ip addr) > > I'd actually create a file /etc/sysconfig/network-interfaces/ifcfg-eth0:0 > (ugh) with the following contents: > DEVICE=eth0:0 > IPADDR=xx.xx.x.x > NETMASK=255.255.255.248 > > which will then get the interface automagically created by the Red Hat init > scripts, plus gives you control via the useful ifup/ifdown commands. > > >SIOCSIFNETMASK: Cannot assign requested address > > I wonder what will happen if you instead rearrange the command like so: > > ifconfig eth0:0 xxx.xxx.xxx.xxx netmask 255.255.255.248 > > >I'm guessing this could be because some services that are started are already listening on the aliased ip's. If I repeat the command 2 or 3 times it eventually sets the mask correctly. > > Services that are configured to listen on that interface won't actually be > able to listen on an interface that doesn't exist yet. > > -- > [EMAIL PROTECTED] http://spacepants.org/jaq.gpg > -- > SLUG - Sydney Linux User's Group - http://slug.org.au/ > More Info: http://lists.slug.org.au/listinfo/slug > -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
