[NTLUG:Discuss] Multiple IP's on a NIC
MadHat
madhat at unspecific.com
Fri Sep 29 14:05:13 CDT 2000
> "Gregory L. Camp" wrote:
>
> Well, when I try that, I get the same net effect as before: if I
> issue ifup eth0:0 I get an alias ip for eth0. However, if I issue
> ifdown eth0:0 it takes down the NIC itself! If possible, I would like
> to be able to add/delete alias ip's "on the fly."
>
> Try it for yourself. Just be sure you don't have a problem rebooting,
> because so far that is what I have had to do to get rid of unwanted
> aliases!
I can not reproduce. Doing an 'ifconfig eth0:0 down' removes the IP
exactly the way it should. 'ifconfig -a' doesn't show the IP after
removing 'ifconfig eth0:0' doesn't even show the IP or the interface
being active. I even tryed to ping after I took it down and it is
gone. I also am able to still use eth0 without problem after removing
eth0:0... It appears to work exactly the way it should and that you
want. don't know what to tell you.
you might try setting eth0:0 to 0.0.0.0 to clear it out. I have had to
do that on PPP interfaces when doing certain tests...
ifconfig v1.39
>
> Gregory L. Camp
> Gregory.Camp at osc.com
>
> > -----Original Message-----
> > From: James L. Skidmore [mailto:james at linux-guy.com]
> > Sent: Friday, September 29, 2000 12:03 PM
> > To: 'discuss at ntlug.org'
> > Subject: RE: [NTLUG:Discuss] Multiple IP's on a NIC
> >
> >
> > That's no problem :-)
> >
> > Redhat sets the NIC's in /etc/sysconfig/network-scripts/
> >
> > In that directory, you should find at least ifcfg-eth0 and possibly
> > ifcfg-eth1 if you have set up two NIC's.
> >
> > copy the ifcfg-eth0 to ifcfg-eth0:0 (eth0:1, etc.) and change the IP
>
> > address/network addr/broadcast addr - etc.
> >
> > You can then use /etc/rc.d/init.d/network
> > (stop|start|restart) to bring
> > up/take down/ restart all of the interfaces.
> >
> > ifup eth0 to bring the interface up
> > ifdown eth0 to bring down the interface
> >
> > and of course you can still use ifconfig
> >
> > Hope this helps
> >
--
MadHat at unspecific.com
"The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris."
--Larry Wall
More information about the Discuss
mailing list