LinuxQuestions.org
Help answer threads with 0 replies.
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 01-31-2009, 10:56 AM   #1
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Rep: Reputation: 18
how to have two gateway?


hello every body.
I wanted to know how can I have two diffrent gate way.
I have a linux that have two connection to internet 1.ethernet 2.ppp
i do not want to send my packets at same time from them but i want both of them up that if when one of them going down my machine use another one as the gateway. i added both of them as default gateway with diffrent metrics but when i unploged my ethernet cable my ping did not goes through and stoped and when i ploged it back it start to pinging out side again.
what can I do for it.
 
Old 01-31-2009, 12:33 PM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
VRRP is what you want. You give your two gateways a real physical address each, then a third address acts as a shared virtual address, and its this you use as your default gateway on your hosts. If you have Cisco routers they also have a similar proprietary mechanism called HSRP which has a few more bells and whistles.

I seem to recall setting up VRRP on linux some time in the past, I don't think it was too hard. Google "vrrp linux howto" and I'm sure you'll find something.
 
1 members found this post helpful.
Old 02-01-2009, 06:54 AM   #3
golden_boy615
Member
 
Registered: Dec 2008
Distribution: Ubuntu Fedora
Posts: 445

Original Poster
Rep: Reputation: 18
thanks BUT!!!!!

thank you for your help but I can not use VRRP because my linux is a embedded linux on a embedded computer that can route and have IPtable and i have not any router in my way to confige . is there any solution with routing or iptable that I can use?
 
Old 02-01-2009, 02:40 PM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Not that I am aware of. The problem is that of a mechanism that allows the host to know when the primary path has failed and causes it to re-ARP for a new gateway MAC address. You might try a script that pings the primary routers WAN link and changes the default route if it goes away.
 
1 members found this post helpful.
  


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
Gateway mkono Linux - Enterprise 2 06-16-2008 09:14 AM
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
gateway oUTLAw Linux - Networking 3 09-10-2001 08:01 AM

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

All times are GMT -5. The time now is 01:23 PM.

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