1

I have 3 devices on a local network. A router, a smart meter, and a raspberry pi (Raspbian Jessie). The router has an IP address of 192.168.1.1, the smart meter is set to have a static address,

IP Address: 192.168.1.153
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1
Primary DNS Server: 192.168.1.1
Secondary DNS Server: 192.168.1.1

The pi has a reservation in the router for its mac address. The pi is also set to have a static address by editing the /etc/dhcpcd.conf to include,

interface eth0

static ip_address=192.168.1.100/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

Reference

But the smart meter ends up assigning new ip addresses and reassigning the pi's address. Sometimes placing devices on the same ip address. This is problematic when the rpi has the same address as my phone/computer or when the rpi's address is shifted and doesn't appear in the attached devices section of the router's interface.

Picture of Assigned Phone IP by Smart Meter

How is this possible/how is the smart meter doing this? How can I stop it or force the pi's address not to change?

Update: I think the answer here is to block incoming DHCP offers on the raspberry pi from the smart meter using iptables. Restricting this by MAC address. I just haven't found the correct form yet.

jmb2341
  • 113

1 Answers1

0

According to the screenshot of your phone. Your smart meter acts as a DHCP server. If it is not expected, you may disable the DHCP server on it. If you can't, then remove it from the network.

I think the answer here is to block incoming DHCP offers on the raspberry pi from the smart meter using iptables. Restricting this by MAC address. I just haven't found the correct form yet.

This is just a workaround. To resolve this issue, as I have mentioned above, you should disable the DHCP server on the smart meter. Otherwise, you should remove it.

Even though you are able to block the DHCP offer on raspberry pi, but if you add any new device on the same subnet, the smart meter will still be able to affect the DHCP process on the new device.