LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-16-2015, 03:11 PM   #1
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
dhcp-helper (cannot bind DHCP server socket: Address already in use)


I am trying to connect a device that must use a DHCP
network to the ethernet port on my laptop running Ubuntu which connects
to the network through the built in wireless.

I have had no problems doing this before using static IP addresses
but am having a problem doing it with DHCP.

I read the man pages and it seems like dhcp-helper would do what I want.
So I run
Code:
dhcp-helper -b wlan0
and it returns
Code:
dhcp-helper: cannot bind DHcp server socket: Address already in use
Google returns lots of people with the same problem but no workable solution.
 
Old 02-16-2015, 06:04 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,081

Rep: Reputation: Disabled
The -b parameter probably fails because the DHCP client is already bound to UDP port 68 on the wireless interface. netstat -4 -nlu should be able to confirm that, but I'm not sure it really matters, as I suspect dhcp-helper might not be what you're looking for.

dhcp-helper is a DHCP Relay Agent. It forwards DHCP Discover/Request packets from one network to a DHCP server in another IP network. That DHCP server must have a DHCP scope for the IP network for which the Relay Agent is forwarding requests. It's highly unlikely that this is the case with your setup.

It sounds like you simply want the wired device to get an IP address from the DHCP server servicing the wireless network. For that to happen, the wired and wireless networks must actually be parts of the same Ethernet ("layer 2" in network terms) network. Currently, they are entirely separate networks, and cannot both use IP addresses belonging to the same IP network.

You could create a bridge interface with the both wireless and the wired interface as members. That way, your laptop would act as a switch with one wired and one wireless interface.
 
Old 02-16-2015, 06:57 PM   #3
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Original Poster
Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by Ser Olmy View Post
The -b parameter probably fails because the DHCP client is already bound to UDP port 68 on the wireless interface. netstat -4 -nlu should be able to confirm that, but I'm not sure it really matters, as I suspect dhcp-helper might not be what you're looking for.

dhcp-helper is a DHCP Relay Agent. It forwards DHCP Discover/Request packets from one network to a DHCP server in another IP network. That DHCP server must have a DHCP scope for the IP network for which the Relay Agent is forwarding requests. It's highly unlikely that this is the case with your setup.
netstat does indeed show a server on port 68
Quote:
It sounds like you simply want the wired device to get an IP address from the DHCP server servicing the wireless network. For that to happen, the wired and wireless networks must actually be parts of the same Ethernet ("layer 2" in network terms) network. Currently, they are entirely separate networks, and cannot both use IP addresses belonging to the same IP network.

You could create a bridge interface with the both wireless and the wired interface as members. That way, your laptop would act as a switch with one wired and one wireless interface.
How do I do that? Sorry but networking really just isn't my "thing"
 
  


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
dnsmasq: failed to bind DHCP server socket: Address already in use taske Linux - Networking 2 11-08-2009 05:40 PM
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 12:54 AM
Single DHCP server ,to provide the ip address to a MAC address in two different subne alix123 Linux - Software 5 05-08-2007 11:16 PM
How To know if a host configured with DHCP has obtained IP address from DHCP server? Prassanta SUSE / openSUSE 1 06-29-2006 09:48 AM
eth0 ip assigned by dhcp , how would i know the ip address of the dhcp server where.. kublador Linux - Networking 14 05-16-2006 06:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:16 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration