Default Routes

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Posts: 1
Joined: Sun Oct 20, 2019 8:30 am

Default Routes

Post by benny532017 »


Not a 100% noob here, but still learning my way around how network settings are controlled in linux generally. I mostly use CentOS/Fedoras but I absolutely love DietPi for Raspberries :)

Here's the behaviour I observe:

When I configure my Ethernet NIC to a static address via the dietpi menu a default route is added sending IP traffic out of that gateway and device, even though the WiFi adapter is enabled and connected. Because I'm wanting to use the WiFi adapter for internet access and then the Ethernet NIC to access the Pi locally from a laptop or whatever, I need the default route to be via the WiFi. No problem, I can just SSH to the Pi, delete the default route that's there and add the one via the WiFi adapter, however, of course, this is not persistent.

My work around is to disable the Ethernet NIC via the dietpi menu, but then re-enable is in /etc/network/interfaces.

My question is, what is changing the routing table in DietPi? What can I do to change this and make it persistent? Also, googling I see that in Debian, "/etc/network/interfaces" seems to be legacy and /etc/dhcpcd.conf is sued instead, however I don't have that on my dietpi so I assume this is not the case for dietpi, is that correct? I installed dhcpcd with apt-get but maybe I should remove it?

I think I just need pointing in the right direction in terms of where to read, happy to read and learn myself, but having difficulty figuring out how the routes are being changed.

Thanks in advance!


Post Reply