LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-23-2017, 08:47 AM   #1
adumith
Member
 
Registered: Feb 2013
Posts: 46

Rep: Reputation: Disabled
Static route in different segments


Hi everyone;

I have a server (RedHat) with two interfaces; One pointing to my network and another pointing to the client's network.

I need to connect a client server that is on a different network segment.

My ip is 10.1.xx.xx and that of the client server is 10.0.yy.yy; How do I establish a static route from my server to the client server?

This is possible to do?

How?

Im using the comand, but I get a error:
ip route add 10.0.yy.yy/24 via 10.1.xx.xx dev eth1

Thanks in advance.
 
Old 06-23-2017, 01:39 PM   #2
Demosa
Member
 
Registered: Feb 2013
Distribution: Fedora 25, RHEL7, RHCI stack
Posts: 38

Rep: Reputation: Disabled
So you have two interfaces, one has a 10.1 address and is on the 10.1 network.

What you didn't say, does the other interface have a 10.0 address and is on the 10.0 network?


Send up the results of `ip route show` and `ip a` and we can look into it
 
Old 06-23-2017, 04:58 PM   #3
adumith
Member
 
Registered: Feb 2013
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Demosa View Post
So you have two interfaces, one has a 10.1 address and is on the 10.1 network.

What you didn't say, does the other interface have a 10.0 address and is on the 10.0 network?


Send up the results of `ip route show` and `ip a` and we can look into it
Thanks for your reply;

I have two interfaces; one has a 10.1.205 address and another has a 10.1.7; since this one (10.1.7) I need to connect to a network 10.0.68.

This is the result:
default via 10.1.205.12 dev eth0 proto static metric 1024
10.1.7.0/24 dev eth1 proto kernel scope link src 10.1.7.49
10.1.205.0/24 dev eth0 proto kernel scope link src 10.1.205.160
169.254.0.0/16 dev eth1 scope link metric 1003

Thanks again.
 
  


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
Why static routes set using 'ip route add' and 'route add' commands are not used for routing packets within the same network? kanak@tetcos.com Linux - Networking 7 04-25-2017 06:52 AM
route-eth - Adding a static route gbwien Linux - Networking 5 02-24-2012 06:15 AM
Static Route Gets Ignored jfmorales Red Hat 2 10-29-2010 07:44 PM
static route dvong3 Linux - Networking 1 01-25-2006 05:42 PM
Help with static route noinfo Linux - Networking 1 10-05-2005 12:40 PM

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

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