Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-01-2015, 09:07 PM   #1
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 with gw .1 (the 10 network)
em2 attached - with gw .1 (the 11 network) this network also has 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" 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 "" and I can ping the gw , so far so good.
then I want to get to a host on the 11 network
so I add the line in routes.em2
and I can ping the gw Looking better, but I can't get to, I've tried a route to the host itself in routes.em2

I'm apparently confused. If I reverse this whole thing and make 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
Senior Member
Registered: Apr 2009
Posts: 1,860

Rep: Reputation: 162Reputation: 162
I want to get to a host on the 11 network
so I add the line in routes.em2
Is the route for network?
Old 12-02-2015, 08:34 PM   #3
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 For example I can get to 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 only lives on the em2 side. So I set the default gw for the server to 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, its not there. So I'm attempting to route traffic to and from via the gw. I guess the problem is I've already set the default and I'm trying to make and exception. Does that make any sense?
Old 12-03-2015, 09:32 AM   #4
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!


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 > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration