[wplug] Binding multiple IP's to a nic card

Mike Griffin mike at dmrnetworks.com
Fri Aug 15 09:46:06 EDT 2003


What distro are you using? I'm assuming Red Hat.

To assign the secondary address of 192.168.5.1 with a netmask of 
255.255.255.0 to eth0 do:
ifconfig eth0:1 192.168.5.1 netmask 255.255.255.0

And a third of 10.1.1.1 netmask 255.255.0.0
ifconfig eth0:2 10.1.1.1 netmask 255.255.0.0

you can assign multiple aliases to a NIC, but I suggest only assigning 
a primary and one secondary, and get another NIC if you need more 
addresses.


The correct way to add these as permanent (I'm assuming RH here)
cd /etc/sysconfig/network-scripts

edit  ifcfg-eth0:1 and put in the following syntax:
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.5.1
NETMASK=255.255.255.0


This will work for your other aliases as well. You can also add a 
'GATEWAY=gw.ip.addr.here' at the end of this file.

Mike


On Tuesday, August 12, 2003, at 09:43  AM, Beth Biernesser wrote:

> Can anyone help with binding multiple to a nic card with Linux 7.3?  
> When I
> add the IP's, only some will activate, and then, when I reboot and the
> machine comes back not all of the IP's "stick".  Thanks for any help.
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>




More information about the wplug mailing list