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 08-02-2009, 12:41 AM   #1
e_sagheb
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
define tow gateway in linux


hi, I have a server with 192.1.9.10 ip address and I want to define two gateways with ip: 192.1.9.4 and 192.1.9.254 on it but I dont know how I can do it.I dont have professianal information in linux.
thanks for your help
 
Old 08-02-2009, 06:57 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Your network device configuration tool probably has a gateway entry field.

You can manually add a route using the "route" or the "ip" command.
For example, if the router at 192.1.9.4 is for the 10.0.0.0/8 network, and the router at 192.1.9.254 is the default gateway, you could use:

route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.1.9.4 dev eth0
route add default gw 192.1.9.254 dev eth0

Also look at the man page for the "routes" configuration file. You can enter routes there.
Indicating which distribution you are using might be 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
how to define gateway on network card kashif2131971 Linux - Networking 5 07-16-2009 09:28 AM
Need to define a second gateway on Mandrake 9.2 Maldain Mandriva 1 01-03-2006 03:58 PM
Unable to manually define default Gateway Xandor Linux - Networking 6 11-29-2005 04:35 AM
tow programes needed Overview Linux - Software 3 10-31-2005 07:44 PM
Tow linux boxes can't ping each other dvddecrypter Linux - Networking 8 05-30-2004 07:22 AM

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