LinuxQuestions.org
Help answer threads with 0 replies.
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 01-14-2002, 08:38 PM   #1
jrmann1999
Member
 
Registered: Feb 2001
Location: Texas
Distribution: Slackware, Mandrake, LFS
Posts: 306

Rep: Reputation: 30
Routing Issue


Ok I've got another routing issue that I hope can be answered here.

I just got wireless on my laptop, after 2 days of playing I couldn't get it working in linux(yes I've tried every driver, no none of them worked, it's a USB wireless adapter by belkin if anyone knows a trick). So I reverted to having the usb adapter on my win2k box, and my laptop's wireless pcmcia card on it. Here's the situation in that lovely ASCII that you see everywhere

Laptop
(192.168.0.2)
|
|
Win2k
(192.168.0.1) - usb wireless
(10.10.0.3) - ethernet
|
|
Linux
(10.10.0.1) - ethernet


I would like to know if it's possible for the ol laptop to get on the internet with this setup? All I need to know is the routing table entries for win2k(and xp since it's on the laptop). Linux is of course doing NAT, and assumably win2k should be doing it as well(tho I have no idea how to set it up).

I've got the win2k's default gateway as 10.10.0.1 but of course it's not forwarding 192.168.0.1 packets out across the internet :/

I've done:
route add -net 192.168.0.0 netmask 255.255.255.0 gw 10.10.0.3 eth0 (linux)
route add 10.10.0.0 mask 255.255.255.0 192.168.0.1 (xp)

ping 192.168.0.1 from the linux box and
ping 10.10.0.3 from the xp box but
the xp box can't ping #1 anything else on the 10.10.0.x subnet or #2 anything on the internet.
the linux box can't ping anything else on the 192.168.0.x subnet(mainly the 192.168.0.2 machine).

What am I doing wrong?
 
Old 01-15-2002, 10:58 AM   #2
raz
Member
 
Registered: Apr 2001
Location: London
Posts: 408

Rep: Reputation: 31
Cool

ok I can help with the Linux questions, but I don't know the correct syntax for the routing on win2000, that's why I post here and not windowsquestions.org.

Can the laptop 192.168.0.2 talk to the ip address 192.168.0.1 ?
Set the laptops default gateway as the ip address to 10.10.0.1.
Don't need NAT on the windows system as it's just routing to the Linux box with internal ip addresses, but you need to tell the windozes system to route all packets from 192.168.0.0/24 to its other interface on 10.10.0.0/24

Then on the Linux box you need to allow the path back to the windows box.
route add -net 192.168.0.0 netmask 255.255.255.0 gw name_of_the_10.10.0.3_system_in_the_hosts_file eth0

eg:

route add -net 192.168.0.0 netmask 255.255.255.0 gw win_gw eth0

Then you need to make sure all the systems have routing enabled, ie forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward
Then you need to set up a default route for all other traffic to use the other card connected to the router with the real ip address.

Then you need to enable Nat for all packets coming into the internal nic to Nat to external nic.

/raz
 
  


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
Routing Issue marc hall Linux - Networking 4 07-18-2004 10:59 AM
routing issue.. inode100 Linux - Networking 12 02-25-2004 03:52 PM
routing issue RyPingu Linux - Networking 1 08-15-2003 01:39 PM
again: routing issue! mule Linux - Networking 4 08-07-2003 08:43 AM
routing issue tanmaya Linux - Networking 1 10-13-2002 10:36 AM

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

All times are GMT -5. The time now is 01:12 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
Open Source Consulting | Domain Registration