LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2004, 07:39 AM   #1
inode100
Member
 
Registered: Oct 2003
Location: London - England, UK
Posts: 63

Rep: Reputation: 15
routing issue :- have a simple private LAN, with....


...one PC as a "client", and one PC as a "server".

The "server" has two interfaces wlan0 and eth0.

IP of wlan0 is 192.168.1.10
eth0 is 192.168.2.10

on client have the one interface, eth0, 192.168.2.11

From the server i can see the internet, as wlan0 can see 192.168.1.1 which is the "inside" IP of my ADSL wireless router.

I can ping "server" 192.168.2.10 from "client" 192.168.2.11

I cant ping 192.168.1.1 or reach internet, from client

How can I configure the server / client so that requests from the client can see "through" eth0 on the server to wlan0 on the server and thus get out to the outside world.

I'm thinking that i maybe need to have something forwarding the requests on the server passing the request from eth0 to wlan0 .. but not sure where to start.

any help or pointer to some info to get me started would be most appreciated.

Thanks,

Inode100
 
Old 02-22-2004, 09:48 AM   #2
sjia
Member
 
Registered: Jan 2004
Location: Ont, Canada
Distribution: Fedora Core 1
Posts: 113

Rep: Reputation: 15
Not sure what OS your talking about but you have to configure your client computer to route through a gateway of 192.168.1.1. From what I see, you will also have to configure the client to recognize the DNS values. These value should be stored on your router. Can't help anymore since I do not know what OS your using or router type.

:-)
 
Old 02-22-2004, 10:05 AM   #3
inode100
Member
 
Registered: Oct 2003
Location: London - England, UK
Posts: 63

Original Poster
Rep: Reputation: 15
Sjia,

thx for reply..

I'm using Redhat 9.0.

Is the answer then as simple as adding a "GATEWAY=192.168.1.1" variable to /etc/sysconfig/network ?

(not sure of the exact syntax to put in this file, if this indeed what i should be doing ? )
 
Old 02-22-2004, 10:39 AM   #4
sjia
Member
 
Registered: Jan 2004
Location: Ont, Canada
Distribution: Fedora Core 1
Posts: 113

Rep: Reputation: 15
I do not know very much about linux, so I am not using what you might call the back door yet (ie etc/sysconfig/network). I do know a bit about Windows Networks (without being to boastful).

In Redhat, select start menu, select System Settings, select Network. A Network configuration screen should open.

Under tab DEVISES, select your network card so it is highlighted.
Click the EDIT button above.
- a screen should open that says Ethernet Device

At the bottom you will see Default Gateway Address
Enter 192.168.1.1 and click OK

Next Select DNS Tab

Enter The Host name of your client computer.

Enter the Primary DNS and the Secondary DNS of your internet service provider.

Again, you should be able to obtain DNS values from your Router since you already have a connection to the internet; I'm assumming through Windows.

You have to do the same thing for each client computer whether it is Windows or Linux. Getting to the proper screens is a matter of knowing the OS.

Let me know how you made out.

Last edited by sjia; 02-22-2004 at 11:13 AM.
 
Old 02-23-2004, 04:52 PM   #5
inode100
Member
 
Registered: Oct 2003
Location: London - England, UK
Posts: 63

Original Poster
Rep: Reputation: 15
HEY!!! I made it work.

here are the routing tables :-

hansolo (client, 192.168.2.11) :-

[root@hansolo root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 192.168.2.11 255.255.255.0 UG 0 0 0 eth0
192.168.1.0 192.168.1.11 255.255.255.0 UG 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo

vader (server, 192.168.2.10 and 192.168.1.11) :-

[root@vader root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 192.168.2.10 255.255.255.0 UG 0 0 0 eth0
192.168.1.0 192.168.1.11 255.255.255.0 UG 0 0 0 wlan0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

ibook (balrog, 192.168.1.12) :-

[balrog]:[root] >> route get 192.168.2.11
route to: 192.168.2.11
destination: 192.168.2.0
mask: 255.255.255.0
gateway: 192.168.1.11
interface: en1
flags: <UP,GATEWAY,DONE,STATIC,PRCLONING>
recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire
0 0 0 0 0 0 1500 0

running the cmd :- route add -net 192.168.2.0 192.168.1.11 255.255.255.0 on the ibook (balrog), was the final thing i did that made it work, as soon as i did that the ping on hansolo stopped hanging and started getting a reply.

The reason i didnt do that earlier was coz i could see the ping coming in on 192.168.1.11 (wlan0) on vader. BUT... I now realise that because ibook didnt know about 192.168.2.0 it couldnt send the packet with that network dest, the packet dest must have just had 192.168.1.0 network info, which is why it stopped at wlan0 (192.168.1.11), and vader couldnt forward it to 192.168.2.10 and onto 192.168.2.11 !!

phew.

thanks,

laters inode100
 
  


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
cannot reach internet from private LAN toodr Linux - Networking 12 10-23-2005 08:44 PM
Routing LAN -> WAN -> LAN with unhelpful router synx13 Linux - Networking 2 06-14-2004 03:35 PM
routing issue :- have a simple private LAN, with.... inode100 Linux - Networking 10 02-22-2004 03:06 PM
Possible Routing / DNS Issue with Dial-Up connection on LAN connected PC geesloper Linux - Networking 2 12-06-2003 07:55 PM
simple gnuPG private key question. qwijibow Linux - Security 1 10-11-2003 06:57 PM


All times are GMT -5. The time now is 10:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration