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 03-03-2015, 07: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, 12:57 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,143

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
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



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 11:12 AM
route add jay123 Linux - Networking 8 07-07-2006 12:58 PM
How do I add a route??? moonmoth Linux - Networking 3 09-04-2005 06: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 04:34 AM
route add powah Linux - Newbie 4 09-01-2005 02:24 PM

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

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