LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 03-10-2007, 04:59 PM   #1
rogerthehart
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Rep: Reputation: 0
Connect 2 wired networks via wireless


Hello all,

I've been searching and searching and can't get the last piece of this put together....

I hope the diagram tells what takes too many words to say

I have
Wireless ISP ---> Linux box(that I cannot modify) --> Netgear WGT624v2 router (192.168.0.1)

WIRED NETWORK 1 (downstairs connecting 2 WinXP Pro machines)

Linux box (Debian Sarge) connnected to Netgear router via wireless to be DHCP server and router for WIRED NETWORK 2 (upstairs) so I don't have to run cables up through my house

IN WORDS:
I want to connect downstairs network where ISP connection comes in and upstairs network without running cable.

SOLVED SO FAR:
Linux machine working via wireless and assigning IP addresses with DHCP on wired network 2 (I went through 2 wireless cards to get this working right - Don't buy a wireless card with a Realtek 8185 chipset to use in Linux - too many headaches)

PROBLEM:
The connected machines (other than the Linux box) in Network 2 cannot see the Netgear router, nor any machines on Network 1, nor (of course) the Internet.

Not sure exactly where the problem lies - either in the Netgear router or in the Linux router. - but I think in the Linux machine something I don't have right.

I've been reading on bridging and routing, trying to find the answer to this for a week now. It's not impossible, is it? Hope someone can help.

Roger

Last edited by rogerthehart; 03-10-2007 at 05:08 PM.
 
Old 03-10-2007, 05:01 PM   #2
rogerthehart
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Guess my diagram doesn't work -- editing to make it more readable

Last edited by rogerthehart; 03-10-2007 at 05:09 PM.
 
Old 03-10-2007, 05:49 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Do you have IP forwarding enabled on the debian wireless computer. The others in the wired network need to use it's NIC IP address as the default gateway. I had something slightly similar where I used my laptop as a gateway to my wireless router. I used the subnet 192.168.1.0/25 on the wireless side and 192.168.1.128/25 on the wired side. I don't understand why, but it wouldn't work until I modprobed the ip_conntrack module even though I wasn't using NAT.

You're doing something more complicated because you have two computers routing traffic instead of just one.

From your post, it sounds like the debian computer is connected to the internet so the wireless laptop is routing traffic correctly. Things would work out easier if the router was wireless. Then the wireless laptop and the debian wireless host would be two hosts on the wireless network and the debian machine could route the wired network traffic straight to the router.

Last edited by jschiwal; 03-10-2007 at 05:52 PM.
 
Old 03-11-2007, 05:55 PM   #4
rogerthehart
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Original Poster
Rep: Reputation: 0
OK - I have ip forwarding enabled /proc/sys/net/ipv4/ip_forward

still no luck...

is there a way for all traffic going to ath0 (192.168.0.6 - assigned via dhcp) be routed to eth0 (192.168.100.1 - static) and vice versa?

would this be a bridge?
 
Old 03-13-2007, 04:47 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Did you check if the ip_conntrack module is loaded? On your last question, you are describing routing and not a bridge. A bridge fragments a network to reduce traffic or to regulate traffic between segments.

You might want to post the routes on the two machines with wireless. Do you have a route on the debian machine for the wireless network as well as the wireless laptop? Otherwise, traffic destined for it may be destined for the default gateway instead.

Post what the subnets are as well and the outputs of route.
 
Old 03-13-2007, 10:25 AM   #6
SactoBob
Member
 
Registered: Jan 2007
Location: Sacramento
Distribution: Ubuntu 6.10
Posts: 63

Rep: Reputation: 15
Would not a router capable of wireless bridge mode work?
http://www.linuxquestions.org/questi...d.php?t=536898
or check out netgate.com

I am new to this, but I believe that this is what bridges are designed to do.

Bob
 
Old 03-14-2007, 11:43 AM   #7
rogerthehart
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Original Poster
Rep: Reputation: 0
result of route -n:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ath0

/etc/network/interfaces:

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
# iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
# gateway 192.168.0.4

auto ath0
# iface ath0 inet dhcp
iface ath0 inet static
address 192.168.0.4
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
wireless-mode Managed
wireless-ap xx:xx:xx:xx:xx
wireless-essid myessid
wireless-key xxxxxxxxxx
# wireless-freq 2.437
wireless-channel 6

and iptables -L:
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


The wireless laptop really has nothing to do with my problem. It connects only to the Netgear router and has no problems under win2000.
I would think that making the ath0 ip address (192.168.0.4) the gateway for eth0 should work, but when I un-comment that line I get "network is unreachable" and "failed to bring up eth0". I guess that won't work.
 
Old 03-17-2007, 09:33 PM   #8
short101
Member
 
Registered: May 2004
Location: Aust.
Distribution: Debian
Posts: 424

Rep: Reputation: 30
bridging eth0 and ath0 is what you want. See if this helps
http://madwifi.org/wiki/UserDocs/TransparentBridge
 
Old 03-21-2007, 10:51 AM   #9
rogerthehart
LQ Newbie
 
Registered: Jan 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I solved the problem by purchasing a Zyxel P-330W router and using it in Bridge Mode.

http://www.dslreports.com/forum/remark,14578373?r=626
 
  


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
Network manager unable to connect to unsecured wireless - WPA networks fine :S phyre-x Ubuntu 8 05-16-2011 10:11 AM
NetworkManger, OpenSuSE 10.2 and Multiple WIRED Networks statguy Suse/Novell 0 02-28-2007 01:15 PM
Wireless Router to Connect 2+ Wired Networks fadeone Linux - Wireless Networking 1 03-23-2006 03:14 PM
Can't connect if wired & wireless both installed nelamvr6 Linux - Wireless Networking 3 11-17-2005 08:25 PM
Wireless Laptop to Wired ethernet via Linux PC (wired/wireless) sambartle Linux - Wireless Networking 0 01-30-2005 04:37 AM


All times are GMT -5. The time now is 04:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration