LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-28-2011, 01:54 PM   #1
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Rep: Reputation: 30
RHEL: Linux Bond / Team Multiple Network Interfaces (NIC) Into a Single Interface


Hi guys, i followed this link to setup network bonding and it works fine:

http://www.cyberciti.biz/tips/linux-...interface.htmlup

I setup it on my virtualbox with redhat 5.5, on my desktop which i access via ssh on terminal.

Im trying to test if my ssh connection is till good if one of the nic is down and its not, when i ifdown eth1 my connection is ok but if i ifdown eth0 i cant connect, should it be like this?
 
Old 11-28-2011, 04:01 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
If you put the default gateway with eth0 then there is no gateway when only eth1 is up. Setting the default gateway on your bond0 device OR in network global settings would make it the same gateway even if eth0 is down.
 
Old 11-28-2011, 08:14 PM   #3
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
hi i have fixed the route but still same issue, from the vm when i ifdown eth0 im given a warning that the mac of eth0 is still being used by bond0 and i should set new mac for eth0 to avoid conflicts, then when i ifup eth0 i received a warning that the mac of eth0 is being used by bond0 the mac of eth1 is then also assigned to eth0.
 
Old 11-29-2011, 03:12 AM   #4
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
Hi guys I have test the network bonding on my box and I think this is now my main problem, I cant ssh to my box when eth1 is the active slave for bond0, I can only ssh when eth0 is the active slave.
 
Old 11-29-2011, 10:31 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
Can you post the actual contents of:
/etc/sysconfig/ifcfg-eth0
/etc/sysconfig/ifcfg-eth1
/etc/sysconfig/ifcfg-bond0 (assuming you used this as the bond device).
/etc/sysconfig/network
/etc/modprobe.conf

Also run "lsmod |grep -i bond" and post that.
 
Old 11-29-2011, 12:14 PM   #6
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
Hi, here is the config files...

/etc/sysconfig/network-scripts/ifcfg-bond0:
Quote:
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.1.10
NETMASK=255.255.255.0
USERCTL=no
/etc/sysconfig/network-scripts/ifcfg-eth0:
Quote:
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
/etc/sysconfig/network-scripts/ifcfg-eth1:

Quote:
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
/etc/sysconfig/network:
Quote:
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
/etc/modprobe.conf:
Quote:
alias eth0 e1000
alias scsi_hostadapter ata_piix
alias scsi_hostadapter1 ahci
alias eth1 e1000
alias snd-card-0 snd-intel8x0
options snd-card-0 index=0
options snd-intel8x0 index=0
remove snd-intel8x0 { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-intel8x0
alias bond0 bonding
options bond0 mode=0 miimon=100
 
Old 11-29-2011, 12:15 PM   #7
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
here is the lsmod:

Quote:
[root@localhost ~]# lsmod |grep -i bond
bonding 96873 0
ipv6 270305 18 bonding,ip6t_REJECT
 
Old 11-29-2011, 01:35 PM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
You said you fixed your route earlier. How exactly did you do that?

I was expecting to see GATEWAY=<IP> in your /etc/sysconfig/network script but it isn't there or in your ifcg* files. Do you have /etc/sysconfig/network-scripts/route-<interface> files? If so what is in them?

What does "netstat -r" and "netstat -rn" show for your default gateway.

It might help to add the GATEWAY=<IP> to /etc/sysconfig/network and restart networking (after removing this gateway from anything else that is defining it.

This link may be of help to you:
http://www.centos.org/docs/5/html/De...nterfaces.html
 
Old 11-30-2011, 03:09 AM   #9
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
I removed the GATEWAY, I only have 2 VM box with interfaces set to internal network, they are using their default routes. would that be ok or should i manually set their routes?
 
Old 11-30-2011, 10:26 AM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
GATEWAY=<IP> in /etc/sysconfig/network defines the "default" route. Other routes can be defined for individual NICs but those should in route-<interface> in /etc/sysconfig/network-scripts. (e.g. a special route for eth2 would be defined in route-eth2.

I gather from what you're writing that the only active NICs you have are eth0 and eth1 and they are both slaves to bond0. If so I wouldn't think you'd need a route-<interface> for anything but having GATEWAY=<IP> in /etc/sysconfig/network might help to insure the default route is available even if eth0 is down.
 
Old 12-01-2011, 12:00 AM   #11
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
Click image for larger version

Name:	route.png
Views:	20
Size:	3.6 KB
ID:	8516

Hi since i only have 2 box i use the ip of my client2 to be the gateway to connect to my client1 which has the bonding.. attached if the screenshot of my route on both client.but same problem i cant connect when eth0 is down the connection timeouts.
 
Old 12-01-2011, 10:17 AM   #12
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668Reputation: 1668
Rather than trying "idown" what happens if you simply disconnect the cable from eth0?

Can you ping 192.168.1.9 from the box that has 192.168.1.10 as bond0?
 
Old 12-02-2011, 11:53 PM   #13
SBN
Member
 
Registered: Jul 2006
Distribution: UBUNTU, CentOS, FEDORA 8
Posts: 474

Original Poster
Rep: Reputation: 30
Hi my 2 box are VM's so i have no other way if disconnecting eth0.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to know Linux internals on multiple IPv6 addresses on single interface. itismohit Linux - Software 5 08-30-2011 02:11 PM
Multiple IP Ranges - Single interface yahhodeol Linux - Networking 3 03-24-2010 12:09 PM
Multiple Network Interfaces Simultaneously? Choose Interface for each program? smaddox Linux - Software 7 01-20-2010 02:26 PM
Multiple Interfaces + Cisco 515 and default NIC streamalot Linux - Networking 0 06-12-2006 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration