Why does my raspberry pi break my router's DHCP?

3

I recently moved. I have a fairly standard setup at my new place:

  • A modem, connected to cable
  • TPLINK TL-WR940N router, connected to the modem on the WAN port
  • A raspberry pi, connected to the router on its 1st LAN port
  • A bunch of other devices connect to the router through Wifi

The router works fine with its default settings as long as the raspberry pi is disconnected. Plugging in the Raspberry Pi, however, seems to confuse my router: the raspi gets an IP, but every device that tries to connect on Wifi after that is rejected (Android says "IP configuration failure"), and the logs of the router fill with messages saying "no ip addresses to give, OFFER abandoned". Setting a static IP on my Wifi devices does allow me to connect them, despite the raspberry pi.

What programs or services on the raspi could possibly be confusing my router's DHCP? Which logs should I inspect? The raspi was offline for a few months due to the move, and used to connect through wifi to my router, so I can't say whether the bug appeared due to e.g. and update (IIRC, raspbian recently moved to DHCPCD).

The raspi is running a web server (nginx), an SSH server (openSSH), and a VPN server (OpenVPN), and I have confirmed that it's not running a DHCP server (apt remove isc-dhcp-server, nor dnsmasq).

The router has a dynamic IP on its WAN port. I've confirmed that a factory reset or the router doesn't fix the problem. Unplugging the raspberry pi immediately allows other devices to connect.

cfp

Posted 2017-10-22T00:07:24.270

Reputation: 31

Answers

2

Are you sure the pi is not running a DHCP server?

Try running tcpdump -i eth0 -n port 67 and port 68 on the pi when you connect a device, and check whether the pi sends anything in response to the broadcast request.

Funky Penguin

Posted 2017-10-22T00:07:24.270

Reputation: 21

Every single symptom shouts DHCP server... I agree this is the most likely culprit. – BloodPhilia – 2019-04-13T21:45:14.983

0

There are typically a range of IP addresses assigned to DHCP on your router. These are typically specified as a start IP address followed by either an End IP Address or a Number of valid IP addresses. It's unlikely, but maybe there is only one valid IP address.

Other things to try:

  • Connect the Raspberry-Pi and then a Wi-Fi device with a Static IP address
  • Connect a different Wired device like a Laptop and see if you have the same symptoms

Edit Thank's @Scott for pointing out my oversight. I still think it may be due to DHCP server configuration, but also like the above suggestion of the Raspberry PI running a DHCP server.

tkr65536

Posted 2017-10-22T00:07:24.270

Reputation: 1

… but the question says that the OP has "a bunch of other devices connected to the router through Wi-Fi". – Scott – 2019-04-13T06:28:40.887