Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binding multiple IP addresses to one NIC

Status
Not open for further replies.

ackitsme

IS-IT--Management
Oct 15, 2002
21
US
I'm runnning Fedora Core 1. I have need to bind a second IP address to one of my NICs.

I had tried this once before in the past an a Red Hat 9 box, and after they were bound, some systems on the internet were unable to connect to my machine. Once I removed the second binding, everything worked fine.

Can someone let me know exactly what needs to be changed in order to successfuly bind multiple IP addresses to one NIC?

Thank you in advance.

-------------------------------------------------------------------------
Charlie Silverman
Sr. Systems Administrator
Globalstar, LLC

-------------------------------------------------------------------------
We now return you to your regularly scheduled reality.
 
Use the system-config-network gui, it will allow you to do it. The magic incatation is: "ifconfig eth0:1 inet 1.1.1.1 up
 
Ok an example using the command line as root:

ifconfig eth0:1 192.168.3.200 up

That will give you a second address on your eth0 NIC

This will remain only untill you reboot so to make it permanant then clone your /etc/sysconfig/network-scripts/ifcfg-eth0 file as /etc/sysconfig/network-scripts/ifcfg-eth0:1 and change the parameters to match new settings.

e.g.
more ifcfg-eth0
# Compaq|Integrated Netelligent 10/100
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
USERCTL=yes
PEERDNS=no
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.3.100

more ifcfg-eth0:1
# Compaq|Integrated Netelligent 10/100
DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=none
USERCTL=yes
PEERDNS=no
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.3.200

Its realy that simple, and you can add quite a few virtual interfaces to one card (maybe up to 256 so I've heared, but not recommended) however, it gets a little bit more tricky if you start adding different subnets only because you may need to start looking at static routing then depending on your environment but do a "man ifconfig" to see things like netmask etc.

Good Luck
Laurie.
 
Additional question:
How do you go about forcing your NIC interface to 100 MBps Full Duplex mode and making it permantly??

Thanks,
Ian
 
Sorry the best I can offer is to point you to this site, it will depend on your hardware but this rescorce should help you partway ... go get yourself a cuppa-tea and a biscuit or 2 first, choose your hardware from the left menu


Laurie.
 
Though, if working properly your NIC and your switch should negotiate 100MB/s if it is appropriate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top