LinuxQuestions.org
Help answer threads with 0 replies.
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 03-03-2015, 08:35 AM   #1
win_vin
LQ Newbie
 
Registered: Mar 2015
Posts: 1

Rep: Reputation: Disabled
Route add


Hi,
I'm trying to add routing between 2 hosts - one of them solaris and the other linux.

While I could run the same on the Solaris, i am unable to get the right syntax for the same on Linux.


root@server1>route add 10.10.15.20 10.10.15.100 -interface
add host 10.10.15.20: gateway 10.10.15.100


How can i get the equivalent command to run on lnux ?

Thanks
Vin
 
Old 03-03-2015, 01:57 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,219

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
You can't gateway through 10.10.15.100 unless you have a route to it.
Code:
route add -net 10.10.15.0/24 eth2
route add -host  10.10.15.20 gw 10.10.15.100
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.10.15.20     10.10.15.100    255.255.255.255 UGH   0      0        0 eth2
10.10.15.0      0.0.0.0         255.255.255.0   U     0      0        0 eth2
192.168.78.0    0.0.0.0         255.255.255.0   U     0      0        0 eth2
1.1.0.0         0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         192.168.78.1    0.0.0.0         UG    0      0        0 eth2
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
noob: ip route add vs route add jCash Linux - Networking 1 07-19-2007 12:12 PM
route add jay123 Linux - Networking 8 07-07-2006 01:58 PM
How do I add a route??? moonmoth Linux - Networking 3 09-04-2005 07:25 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 05:34 AM
route add powah Linux - Newbie 4 09-01-2005 03:24 PM

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

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