We set one of our VOXL 2's to use a static IP ( sudo ifconfig eth0 X.X.X.X. netmask Y.Y.Y.Y
) and now cannot get it back to being assigned an IP by the DHCP server - it now boots and stays on 169.254.4.X. Our other VOXL 2's are assigned addresses by the DHCP server out of the box; we have installed netplan and attempted to switch between DHCP and a static IP via netplan but are only getting DHCP. How can we fix this so that it will get a DHCP address assigned, and what method should we use to switch between a static IP and DHCP in the future?
Best posts made by I_Dwyer
-
DHCP/Static IP Ethernet Reconfiguration
Latest posts made by I_Dwyer
-
RE: Unable to initiate MAVlink through UART on VOXL2 ttyHS1
@Chad-Sweet I am running into what I think is a similar problem.
I am attempting to connect to the Telem2 port of a Pixhawk autopilot, from the ttyHS1 port on the USB3/UART daughterboard with a VOXL 2. I am currently running on system image 0.9.5. I have voxl-px4 disabled, but voxl-mavlink server is showing no traffic and I see no communications either in Mission Planner (talking to the Pixhawk), or the software I am running on the VOXL. I was able to run with this same configuration ~1 year ago, on voxl2_platform_1.3.1-0.8. Is it possible that something has changed between those system images to prevent communications through ttyHS1 for this setup?
In troubleshooting, I have already iterated through aligning on different baud rates, ensuring the VOXL user is added to the dialout group, and changing the permissions of the ttyHS1 port to allow any user to access it, with no changes. I am currently working on re-installing system image 1.3.1-0.8 on one of my VOXLs, to try to confirm whether the difference in system images is the issue.
Any help would be appreciated!
-
RE: Disabling DHCP while using static IP
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. -
RE: Disabling DHCP while using static IP
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.
-
RE: Disabling DHCP while using static IP
@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?
-
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. -
RE: DHCP/Static IP Ethernet Reconfiguration
Hey Tom - in checking this I noticed that /etc/network/interfaces existed on the problem VOXL and not on the other two, so I deleted it and now I can set a static IP that will reset and be assigned a DHCP IP after reboot. Thanks!
-
RE: DHCP/Static IP Ethernet Reconfiguration
Hi Tom, That's actually not what I'm looking for. I'm trying to understand:
a. What may have been overwritten or changed as a result of that command so that the VOXL is no longer assigned an IP by our DHCP server. Our other two VOXL 2's where we have not run that command are assigned IP's by the DHCP server with no issues.
b. What process or command you would recommend for setting a static IP on the VOXL's in the future that will not interfere with switching back to DHCP regularly. -
DHCP/Static IP Ethernet Reconfiguration
We set one of our VOXL 2's to use a static IP (
sudo ifconfig eth0 X.X.X.X. netmask Y.Y.Y.Y
) and now cannot get it back to being assigned an IP by the DHCP server - it now boots and stays on 169.254.4.X. Our other VOXL 2's are assigned addresses by the DHCP server out of the box; we have installed netplan and attempted to switch between DHCP and a static IP via netplan but are only getting DHCP. How can we fix this so that it will get a DHCP address assigned, and what method should we use to switch between a static IP and DHCP in the future?