Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Laptop as DHCP Router
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
tomasm
Tux's lil' helper
Tux's lil' helper


Joined: 15 Dec 2005
Posts: 104

PostPosted: Sat Mar 18, 2006 4:51 pm    Post subject: Laptop as DHCP Router Reply with quote

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
View user's profile Send private message
unclecharlie
Apprentice
Apprentice


Joined: 19 Dec 2005
Posts: 186
Location: Colorado, USA

PostPosted: Sat Mar 18, 2006 5:04 pm    Post subject: it's doable... but there are limitations. Reply with quote

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
View user's profile Send private message
tomasm
Tux's lil' helper
Tux's lil' helper


Joined: 15 Dec 2005
Posts: 104

PostPosted: Sun Mar 19, 2006 1:09 pm    Post subject: Reply with quote

Thanks for the pointers, charlie.

I think I'll read up on networking before I go any further.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum