Mailinglist Archive: opensuse (4547 mails)

< Previous Next >
RE: [SLE] double ip address on the same ethernet card: is it possible?
  • From: Brad Shelton <bshelton@xxxxxxx>
  • Date: Thu, 13 May 2004 16:11:02 -0400
  • Message-id: <1084478274.7324.17.camel@xxxxxxxxxxx>
On Thu, 2004-05-13 at 10:28, Damon Jebb wrote:
> > From: Luca Mollica [mailto:luca_mollica@xxxxxxxxxxx]
> >
> > I have set up correctly the card with ip, dns and all the stuff, and
> > connection works : but now I would like to ADD a new
> > configuration on the
> > same card but with different parameters after some works have
> > been done in my
> > workplace and I cannot use the same ip address (and all other
> > parameters) on
> > different floors and sections of the building.
> > What do I have to do? Can I follow the YAST configuration
> > wizard or do I have
> > to make some set up in order to have a double ip and make the machine
> > automatically choose the ip?
>
> I did this, but only for an IP in the same network as the first one.
>
> I found it easier to setup editing the file
>
> /etc/sysconfig/network/ifcfg-ehtx
>
> where x is the number of the interface (probably 0 for yours unless you
> have more than one card).
>
> Mine looks like this...
>
> BOOTPROTO='static'
> BROADCAST='192.168.1.255'
> IPADDR='192.168.1.3'
> IPADDR_1='192.168.1.200' ->>> adds the address to the card
> IPADDR_2='192.168.1.201' ->>> adds another address
> MTU=''
> NETMASK='255.255.255.0'
> NETWORK='192.168.1.0'
> REMOTE_IPADDR=''
> STARTMODE='onboot'
> UNIQUE=''

In /etc/sysconfig/network

find ifcfg-eth0 and make copies like so:

ifcfg-eth0
ifcfg-eth0:0
ifcfg-eth0:1

Modify :0 and :1 , as many others as you need, with the appropriate
information based on subnet, etc. and rcnetwork reload, or restart.

This will give you what is referred to as IP aliasing; multiple IP/masks
on the one interface.

You can figure out what info to put in each based on the original.

--
Brad Shelton On Line Exchange http://www.ole.net
Phone: 313-526-1111 Fax: 313-526-3333



< Previous Next >
Follow Ups
References