Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DHCP server in Windows not recognised by Linux
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
w0kKiD
n00b
n00b


Joined: 17 Oct 2005
Posts: 59
Location: Netherlands

PostPosted: Tue Jul 24, 2007 11:12 pm    Post subject: DHCP server in Windows not recognised by Linux Reply with quote

The situation is as follows:
I had a bright idea to buy a USB wifi adapter so that when I find myself with my laptop at someone's internet-connected computer, but with no wireless router, I could plug the USB adapter into the internet computer and set up a nice ad-hoc connection between the two so my laptop could have internet as well.

I am currently at a friends apartment where I will be for nearly 2 weeks or so and he has a wifi-lacking laptop connected directly to a cable modem and the internet through an Ethernet cable. I installed the USB wifi adapter on his Windows laptop, then successfully created an ad-hoc link, complete with working WEP.

I then set up Internet Connection Sharing on the LAN connection (that's the one connected to the modem) and that immediately installed a DHCP server on the wireless connection, setting its IP manually to 192.168.0.1 the way Windows does. I put the WEP key into the /etc/conf.d/net file and nothing else because I figured dhcp should do the rest, the way it has before for me at public hot spots.

I start /etc/init.d/net.ra0 (ra0 is my wireless interface), it connects beautifully and the Windows machine notifies me a connection has been made as well then dhcpcd starts running - and boom, timeout error, net.ra0 stops, failure. When I set the IP addresses manually in /etc/conf.d/net the way I believe Windows should assign them, net.ra0 connects and stays connected, but there's no working connection in that I can't even ping the windows laptop's IP.

I've tried everything I can thinks of, which isn't really much: I disabled the Windows Firewall on the wireless connection so it wouldn't block the DHCP server, I checked that the DHCP service is selected to run in Windows, and it is. Yet still no connection. Unfortunately, I don't have another Windows laptop to try and connect windows to windows, but I'm sure its my laptop and dhcpcd at fault.

Thanks in advance for any help, and I'm sorry that the post became so long, but I just wanted to get all the info in.
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Wed Jul 25, 2007 6:14 am    Post subject: Reply with quote

I don't know how to achieve this in windows, but you could probably do a bridge between the ethernet interface and the USB keys WIFI interface on your friend laptop, then for the router it will be as if your two computers were connected to it (via a hub)


/me doesn't know how to do it your way
_________________
The End of the Internet!
Back to top
View user's profile Send private message
w0kKiD
n00b
n00b


Joined: 17 Oct 2005
Posts: 59
Location: Netherlands

PostPosted: Wed Jul 25, 2007 3:57 pm    Post subject: Reply with quote

Unfortunately, the network bridge didn't work out. The Internet stopped working on his laptop, and it didn't work on mine either. The fact is that there isn't really a router, but just this modem which behaves rather oddly, assigning my friends laptop the external IP: 66.something, can't remember now. That means that in effect, I'm turning his laptop into the router, that routes what I might call the 'raw' internet connection found on the LAN Ethernet port to the wireless interface. I hope some more ideas crop up :) !
Back to top
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Wed Jul 25, 2007 5:50 pm    Post subject: Reply with quote

oh, if the modem is not a router, then you can't really do it my with the bridge.

Your idea was the good one, although I'm not sure the ad-hoc connection was right type of connection to achieve what you want, Try to look if you can turn the laptop into an access point, I know it's possible to do similar things with osx, so there must be a way to do that with windows. Once you've set it up as an acces point, you should also have DHCPd running, and it should work!

Anyway, keep us informed ;)
_________________
The End of the Internet!
Back to top
View user's profile Send private message
w0kKiD
n00b
n00b


Joined: 17 Oct 2005
Posts: 59
Location: Netherlands

PostPosted: Wed Jul 25, 2007 9:30 pm    Post subject: Reply with quote

According to this site:
http://www.microsoft.com/windowsxp/using/networking/expert/bowman_02april08.mspx
An ad-hoc connection should work fine. I researched how to turn a windows xp computer into an access point, but it seems to be impossible. You're right about it being possible on a mac though, I found that site along the way :P
The dhcp server is supposed to be run in the background by windows when you enable internet connection sharing, I read that somewhere when researching this but I can't remember exactly where now. It's true though because I saw the DHCP service enabled in some advanced settings dialog on the wireless connection, I think it was for the firewall.
I'll keep on trying stuff!

EDIT: Having tried to make the windows box into an access point, I had to recreate the old adhoc connection which now isn't functioning.... Wifi's a fickle beast, what can I say. I'll keep working!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23088

PostPosted: Thu Jul 26, 2007 2:44 am    Post subject: Reply with quote

Could you post the exact error message from dhcpcd, ideally with debugging output turned on? Also, post the output of ip route; ip addr; ip link on the Linux laptop, and specify what version of dhcpcd you are using.
Back to top
View user's profile Send private message
w0kKiD
n00b
n00b


Joined: 17 Oct 2005
Posts: 59
Location: Netherlands

PostPosted: Sun Jul 29, 2007 1:19 am    Post subject: Reply with quote

Will do as soon as I get back to my friend's apartment, I'm currently on a weekend trip away and writing this in an Internet cafe. I remember that the error was a timeout error, after about 30 seconds I think. I'm not entirely sure how to turn debugging on, don't even think that that USE flag was on, so I'd appreciate a bit of help with that. The dhcpcd version is 3.0.16-r1. I'll get back with the rest in a day or two when I get back.

EDIT: I also just realised I don't have the ip command, and I'm not sure which package I'm supposed to emerge. Please excuse my ignorance.
Back to top
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Sun Jul 29, 2007 2:06 am    Post subject: Reply with quote

I don't think you can do that to a window computer. That internet sharing shit is a bogus deal. Can you fileshare?
Back to top
View user's profile Send private message
augury
l33t
l33t


Joined: 22 May 2004
Posts: 722
Location: philadelphia

PostPosted: Sun Jul 29, 2007 2:10 am    Post subject: Reply with quote

It's like $40 for a wifi-router. If the window is routing then the easy way to find the problem is to see if the wifi works at all on the linux. I've had wifi cards that would bug out in the driver after about 1mb transfer.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23088

PostPosted: Sun Jul 29, 2007 4:01 am    Post subject: Reply with quote

/sbin/ip is part of sys-apps/iproute2. If you cannot emerge it, you can print roughly the same information by running route -n; ifconfig -a. Both of those commands are part of sys-apps/net-tools, which is most likely already on your system.
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