[Linux-users] 2 IP's on the same network card

Bill Campbell linux-sxs
Thu Aug 30 09:04:08 PDT 2007


On Thu, Aug 30, 2007, Steve Jardine wrote:

>I think SUSE allows yo to use /etc/rc.d/rc.local to start stuff up when you
>reboot. If not, look in /etc/sysconfig/network?? Maybe you can put it in
>/etc/sysconfig/networking-scripts?

If you configure additional aliases on a NIC using yast2, they will be
started automatically when the interface is brought up during boot or with
``ifup ethN'' (where N is 0, 1, etc).  There's nothing special required.

I frequently manually add new IP addresses to NICs by editing the
appropriate ifcfg-eth* file, then doing ``ifup ethN'' which adds the IP
without going through the normal rigamorole that yast2 will do when
changing network parameters.

>Let me think about it..
>
>Steve
>
>On Tue, 28 Aug 2007 21:56:55 +1000
>James McDonald <james at jamesmcdonald.id.au> wrote:
>
>> Dirk Moolman wrote:
>> > Just a question - how do I make a network setting, like the eth0:1 that
>> > I created below, permanent ? .... so that it stays when I reboot the
>> > server
>> >
>> >   
>> The trouble with that question is that it's distro centric and I only 
>> know redhat/centos/fedora
>> Anyone with Suse experience?
>> > -----Original Message-----
>> > From: linux-users-bounces at pananix.com
>> > [mailto:linux-users-bounces at pananix.com] On Behalf Of Dirk Moolman
>> > Sent: 27 August 2007 11:49 PM
>> > To: linux-users at linux-sxs.org
>> > Subject: Re: [Linux-users] 2 IP's on the same network card
>> >
>> > Ok, I found it - and it is actually so simple:
>> >
>> > http://learnlinux.tsf.org.za/courses/build/net-admin/ch01s10.html 
>> >
>> > To plumb your device, you may run the command:
>> >
>> > ifconfig eth0 192.168.0.1 netmask 255.255.255.0
>> > ifconfig eth0:1 172.16.5.1 netmask 255.255.255.0
>> >
>> >
>> > "These commands would plumb the interface. Notice that the eth0:1 gives
>> > the interface the second IP address. Using any number in place of the
>> > '1' would also work."
>> >
>> >  
>> >
>> >
>> >   
>> 
>> The t
>> _______________________________________________
>> Linux-users mailing list
>> Linux-users at linux-sxs.org
>> http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
>> 
>
>
>-- 
>"There is a clear attempt to establish truth not by scientific methods but by 
>perpetual repetition."
>- Richard S. Lindzen, Ph.D. Professor of Meteorology, MIT
>_______________________________________________
>Linux-users mailing list
>Linux-users at linux-sxs.org
>http://mail.linux-sxs.org/cgi-bin/mailman/listinfo/linux-users
>

-- 
Bill
--
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676

Rightful liberty is unobstructed action according to our will within
limits drawn around us by the equal rights of others. I do not add 'within
the limits of the law' because law is often but the tyrant's will, and
always so when it violates the rights of the individual.
    -Thomas Jefferson



More information about the Linux-users mailing list