LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-20-2007, 07:56 PM   #1
Nathan1993
Member
 
Registered: Jan 2005
Location: OH, USA
Distribution: Ubuntu 6.10 on desktop, debian etch on laptop
Posts: 69

Rep: Reputation: 15
Question Need basic router help (Debian Lenny)


Basically, I have a wireless router and a Debian box that triples as a apache server, desktop, and (hopefully) a router. My "dream" config is below.

---> = Wired connection
- - - > = Wireless Connection

DSL_Modem ---> WirelessRouter - - - > Debian Box ---> Laptop with no wireless

The Debian box gets it's internet right now through wlan0, I want to be able to plug in my laptop / extra router to eth0 and be able to connect to the internet through there. It is my understanding I need to make my own subnet for my laptop / router and then do some IP masquerading. However, all the googling I have done led me to a single floppy router. I need this computer as a desktop too, however.

Any help on how to do this? I did extensive googling with no answers that fit me needs.

Thanks for the help (hopefully ;-) )
-- Nathan
 
Old 04-20-2007, 08:36 PM   #2
unixtech
LQ Newbie
 
Registered: Dec 2004
Posts: 18

Rep: Reputation: 0
Hey Nathan

Couple of questions here:

1. Is your dsl modem and wireless router in a separate location from your laptop, Debian box, and extra router?

2. Is your extra router a wireless router?

Options

I am assuming that question number one is true and your internet connection and systems are in different locations. If your extra router is a wireless router you could make your second router a n access point and plug your Debian box and laptop into the router which would provide internet access to both. If your extra router is not a wireless router then you would want to bridge wlan0 to eth0 on your Debian box.

This is how it would work:

DSL MODEM -----> 71.163.58.45|Wireless Router|192.168.0.1---> 192.168.0.2|Wlan0
192.168.1.1|Eth0 (statically assigned)

Your dsl modem gives your wireless router a public IP address on the WAN side. Your router also has a privite IP address within your DHCP range, usually ending in '192.168.xxx.1'. Your Debian box picks up an address from your wireless router, lets say 192.168.0.2 and has a default gateway of 192.168.0.1. Now you can staticly assign an IP address to eth0 such as 192.168.1.1 and then give your extra router an ip address of 192.168.1.2 with a default gateway of 192.168.1.1 and you can setup its dhcp range for 192.168.1.3-254. So your laptop would get an IP address of 192.168.1.3 and a default gateway of 192.168.1.1. You need to bridge wlan0 and eth0 so that they become part of the same network.So basically and example from your laptop would be,

laptop sends request to internet so it first contacts 192.168.1.2 (extra router) which then contacts 192.168.1.1 (eth0) which then decides that it needs to send it onto 192.168.0.2 (wlan0) it then sends it to 192.168.0.1 (wireless router) which then sends it out via the dsl modem.

Here is a link for bridging networks http://linux-net.osdl.org/index.php/Bridge

Hope this helps!
 
Old 04-21-2007, 10:27 AM   #3
Nathan1993
Member
 
Registered: Jan 2005
Location: OH, USA
Distribution: Ubuntu 6.10 on desktop, debian etch on laptop
Posts: 69

Original Poster
Rep: Reputation: 15
Whoa, thanks for the help! My bridge is all set up and I get internet on my desktop (the bridge), but there's one problem. I tried plugging in the laptop to the router which was plugged into the computer, but I couldn't get any response when I ran "dhclient eth0" on the laptop.

I tried it with the laptop plugged into the computer directly and with it plugged into the router which was then plugged into my computer. No dhcp response both times.

Any ideas? The router's "wan" symbol lights up when it's plugged in, so I assume that it has internet, but no dhcp...
 
Old 04-21-2007, 11:24 AM   #4
unixtech
LQ Newbie
 
Registered: Dec 2004
Posts: 18

Rep: Reputation: 0
Nathan

Awesome dude! Yup you guessed it on the issue with eth0. Since we statically assigned it we have to give the router a static IP within the same subnet that we gave eth0. Depending on the type of router you have there should be a management interface that you can log into and set the WAN IP address which would be, lets say from above if eth0 is 192.168.1.1 then you would set your WAN IP to 192.168.1.2, 255.255.255.0, gateway 192.168.1.1. Then there should also be an option to setup DHCP in the router which you can set the dchp range. Save those settings and then plug your laptop into the router and see if you get an address. So basically all you have left to do is give your router a static WAN IP and setup dhcp and you should almost be there.
 
  


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
Last week Debian Testing is still ETCH or lenny already?? doraimom Debian 1 04-09-2007 06:01 AM
hello Im lenny lenny123 Linux - Hardware 2 06-25-2006 08:04 PM
Why does basic UBUNTU act as a Router with DNS All-in-One Linux - Networking 1 03-01-2006 10:43 PM
Basic NIC/Router Config Casket Linux - Networking 6 07-26-2005 05:54 AM
basic firewall on my router foopirata Linux - Security 2 03-10-2005 03:32 AM


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