LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] 2 nics as one

[ILUG] 2 nics as one

Pawel Slabiak p.slabiak at linux-services.org
Tue Sep 23 14:12:15 IST 2008


Hi Frank,

maybe this line would help you:

Network interface bonding


On Redhat systems
First, note down your MAC addresses to keep track of what's going on 
once bonding is activated,
ifconfig eth0 | grep HWaddr
ifconfig eth1 | grep HWaddr
then create a virtual network interface configuration,
cd /etc/sysconfig/network-scripts
vi ifcfg-bond0
for example,
DEVICE=bond0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=yes
Note you can also specify “GATEWAY=” here or in the 
/etc/sysconfig/network configuration file.

Backup the old interfaces configurations,
cd /etc/sysconfig/network-scripts
mv ifcfg-eth0 OLD.ifcfg-eth0
mv ifcfg-eth1 OLD.ifcfg-eth1
Note it's preferable not to start your own filenames with ifcfg (scripts 
are going to parse them) hence the “OLD” prefix.

Create the interfaces configurations,
cd /etc/sysconfig/network-scripts
vi ifcfg-eth0
for example,
DEVICE=eth0
MASTER=bond0
SLAVE=yes
ONBOOT=yes
then,
vi ifcfg-eth1
for example,
DEVICE=eth1
MASTER=bond0
SLAVE=yes
ONBOOT=yes

Add the bonding configuration,
vi /etc/modprobe.conf
alias bond0 bonding
options bond0 miimon=100 mode=1
Note mode=1 is for HA failover. mode=0 is for load balancing (teaming)
Note miimon=100 means the link is going to be checked every 100 milliseconds

At last restart the network,
service network restart
Note the bonding module is loaded automaticly, just like any other 
network interface module,
lsmod | grep bond

For other /etc/modprobe.conf parameters,
modinfo bonding
Note it's always possible to unload and reload the bonding module while 
concerned interfaces are down, just like other network interface modules,
service network stop
rmmod bonding
modprobe bonding
service network start

To see what's going on when you unplug a cable,
tail -F /var/log/messages
To check if a interface is currently enslaved, trying to enslave it 
manually will tell you,
ifenslave bond0 eth0
Ref. man ifenslave
or just look into,
cat /proc/net/bond0/info


Frank Murphy wrote:
> Have check archives:
> http://www.google.com/search?q=site:www.linux.ie%20pair+network
> 
> Conor D.?,
> I think gave me a script to join\pair two nics'.
> So that the router will see them both as the same ip 192.168.0.xxx
> 
> At the moment eth0 has *.xxx
>               eth1 has *.yyy
> 
> Router gives out ip's as dhcp.
> 
> *BUT server always gets (reserved) 192.168.0.xxx
> 
> for lan samba.
> 
> Looking for this howto again.
> 
> Frank
> 

best regards
-- 

Pawel Slabiak
Systemingenieur
Linux Services
mailto: p.slabiak at linux-services.org
mailto: p.slabiak at linux-on-desktop.de
http://www.linux-services.org
http://www.linux-on-desktop.de

Linux Services - Dienste  rund um Linux....






More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell