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 12-01-2015, 09:07 PM   #1
Bruce.kirkland
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Rep: Reputation: Disabled
can't seem to route to 2 networks


I have a sles 11 box that has 2 network cards. The cards are connected to 2 different networks: all netmasks are /24
em1 attached to 10.100.10.0 with gw .1 (the 10 network)
em2 attached 10.100.11.0 - with gw .1 (the 11 network) this network also has 10.100.12.0 servers in it.
NOTE: below I use " to delimit the contents of a file in this text, its not in the file.
The 10 network is where almost everything happens so
I put "default 10.100.10.1" in /etc/sysconfig/network/routes.
Then that whole network is available to me but of course I can't get to the 11 network.
So I set /etc/sysconfig/network/routes.em2 to "10.100.11.0 10.100.11.1 255.255.255.0" and I can ping the gw 10.100.11.1 , so far so good.
then I want to get to a host 10.100.12.20 on the 11 network
so I add the line in routes.em2
"10.100.11.0 10.100.11.1 255.255.255.0"
and I can ping the gw 10.100.11.1. Looking better, but I can't get to 10.100.11.20, I've tried a route to the host itself in routes.em2
"10.100.11.10 10.100.11.1 255.255.255.0"

I'm apparently confused. If I reverse this whole thing and make 10.100.11.1 the default gw, all the 11 network is available to me.
So I can see both gateways with either config but I can't get to servers behind it. What am I doing wrong?
Keep forgetting stuff, anyway I DONt want to route between the networs, so ip_forward is 0.

Last edited by Bruce.kirkland; 12-01-2015 at 09:20 PM. Reason: forgot
 
Old 12-02-2015, 02:32 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,860

Rep: Reputation: 162Reputation: 162
Quote:
I want to get to a host 10.100.12.20 on the 11 network
so I add the line in routes.em2
"10.100.11.0 10.100.11.1 255.255.255.0"
Is the route for 10.100.12.0 network?
 
Old 12-02-2015, 08:34 PM   #3
Bruce.kirkland
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
let me restate this a bit as I think I've complicated the issue, or what I'm trying to do is just a bad idea.

I have multiple subnets that I can reach via my em2 interface if I make the default gw for the host 10.11.100.1. For example I can get to 10.100.12.20 with that configuration. But really that is the only host I want to access on that side of the network. There are duplication supnets and ips on the 2 sides but I know 10.100.12.20 only lives on the em2 side. So I set the default gw for the server to 10.10.100.1 where all but one of the hosts I need access to reside this is the em3 side of the net. Now I can't get to 10.100.12.20, its not there. So I'm attempting to route traffic to and from 10.100.12.20 via the 10.11.100.1 gw. I guess the problem is I've already set the default and I'm trying to make 10.100.12.20 and exception. Does that make any sense?
 
Old 12-03-2015, 09:32 AM   #4
Bruce.kirkland
LQ Newbie
 
Registered: Nov 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
all I can say is Brain Fart! in my own defense I was misled by the Suse admin manual that led me to believe I need to but routes in
/etc/sysconfig/network/routes.em2 - NOT! if I put the static route in /etc/sysconfig/network/routes along with the default route, all is good.
This was simple!
 
  


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
Route two networks Ephracis Linux - Networking 11 04-29-2008 02:38 AM
Configuration of a route through 2 networks jmcustiel Slackware 8 07-14-2007 11:24 PM
how to route internal Networks by IP tables? quazidaniel Linux - Networking 4 10-12-2005 10:32 AM
can't route/ping between networks ender03 Linux - Networking 21 02-01-2005 06:14 AM
Two networks - one route out diveguy Linux - Networking 5 08-29-2002 05:36 PM

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

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