dnsmasq not starting properly

76 views
Skip to first unread message

Justin Huang

unread,
Aug 4, 2017, 11:22:19 PM8/4/17
to PR2_Users
Hi everyone,

We had a problem with our PR2 recently. I made some changes to dnsmasq and got things working again, but since I'm not an expert on networking, I was wondering if someone could shed some more light on our solution.

First, we noticed that we could not contact c2 from c1 (tried ping and ssh).

Then, we plugged a monitor and keyboard and saw that c2 was not booting. Instead, it was looping through:
Intel Boot Agent
PXE-E51: No DHCP or proxyDHCP offers were received.
PXE-M0F: Exiting Intel Boot Agent.

I also noticed that plugging into the service port did not result in being able to connect to the robot.

However, c1 booted fine. Running /etc/dnsmasq.conf status resulted in a (not running) status.

When I tried to start dnsmasq, I got this error:
sudo /etc/init.d/dnsmasq restart
 * Restarting DNS forwarder and DHCP server dnsmasq                                                                                                                                                                                                                       
dnsmasq: cannot set --bind-interfaces and --bind-dynamic

This was strange because in /etc/dnsmasq.conf, bind-interfaces was commented out while bind-dynamic was enabled:
#bind-interfaces
bind-dynamic

I commented out bind-dynamic anyway and got a new error message:
sudo /etc/init.d/dnsmasq restart
 * Restarting DNS forwarder and DHCP server dnsmasq                                                                                                                                                                                                                       
dnsmasq: failed to create listening socket for 192.168.2.1: Cannot assign requested address

I'm not sure what 192.168.2.1 is supposed to be, so I just commented out the line in /etc/dnsmasq.conf:
listen-address=192.168.2.1

And I got a new error:
sudo /etc/init.d/dnsmasq restart
 * Restarting DNS forwarder and DHCP server dnsmasq                                                                                                                                                                                                                       
dnsmasq: unknown interface wlan0

Looking at ifconfig on c1 and the PR2 Manual's Networking chapter, wlan0, it doesn't appear that c1 has a wlan0 interface. So I commented out these two lines in /etc/dnsmasq.conf:
#interface=wlan0
#dhcp-range=wlan0,192.168.2.2,192.168.2.254,255.255.255.0,12h

After running "sudo /etc/init.d/dnsmasq restart," c2 booted up and connecting to the service port worked.

I also noticed that I could get access to the public internet while plugged into the service port if I changed these lines in /etc/dnsmasq.conf. To my understanding, these lines tell the client what the default route and DNS server should be.
dhcp-option-force=option:router,10.68.0.5
dhcp-option-force=option:dns-server,<our university DNS>

So does this seem like a reasonable set of changes to make? What was the intent behind the original configuration? We have a working system now but I just wanted to get a better picture of how things are supposed to work.

Thanks!
Justin Huang

Reply all
Reply to author
Forward
0 new messages