Disabling DHCP while using static IP
-
I am currently using the voxl-static-ip service to run with a static ip on eth0.
ifconfig
shows only the assigned static ip on eth0, buthostname -I
shows both the static IP and a DHCP ip. I am able to ssh into the VOXL both through the static IP, and the DHCP IP at any time. What would be the best method to disable the DHCP IP so that only the static IP OR the DHCP IP are active at once? Normally I would handle this in the /etc/network/interfaces file, but that does not appear to exist on the VOXLs. -
@I_Dwyer I believe even though the interfaces file doesn't exist you can still create it and linux will utilize it
-
@tom How are IP addressed being handled by default? The system is able to get a DHCP IP automatically on power-up with default settings if connected, but it does not have an /etc/network/interfaces file defined, AND it is also not using netplan (https://askubuntu.com/questions/1031709/ubuntu-18-04-switch-back-to-etc-network-interfaces). How does the system know how to configure eth0?
-
My concern is that, while I could attempt to set up netplan or another method to configure IP's, without understanding what the system is doing already I'm not sure how that will interact or fight with whatever is controlling the configuration now. During a previous attempt to set up the system with configurable ip's without using voxl-static-ip the system ended up in a state where it would not get a DHCP or a static ip, which required reinstalling the system image to get it back to a working state. I would prefer to avoid doing that again.
-
For reference - I switched back to utilizing ifupdown using the instructions in the top answer here to configure eth0 for a dhcp connection - https://askubuntu.com/questions/1031709/ubuntu-18-04-switch-back-to-etc-network-interfaces.
Now
ip a
shows TWO addresses for eth0 - configuring via ifupdown allows me to set one of them, but the 'default' eth0 dhcp connection is still there and it is not clear to me how to configure it. Please advise. -
@I_Dwyer I have been down the rabbit hole here. It seems that qualcomm has not used any of the standard network management tools like Netplan. They use a hybrid of Systemd-Networkd and a wide range of complex scripts to manage all the interfaces. None of the scripts are standard. I am at the point of possibly stripping all of that out, and replacing it with either Ifupdown or Netplan and creating a firmware build that works better for our use case. There are a number of problems with the older Qualcomm network scripts, such as the DHCP management you are encountering. For example I have noticed that if WWAN0 has an IP, then WLAN0 will NOT get an IP from the DHCP server, even thought the wifi is connected to the local AP! To get around that I added an ifconfig statement issuing a static IP to wlan0 every time the drone boots, but this is a hacky solution.
Would like to see ModalAI replace the entire Network Management stack with something better and easier to maintain.