Multiple IPs on single interface
Smith, Albert
Albert.Smith at genexservices.com
Tue Feb 15 18:50:55 UTC 2005
-----Original Message-----
>>> From: redhat-list-bounces at redhat.com on behalf of Mike Burger
>>> Sent: Tue 2/15/2005 1:42 PM
>>> To: General Red Hat Linux discussion list
>>> Subject: RE: Multiple IPs on single interface
>>>
>>> FWIW, it might be a better alternative, instead of the ethX:Y setups, via
>>> virtual interfaces, to simply alias the IPs using the "ip addr add"
>>> commands. You simply add lines like the following into your
>>> /etc/init.d/rc.local file:
>>>
>>> ip addr add xxx.xxx.xxx.xx1 dev eth0
>>> ip addr add xxx.xxx.xxx.xx2 dev eth0
>>>
>>> There are a number of fairly good reasons to go with this type of setup,
>>> rather than virtual ethX:Y interfaces:
>>>
>>> 1) You don't have to keep track of what interfaces are set up.
>>> 2) You don't have to maintain multiple configuration files for all of
>>> those virtual interfaces.
>>> 3) I've found, in the past, that iptables doesn't like working with the
>>> virtual interfaces all that much. Working with standard interface
>>> devices, like eth0, eth1, and then just the IPs, has seemed to work
>>> much better for me.
>>>
>> On Tue, 15 Feb 2005, Smith, Albert wrote:
>>
>> 256 is the maxium amount of ip address that can be bound to a single nic
>>
>> Albert Smith
>> Sr. Unix Systems Administrator
>> Genex Services
>> 440 E. Swedesford Rd.
>> Wayne, PA 19087
>> albert.smith at genexservices.com
>> (610) 964-5154
>
>
>
> -----Original Message-----
> From: redhat-list-bounces at redhat.com on behalf of Jason Williard
> Sent: Tue 2/15/2005 1:17 AM
> To: 'General Red Hat Linux discussion list'
> Subject: RE: Multiple IPs on single interface
>
> That worked. Thank you very much. Do you know if there is a max limit on
> how many IP's can be attached to a single interface? Also, is there a way
> to add an entire subnet without creating 1 file for each IP?
>
> ---
> Thank You,
> Jason Williard
> PCSafe, Inc.
>
>
>
> -----Original Message-----
> From: redhat-list-bounces at redhat.com [mailto:redhat-list-bounces at redhat.com]
> On Behalf Of IAK Tanoli
> Sent: Monday, February 14, 2005 10:08 PM
> To: General Red Hat Linux discussion list
> Subject: Re: Multiple IPs on single interface
>
>
> Modify the file as following.
>
> DEVICE=eth0:1
> ONBOOT=yes
> BOOTPROTO=static
> IPADDR=xxx.xxx.xxx.xxx
> NETMASK=255.255.254.0
> GATEWAY=xxx.xxx.xxx.xxx
> HWADDR=00:00:00:00:00:00
>
> --- Jason Williard <jason at pcsafe.com> wrote:
>
> > Hello,
> >
> > I have a box with Red Hat Enterprise Linux ES
> > release 3 installed on it.
> > Today, I acquired 2 additional IP addresses for it.
> > I can add the IP
> > addresses using the following commands, but they are
> > not permanent.
> >
> > # ifconfig eth0 add xxx.xxx.xxx.xxx netmask
> > 255.255.254.0
> > # ifconfig eth0:0 add xxx.xxx.xxx.xxx netmask
> > 255.255.254.0
> >
> > As this was not making it permanent, I created 2
> > files (ifcfg-eth0:0 &
> > ifcfg-eth0:0:1) inside the
> > /etc/sysconfig/network-scripts/ directory. The
> > first file works and interface eth0:0 comes up at
> > startup. However, the
> > second interface stays down. Below is the content
> > of the two files:
> >
> > ifcfg-eth0:0
> > ---
> > DEVICE=eth0:0
> > ONBOOT=yes
> > BOOTPROTO=static
> > IPADDR=xxx.xxx.xxx.xxx
> > NETMASK=255.255.254.0
> > GATEWAY=xxx.xxx.xxx.xxx
> > HWADDR=00:00:00:00:00:00
> > ---
> >
> > ifcfg-eth0:0:1
> > ---
> > DEVICE=eth0:0:1
> > ONBOOT=yes
> > BOOTPROTO=static
> > IPADDR=xxx.xxx.xxx.xxx
> > NETMASK=255.255.254.0
> > GATEWAY=xxx.xxx.xxx.xxx
> > HWADDR=00:00:00:00:00:00
> > ---
> >
> >
> > ---
> > Thank You,
> > Jason Williard
> > PCSafe, Inc.
> >
> >
> >
> >
> >
> >
> > --
> > redhat-list mailing list
> > unsubscribe
> >
> mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
>
>
> =====
> --
>
> ________________
> Imtiaz Ahmed Khan
> Sr. System Consultant
> ANTS Consultiing
>
>
> Org: ANTS Consulting
> URL: http://ants.com.pk/
> Eml: sendtoimtiaz at yahoo.com
> Mob: +92300-2128278
> ___________________________________
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 250MB free storage. Do more. Manage less.
> http://info.mail.yahoo.com/mail_250
>
>
--
Mike Burger
http://www.bubbanfriends.org
Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org
To be notified of updates to the web site, visit
http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a
message to:
site-update-request at bubbanfriends.org
with a message of:
subscribe
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
You could also use the redhat-config-network and do the following:
New -> Ethernet connection -> Set the ip info -> click Apply
On the new connection it is listed as inactive -> Edit -> Hardware
Under alias it should show that the alias as 1 or the next in your list and on the general it should show the interface name:alias
Click Save
Click Activate
This does not work with DHCP if you already have a DHCP assigned address.
Quick + Easy + Painless
Albert Smith
Sr. Unix Systems Administrator
Genex Services
440 E. Swedesford Rd.
Wayne, PA 19087
albert.smith at genexservices.com
(610) 964-5154
More information about the redhat-list
mailing list