LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-01-2009, 04:33 AM   #1
tapke
LQ Newbie
 
Registered: Jun 2008
Posts: 13

Rep: Reputation: 0
SLES 10 as a router


Okey. here's my problem.

I have a server with SLES 10 SP2 in it. Two ethernets (eth0 and eth2).

I've googled for tons of manuals, tutorials and forums. However something's just not right.

Ok. Firstly, eth0 has to be external with dhcp. So it has ant IP 192.168.25.something. The server is already inside a lan, so I'm trying to make some kind of a sublan. The main lan is 192.168.10.x-192.168.255.255. The sublan is 192.168.1.0/24. The eth2 has static 192.168.1.1.

So here's what i've got:

I've enabled routing to default gw 192.168.25.1 (main lan gw).
I've connected a laptop to eth2 (for testing).
Maquerades are on (i suppose. i've edited the SuSEfirewall2 at sysconfig).
The laptop gets it's DHCP lease.
The server can freely connect to anywhere (only when eth2 is down)
But the laptop, can't even ping anything except 192.168.1.0/24

So I suppose the routing just doesn't work.

Here are some config's of the server:

http://p.defau.lt/?5GPcIrAT_CQqMq81SsVIXA
http://p.defau.lt/?mt0HAQFnA5DUMZ3K9BSUZw
http://p.defau.lt/?B6ditS7d4pokxSLJU2iSqg

Please, help me with it. i just can't find what's wrong.

___ edit __

i've changed the routing table that the default is on dev eth0 and the 192.168.0.0/16 dev eth2 to 192.168.1.0/24 dev eth0

Last edited by tapke; 10-01-2009 at 05:03 AM.
 
Old 10-01-2009, 05:39 AM   #2
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
First of all, you need to enable Ip forwarding to have routing in Linux. Read this post to learn how.

Next, if you plan on using routing with DHCP for "outside" connection, you need to use dynamic routing like RIP od OSFP, etc. on both your main gateway and SLES 10 (router), and maybe even on all "private" routers between you and last router/firewall that converts private IP's to public ones, or if you are not able to do so, only thing you can do is to masquerade (SNAT) your laptop (laptop will be registered as it is SLES 10, but no outside connection will access laptop if you do not redirect needed ports).

Also, only static route your SLES 10 needs to have is default route, delete all others, since he will know by default where to find your laptop. So basicaly, your problem is not with SLES or laptop, but with upstream routers know knowing where to find you. You are sending requests without returning address (as far as they are concerned).

Another warning: Using 192.168.1.0/24, the subnet that zillion users use daily is not very wise. If main gateway or some upstream router knows about some other 192.168.1.0/24 subnet, you will have real problem.
 
Old 10-01-2009, 06:17 AM   #3
tapke
LQ Newbie
 
Registered: Jun 2008
Posts: 13

Original Poster
Rep: Reputation: 0
gh

the the main problem was, that I told dhcp server to assing users a /16 mask.

my external network was 192.168.10.1-192.168.255.255
and the internal 192.168.1.0/24

coputer simply didn't try to go trough router, because it thought my pinged IP was in it's subnet and all I could see was ARP's.

fixed the netmask and everything works.

Problem solved. Thank you.
 
  


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
SLES 10 SP2 as a Router Raptor354 Linux - Networking 1 01-10-2009 08:07 PM
setting router in SLES vkmgeek Linux - Networking 4 04-24-2008 05:11 PM
how to load sles in redhat platform using sles image created in nfs server AshishNsearch Red Hat 0 03-28-2008 12:12 AM
I want to connect to XP through my router and i have sles 9 eatranman Linux - Newbie 4 04-28-2006 11:09 AM
how to make sles 9 server to be a router/internet gateway? databox Linux - Networking 3 07-17-2005 09:03 AM

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

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