LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 06-11-2008, 02:09 PM   #1
mkono
Member
 
Registered: May 2008
Posts: 50

Rep: Reputation: 16
Gateway


I have a bladecenter utilizing 4 eth cards.
I currently have bonding setup for all 4.

This is the setup I have:

Bond0 will handle traffic for my 51 network.
ifcfg-bond0
DEVICE=bond0
IPADDR=43.145.x1.xx
GATEWAY=43.145.xx.xxx
NETMASK=255.255.255.0
NETWORK=43.145.xxx.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet

Bond1 will handle traffic for my 14 network

ifcfg-bond1
DEVICE=bond0
IPADDR=43.145.x4.xx
GATEWAY=43.145.x.xxx
NETMASK=255.255.255.0
NETWORK=43.145.xxx.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet

I have eth0 & 2 configured to use bond0 and I have eth1 & 3 configured to use Bond1....

Here is the problem... The /etc/sysconfig/network file contains the GATEWAY Address of the 51 network which is what I want...

But if I dont comment out (#) the gateway line in the Bond1 file, it sets the default gateway of the machine to the 14 network.

If I run a route -n the default gateway comes back as the 14 address, if I comment out the GATEWAY line in Bond1 and restart networking, run a route -n, the default comes back as 51 network which is what i want, but then traffic for 14 network is unroutable...

Man I hope this makes sense....

What Im looking to achieve is a default gateway of 51 and still have the GATEWAY listed in Bond1 file be available for 14 traffic.

Any ideas would be much appreciated...

Thanks,
mkono
 
Old 06-14-2008, 09:07 AM   #2
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
In the description you gave above of your ifcfg-bondx files, are these cut-n-paste or did you type them out?
Both have the line: DEVICE=BOND0
Is this a typo in the post, or a typo in your config. files?
Shouldn't one be DEVICE=BOND0 and one be DEVICE=BOND1 having 2 NIC's attached to bond0 and 2 NIC's attached to bond1 ?

The second test I would try, is remove all the "network" statements from your ifcfg and ../sysconfig/network files. Take them all out. I don't generally use them, and I can't recall having my routes messed up.

If the above doesn't work, another way would be to statically manipulate the routes (e.g. add to /etc/rc.local) to force 1 network out 1 ifdev and 1 out the other. e.g.:
route add -net 43.145.xxx.0 netmask 255.255.255.0 dev ifcfg-bond1
route add -net 43.145.x1.xx netmask 255.255.255.0 dev ifcfg-bond0
route add default gw 43.145.xx.xxx
(naturally you would adjust the above lines by filling in your correct IP's where you have "x"'s)
You could also use a "route del" command to remove dynamically added routes so that the above take preference. Take a look at "man route" as there are some useful examples.

Last edited by zQUEz; 06-14-2008 at 12:48 PM.
 
Old 06-16-2008, 09:14 AM   #3
mkono
Member
 
Registered: May 2008
Posts: 50

Original Poster
Rep: Reputation: 16
zQUEz,
Thanks again for your help on the issues im experiencing.

The "bond" file stanzas reflected the correct device#. That was just a typo in my post.

I eliminated my network routes as you suggested. I don't see why they would be needed if I am directing traffic with a proper subnet and gateway.

I attempted to run the route add and received the following errors.

route add -net 43.145.xxx.0 netmask 255.255.255.0 dev ifcfg-bond1
SIOCADDRT: No such device

I did successfully run a route add gw .... and it looks as if that may have worked.

I will keep you posted. Again, I appreciate your responses, they are the exactly what Im looking for.

Thanks,
Mkono


Quote:
Originally Posted by zQUEz View Post
In the description you gave above of your ifcfg-bondx files, are these cut-n-paste or did you type them out?
Both have the line: DEVICE=BOND0
Is this a typo in the post, or a typo in your config. files?
Shouldn't one be DEVICE=BOND0 and one be DEVICE=BOND1 having 2 NIC's attached to bond0 and 2 NIC's attached to bond1 ?

The second test I would try, is remove all the "network" statements from your ifcfg and ../sysconfig/network files. Take them all out. I don't generally use them, and I can't recall having my routes messed up.

If the above doesn't work, another way would be to statically manipulate the routes (e.g. add to /etc/rc.local) to force 1 network out 1 ifdev and 1 out the other. e.g.:
route add -net 43.145.xxx.0 netmask 255.255.255.0 dev ifcfg-bond1
route add -net 43.145.x1.xx netmask 255.255.255.0 dev ifcfg-bond0
route add default gw 43.145.xx.xxx
(naturally you would adjust the above lines by filling in your correct IP's where you have "x"'s)
You could also use a "route del" command to remove dynamically added routes so that the above take preference. Take a look at "man route" as there are some useful examples.
 
  


Reply



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
lm10.0 gateway is set but when I reboot I have to set the gateway rharvey32 Mandriva 8 02-13-2006 01:35 PM
What is a gateway? can I have more than one gateway on a vlan? abefroman Linux - Networking 3 09-06-2005 10:43 AM
Odd problem: Gateway unreachable after certain amount of time (Win XP Gateway) SocialEngineer Linux - Networking 2 08-13-2004 12:54 AM
A second gateway... Marcos.Trama Linux - Networking 8 06-26-2003 11:38 AM
Gateway jonnyjonjon Linux - Networking 2 01-29-2003 08:32 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 05:15 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