1

I can't seem to make my DHCP Server (dnsmasq) work, even though there are so many tutorials on the internet. Somehow something doesn't work out for my setup.

What I have: A computer, a laptop, a router. I want following: Computer <-- eth0 --> laptop=DHCP-Server <-- wifi --> router.

Why? If this works, I can connect another device instead of the computer to the laptop's eth0 and analyze its network traffic. But I can easily use the computer to check if this works first.

What did I do until now: Basically everthing I could find :D The laptop is running Linux Mint 17, which uses a NetworkManager, which automatically starts some kind of dnsmasq. I disabled this, by editing /etc/NetworkManager/NetworkManager.conf to look like this:

[main]
plugins=ifupdown,keyfile,ofono
#dns=dnsmasq

no-auto-default=54:42:49:70:E5:8E,

[ifupdown]
managed=false

Using sudo apt-get install dnsmasq I installed dnsmasq and edited the /etc/dnsmasq.conf to look like this:

interface=eth0
dhcp-range=192.168.2.210,192.168.2.230,255.255.255.0,12h
dhcp-option=3,192.168.2.1
log-dhcp

My thoughts here: Router's IP is 192.168.2.1 and it's giving out IPs from 192.168.2.100 to 192.168.2.199. So the laptop can give out IPs from 192.168.2.210 to 192.168.2.230.

When connecting the computer to the laptop's eth0 the computer tries to connect, but fails.

So i checked the laptop's tcpdump and could see lines like that:

22:29:21.141599 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 6c:f0:49:0a:25:61 (oui Unknown), length 300

which shows that the computer is sending out a broadcast DHCP request, right? But I don't see any answer to that request. Same in Wireshark: DHCP requests/discovers from computer, but no answers.

In between I also tried to do some NAT masquerading in iptables and IP forwarding. If necessary I can remove that again.

When assigning a static IP for eth0 on the computer, it connects, but cannot connect to any website (I setup this connection in NetworkManager using IP 192.168.2.75, 255.255.255.0, Gateway: 192.168.2.1 and even DNS Server: 8.8.8.8).

Any help is appreciated! Thx

closed as off-topic by dobey, karel, Jan, bcbc, αғsнιη Nov 20 '14 at 16:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – dobey, karel, Jan, bcbc, αғsнιη
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Are you using a crossover cable to connect the two computers? – dobey Nov 17 '14 at 22:36
  • Hey, no I am using a cat5 ethernet cable. Shouldn't the network adapters automatically cross over when using a standard cable? – Tommi Un Nov 17 '14 at 23:10
  • Why would you assume they would? And why plug the computer and laptop together directly anyway? Why not plug the ethernet into the router, since you've got a router? Are any of these devices actually running Ubuntu, or just Mint? – dobey Nov 18 '14 at 4:16
  • @dobey en.wikipedia.org/wiki/… I need this setup for another task. As soon as this works, I can replace the computer in this setup with a board, whose network traffic I can inspect. And these devices run just Mint. Anyways, it works now. In the end I used the NetworkManager to share the eth0 interface to other computers. – Tommi Un Nov 19 '14 at 17:04
0

In the end the solution was to use the NetworkManager GUI to share the eth0 interface to other computers.

edit: I did everything stated in my initial post, and then the solution was to startup the network manager and to change the ethernet connection to "Shared to other computers". You can do this by doubleclicking the ethernet connection, select tab "IPv4 Settings" and then change the Method. Save. If your NetworkManager does not state any ethernet connection, just click "Add" and add one.

  • Could you provide a short guide as to how you did that? – muru Nov 19 '14 at 18:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.