LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-02-2012, 02:18 AM   #1
jabirmk
LQ Newbie
 
Registered: Jul 2012
Posts: 1

Rep: Reputation: Disabled
bonded interface as default gw


On Redhat 6.1 I have two NIC cards with 4 ports each ,when the application comes up it creates a bonded interface with one port from each NIC(for ex:eth1 and eth4) and assigns a virtual IP to that interface .My requirement is that once this interface is up all the packets going out of this machine should go through the bonded interface .

Currently to achieve this I'm changing the default gw device name to bonded interface using the ip route command.(ip route replace default via 10.3.2.1 dev INT-BOND)

On stopping the application we bringdown the bonded interface and change the default gw device name back to eth0.

This works fine but just wants to confirm that this approach is fine? Otherwise should I go with iptables/ip rules modifications?

One problem with my approach is if someone brings down the bonded interface(ifdown) manually then it removes the default gw .

Any better suggestions?
 
Old 07-02-2012, 02:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Generally you should not need any special measures. In /etc/sysconfig/network the GATEWAY option should be set to the gateway address reachable over the bond and that's all there is to it. You shouldn't view taking the bond0 up and down as any different to doing the same on eth0 for example. The bond0 IP should be the only one on that subnet, so there shoudl be no confusion to the system about what it needs to do.
 
  


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
Bonded trunked interface with SAN multipath kameleon25 Linux - Networking 1 03-09-2012 07:55 AM
Bridging over a bonded interface on ubuntu server 10.04 (lucid) chienpo Linux - Networking 0 06-15-2010 06:22 PM
[SOLVED] Bonded ethernet interface can ping internally but not externally asuderma Linux - Networking 4 10-14-2009 09:51 PM
Netdump over bonded interface ? shriyer Linux - Software 0 07-22-2009 08:45 AM
kickstart with bonded interface bajones Linux - Newbie 6 07-29-2008 11:43 AM

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

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