LinuxQuestions.org
Help answer threads with 0 replies.
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 07-18-2013, 07:02 PM   #1
Scrag
Member
 
Registered: Mar 2004
Location: Wisconsin
Distribution: Kali Linux
Posts: 131

Rep: Reputation: 15
Cant get DHCP server running


Im using my backtrack laptop and setting up hostapd. I have 2 wireless cards. wlan0 is the one people will connect to, and wlan1 is connected to the internet. It logs onto another access point, gets a dnhcp address, internet works..

My problem is, everything works but I cannot get a DHCP server to work. Ive tried dhcp3-server and dnsmasq. Ive done lots of research, and configured the config files. When I start either one of them, they appear to work. No errors, process is running in background. Life seems good. Except when someone connects to the laptop-ap they dont get a DHCP address.

The only thing I can think of is my internet router (netgear) is running dhcp and there is a conflict? I would think not as its on a different network than the wlan0's dhcp server, as the wlan1 is a dhcp client. But what do I know.

Ive posted my dnsmasq config file just in case.

Code:
# disables dnsmasq reading any other files like /etc/resolv.conf for nameservers
no-resolv
# Interface to bind to
interface=wlan0
# Specify starting_range,end_range,lease_time
dhcp-range=10.0.0.3,10.0.0.20,12h
# dns addresses to send to the clients
server=8.8.8.8
server=8.8.4.4
I setup my hostapd jsut like the lik below has for instructions just cant get DHCP to work.

http://nims11.wordpress.com/2013/05/...oint-in-linux/

Thank You!
Scrag
 
Old 07-21-2013, 02:39 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by Scrag View Post
My problem is, everything works but I cannot get a DHCP server to work.
how did you verify that exactly? By asking ifconfig after a client logon? Or by just trying to open a URL in a browser?

Quote:
Originally Posted by Scrag View Post
The only thing I can think of is my internet router (netgear) is running dhcp and there is a conflict? I would think not as its on a different network than the wlan0's dhcp server, as the wlan1 is a dhcp client. But what do I know.
I think the same: They're running in different networks - not only different logical networks, but even physical. Except maybe your clients try to connect to the main AP directly (the one that's hooked up to the internet). Can you rule that out for certain?

Code:
# disables dnsmasq reading any other files like /etc/resolv.conf for nameservers
no-resolv
# Interface to bind to
interface=wlan0
# Specify starting_range,end_range,lease_time
dhcp-range=10.0.0.3,10.0.0.20,12h
# dns addresses to send to the clients
server=8.8.8.8
server=8.8.4.4
Looks a lot shorter and simpler than mine, but then I didn't bother to remove all these hundreds of comment lines from the default config file, and in my setup, dnsmasq also doubles as a local DNS.
Anyway, the two "server=" lines are not what you might think. They only tell dnsmasq what name server(s) to use for its own internal purposes, but that's not the name server address(es) being passed to the clients during DHCP. There's another directive that specifies these. At least, that's how I understood it, and it works in my setup:

Code:
dhcp-option=6, 8.8.8.8, 8.8.4.4
And why don't you let dnsmasq act as a relaying DNS? That may save you a few DNS lookups on the internet, as dnsmasq caches them, and you have the chance of resolving local hostnames via DNS. In that case, dnsmasq would announce its own address as the name server to be used.
Besides, I have lots of hostnames resolved statically - many of those obnoxious ad servers are being resolved to 127.0.0.1, effectively making them unreachable and saving me from the better part of ads.

[X] Doc CPU
 
  


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
Running DHCP Server on XenServer vs Dedicated Box graison Linux - Virtualization and Cloud 3 11-18-2015 10:03 PM
why is server booting from network and running DHCP client? rcmonroig Linux - Networking 1 02-16-2009 12:38 AM
dhcp server status if "not running' gary_no_1 Linux - Networking 1 09-01-2007 09:50 PM
cannot get IP from DHCP server running on DSL-584T during ArchLinux install lajner Linux - Networking 19 08-27-2007 12:59 PM
DHCP server won't stay running rrwhite Linux - Networking 2 08-14-2004 09:31 PM

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

All times are GMT -5. The time now is 03:16 AM.

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