Apr 22, 2009
30 Views
Comments Off on Enabling Multiple Ip Addresses per NIC on LINUX

Enabling Multiple Ip Addresses per NIC on LINUX

Written by

There are many times where you may need to quickly add multiple IP Addresses to a single network interface card (NIC)

Each interface is limited to 255 different ethernet devices per adaptor.

There are many times where you may need to quickly add multiple IP Addresses to a single network interface card (NIC)

Each interface is limited to 255 different ethernet devices per adaptor.

from the command line you can enter

ifconfig devicename:number ipaddress netmask yournetmask

so as root or a user with root permissions

ifconfig eth0:1 192.168.1.10 netmask 255.255.255.0

you can add this to the rc.local located in /etc/rc.d/  if you want this to take effect at boot

On Cent Os/ Redhat / Fedora

you can copy the /etc/sysconfig/network-scripts/ifcfg-eth0 to ifcfg-eth0:1

edit /etc/sysconfig/network-scripts/ifcfg-eth0:0

change the IPADDR= to your secondary address

Optionally, if you are adding disjointed ip addresses from a different network you may need to change BROADCAST, NETWORK, NETMASK, GATEWAY as well

Leave your vote

0 points
Upvote Downvote

Comments

0 comments

Article Tags:
Article Categories:
Linux

Log In

Forgot password?

Forgot password?

Enter your account data and we will send you a link to reset your password.

Your password reset link appears to be invalid or expired.

Log in

Privacy Policy

Add to Collection

No Collections

Here you'll find all collections you've created before.