LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 10-14-2009, 06:27 PM   #1
asuderma
LQ Newbie
 
Registered: Sep 2009
Location: Colorado
Distribution: CentOS 5.*
Posts: 19

Rep: Reputation: 0
Bonded ethernet interface can ping internally but not externally


Hi all,

So I keep reading that bonding ethernet devices is supposed to be easy. I have followed several tutorials and tried a few things on my own, and I can't seem to get it right.

I currently have a setup that allows me to ping internally on my network, but when I try to ping externally I get the error:

connect: Network is unreachable

Before I bonded the interface my connection worked fine.

Here are my config files. I am running centos 5.3 on a virtual machine.


/etc/sysconfig/network-scripts/ifcfg-bond0
Code:
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.1.0
NETMASK=255.255.255.0
IPADDR=192.168.1.211
USERCTL=no
/etc/sysconfig/network-scripts/ifcfg-eth1
Code:
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:0c:29:88:59:47
MASTER=bond0
SLAVE=yes
USERCTL=no
/etc/sysconfig/network-scripts/ifcfg-eth0
Code:
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
HWADDR=00:0c:29:88:59:3d
ONBOOT=yes
/etc/modprobe.conf
Code:
alias eth0 pcnet32
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptspi
alias scsi_hostadapter2 ata_piix
alias eth1 pcnet32

alias bond0 bonding
options bond0 mode=0 miimon=100
output of cat /proc/
Code:
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:88:59:3d

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:88:59:47
I would appreciate any advice you can give me to fix this.
Thanks
 
Old 10-14-2009, 08:09 PM   #2
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
Need more info

Just to be clear you can ping 192.168.1.xxx but you can't ping google.com??

If this is true sounds like your default route is not set correctly.

Can you provide the output of:

ifconfig

and

route
 
Old 10-14-2009, 08:19 PM   #3
asuderma
LQ Newbie
 
Registered: Sep 2009
Location: Colorado
Distribution: CentOS 5.*
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by never say never View Post
Just to be clear you can ping 192.168.1.xxx but you can't ping google.com??
Yes, that is the case.

ifconfig:
Code:
bond0     Link encap:Ethernet  HWaddr 00:0C:29:88:59:3D
          inet addr:192.168.1.211  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe88:593d/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:4478 errors:0 dropped:0 overruns:0 frame:0
          TX packets:182 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:282670 (276.0 KiB)  TX bytes:18558 (18.1 KiB)

eth0      Link encap:Ethernet  HWaddr 00:0C:29:88:59:3D
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:2249 errors:0 dropped:0 overruns:0 frame:0
          TX packets:191 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:142098 (138.7 KiB)  TX bytes:19960 (19.4 KiB)
          Interrupt:177 Base address:0x1400

eth1      Link encap:Ethernet  HWaddr 00:0C:29:88:59:3D
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:2244 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:141472 (138.1 KiB)  TX bytes:0 (0.0 b)
          Interrupt:185 Base address:0x1480

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:560 (560.0 b)  TX bytes:560 (560.0 b)
route:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 bond0
169.254.0.0     *               255.255.0.0     U     0      0        0 bond0
 
Old 10-14-2009, 08:55 PM   #4
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
OK you don't have a default route in your routing table.

try:

Code:
route add default gw xxx.xxx.xxx.xxx bond0
Where xxx.xxx.xxx.xxx is your Gateway (router or modem IP) probably 192.168.1.1.

Then run route

you should get output similar to this:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 bond0
169.254.0.0     *               255.255.0.0     U     0      0        0 bond0
default         xxx.xxx.xxx.xxx     0.0.0.0     UG    0      0        0 bond0
This should get you working but you will still need to set the config so it will work across reboots.

I am not familiar with CentOS but it should be a file in
/etc/sysconfig/network or a sub direcotry

mine is here:
/etc/sysconfig/network/routes

Anyway you need to make sure your default route is set up, or you will have to run the above route command with every reboot.

Hope this helps.
 
Old 10-14-2009, 09:51 PM   #5
asuderma
LQ Newbie
 
Registered: Sep 2009
Location: Colorado
Distribution: CentOS 5.*
Posts: 19

Original Poster
Rep: Reputation: 0
Fixed it

That worked fantastically. I just forgot to put the GATEWAY=xxx.xxx.xxx.xxx into the ifcfg-bond0 file. I must be tired.


Thanks a bunch!
 
  


Reply

Tags
bonding, ethernet


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netdump over bonded interface ? shriyer Linux - Software 0 07-23-2009 05:45 PM
kickstart with bonded interface bajones Linux - Newbie 6 07-29-2008 11:43 AM
Accessing web app externally throws 403, internally works. gillyd Linux - Server 5 04-21-2008 06:36 PM
LXer: Resolving Domains Internally And Externally With Bind9 And Caching Nameserver LXer Syndicated Linux News 0 02-11-2007 08:33 AM
DNS - Works Internally - Bizarre Externally - Almost 100% fed007 Linux - Networking 9 08-24-2001 04:10 PM


All times are GMT -5. The time now is 01:09 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration