Operating System - Linux
1828406 Members
3334 Online
109977 Solutions
New Discussion

how to config NICs with only one IP or even no IP

 
SOLVED
Go to solution

how to config NICs with only one IP or even no IP

I noted that some system been configured with more than one NIC in only one IP, or even no ip at all, act as only one hub.

I wonder how to configure that.

thanks in advance

frederick van targero
frederick van targero
4 REPLIES 4
Kodjo Agbenu
Honored Contributor
Solution

Re: how to config NICs with only one IP or even no IP

Hi Frederick,

Your question seems confusing to me.

Normally, two NICs cannot be configured the same IP.

There is only one case where this is permitted : when using the "bonding" driver.

Bonding is used to create an aggregate between 2 or several NICs. This adds the following properties : failover, load balancing and bandwidth increase.

To configure bonding, stop the network, then edit the following configuration files :

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

DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

/etc/sysconfig/network-scripts/ifcfg-eth1 :

DEVICE=eth1
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
SLAVE=yes
MASTER=bond0

/etc/sysconfig/network-scripts/ifcfg-bond0 :

DEVICE=bond0
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
IPADDR=...
NETMASK=...
NETWORK=...
BROADCAST=...
GATEWAY=...

/etc/modules.conf :

alias bond0 bonding


Restart the network, then type "/sbin/ifconfig -a". You will find that both eth0 and eth1 have the same IP address.

Good luck.

Kodjo
Learn and explain...

Re: how to config NICs with only one IP or even no IP

hi Kodjo,

yeah, what I seem some guys config the linux as "transparent mode", it is bonding done? however, I noticed they never need to restart the system?

regards,
Frederick van targero
frederick van targero
Manuel Wolfshant
Trusted Contributor

Re: how to config NICs with only one IP or even no IP

I assume that you refer to what is called as 'bridging'. You should read Linux BRIDGE-STP-HOWTO (http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO/) and http://www.linux.org/docs/ldp/howto/mini/Bridge+Firewall.html
Caesar_3
Esteemed Contributor

Re: how to config NICs with only one IP or even no IP

Hello!

For restart the network you don't need to
do restart to the computer all you need
is to restart the NIC you do it by:

ifdown eth0
change what you want in configuration
ifup eth0

And you have the changes without restart.

Caesar