View previous topic :: View next topic |
Author |
Message |
tomasm Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/89318265145681bd2c85f0.jpg)
Joined: 15 Dec 2005 Posts: 104
|
Posted: Sat Mar 18, 2006 4:51 pm Post subject: Laptop as DHCP Router |
|
|
I have a network set up as follows:
[ Router ] ) ) ) ) Wireless Connection ) ) ) ) [ Laptop ]
|
|_______ [ Wired Device ]
|_______ [ Wired Device ]
|_______ [ Wired Device ]
The laptop has an ethernet card, and i would like it to be set up so that it acts as a DHCP server to anything connected to the ethernet port, so that whatever is connected can access the internet by simply connecting to the laptop.
[ Laptop ] ( ( ( (
|
|_____ [ Wired Device ]
Is this possible, and how do I go about it?
Thanks in advance. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
unclecharlie Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/19635921543b4a5c6991dd.gif)
Joined: 19 Dec 2005 Posts: 186 Location: Colorado, USA
|
Posted: Sat Mar 18, 2006 5:04 pm Post subject: it's doable... but there are limitations. |
|
|
tomasm,
It's doable to set up the laptop with a DHCP server and make it a gateway. There are a couple of things that you'd need to do.
1. emerge/set up iptables.
2. Make sure your kernel is configured with netfilter options enabled. If it's not, reconfigure and reinstall.
3. emerge and set up dhcp to serve dhcp on your wired interface only. (If the dhcp server runs on the wireless interface, then you won't be able to use the dhcp client on that interface as only one dhcp server can run on a subnet...)
4. enable packet forwarding.
The main limitation is that if you configure the above, you will not be able to use the wired adapter to get online in a pinch. (you'd have to shut down the dhcp server on the wired interface and alter your /etc/conf.d/net to allow the wired interface to be a dhcp client.)
hope this helps,
Charlie
p.s.- if you decide to do this there are how-to's out there for all of it. You're basically just setting up a resdential gateway with a dhcp server. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
tomasm Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/89318265145681bd2c85f0.jpg)
Joined: 15 Dec 2005 Posts: 104
|
Posted: Sun Mar 19, 2006 1:09 pm Post subject: |
|
|
Thanks for the pointers, charlie.
I think I'll read up on networking before I go any further. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|