Re: reference for 2 IP #'s for 1 NIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2003-11-20 at 15:03, Bill Tangren wrote:
> Hey all,
> 
> Could someone point me in the direction of documentation on how to set 
> up one NIC card to use two IP numbers? I did a man on ifconfig and 
> didn't see how to do it. I took a RedHat class several years ago, and 
> the manual for that class states that you can have as many as 256 ip 
> numbers for a single NIC, but it didn't say how to do it.
> 
> TIA,
> Bill Tangren
> 
Hey Bill, to alias an address on a NIC, go to
/etc/sysconfig/network-scripts. You want to create a script called
ifcfg-ethx:n   where x is the NIC you wish to alias and :n is the
iteration. Here is an example of my ifcfg-eth0:1 file.
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
NETMASK='255.255.255.0'
BOOTPROTO='none'
DEVICE='eth0:1'
IPADDR='10.0.13.1'
TYPE='Ethernet'
ONBOOT='yes'
USERCTL='no'
NETWORK='10.0.13.0'
BROADCAST='10.0.13.255'
PEERDNS='no'

If you need a gateway, add the line GATEWAY=xx.xx.xx.xx
Where xx.xx.xx.xx is the gateway you are using for the second address. 
Make sure the permissions are the same as ifcfg-eth0 et al. Then just
ifup eth0:1. 
Good luck
Ed.


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux