OpenWrt on RaspberryPi 2 always becomes the default gateway. How to prevent this?

OpenWRT on RaspberryPi 2 always becomes the default gatway when connections are dynamically negotiated. How to prevent this? I need another router to be the default gateway.

I have about 6 routers running OSPF. And when I select DHCP for network connectivity on Windows 10 machines, the default gateway picked is always the OpenWRT RaspberryPi 2 device.

I'm thinking this is because the OpenWRT is the first to reply on the network, however, how do I tell the unit not to become the default gateway for machines on my network?

Thanks,

I’m guessing that you have h to e dhcp server enabled on the pi. Since it shoulda like there is another router in the network that probably also has a dhcp server, you should disable the one on the pi.

Indeed.

root@OWRT01:~# ps | grep -Ei dhcp
  547 root      1240 S    /usr/sbin/odhcpd
 1556 root      1072 S    grep -Ei dhcp
root@OWRT01:~#

Thank you. Rather straight forward. (facepalm)

Don't feel so bad... it's a common thing to miss.

Since it sounds like your problem is solved, please feel free to mark my response as the solution.

Absolutely! Quick win right here. :slight_smile:

Disabled it under interfaces then LAN but even though I saved and applied, the DHCPD server is still up and running. Tried a reboot. No luck.

root@OWRT01:~# ps | grep -Ei dhcp
  549 root      1240 S    /usr/sbin/odhcpd
 1386 root      1072 S    grep -Ei dhcp
root@OWRT01:~#

Hmm. Then I checked again and this time any interface is correctly picking up the right GW. Means it does work despite odhcpd still running. Just up and not doing anything I guess.

the DHCP daemon (odhcpd) can be running but it can ignore the specified network(s). What you've done is likely just disabled it for LAN, which is a perfectly good way to achieve the goal.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.