LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   routing issue :- have a simple private LAN, with.... (https://www.linuxquestions.org/questions/linux-newbie-8/routing-issue-have-a-simple-private-lan-with-149089/)

inode100 02-22-2004 06:39 AM

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

sjia 02-22-2004 08:48 AM

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.

:-)

inode100 02-22-2004 09:05 AM

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 ? )

sjia 02-22-2004 09:39 AM

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. :)

inode100 02-23-2004 03:52 PM

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


All times are GMT -5. The time now is 05:56 AM.