Instruction to set a Static IP for wlan0 voxl2
-
Guide to Configure a Static IP Address with systemd-networkd
I didn't find any guide on how to do it with the voxl2, even thestatic-ipservice seem reserved foreth0configuration, tell me, if i'm wrong i'll delete this.If you want to assign a static IP address to your wireless network interface (using
systemd-networkd), follow this simple guide. In this example, we configure thewlan0interface to use the static IP address192.168.XX.XX.
1. Check the Status of systemd-networkd
Before starting, ensure that
systemd-networkdis enabled and running:sudo systemctl status systemd-networkdIf the service is not active, enable it:
sudo systemctl enable systemd-networkd sudo systemctl start systemd-networkd
2. Create the Configuration File for wlan0
-
Navigate to the configuration directory:
cd /etc/systemd/network/ -
Create a configuration file for your wireless interface (e.g.,
10-wlan0.network)sudo nano 10-wlan0.network -
Add the following lines to the file:
[Match] Name=wlan0 [Network] Address="192.168.XX.XX"/24 Gateway="192.168.XX.1" DNS=8.8.8.8 1.1.1.1Explanation:
Name=wlan0: Specifies the target interface.Address=192.168.XX.XX/24: Defines the IP address and subnet mask.Gateway=192.168.XX.1: Sets the default gateway.DNS=8.8.8.8 1.1.1.1: Configures the DNS servers.
-
Save and close the file.
3. Restart systemd-networkd
Apply the new configuration by restarting the service:
sudo systemctl restart systemd-networkd
4. Verify the Configuration
To verify that the IP address has been assigned to
wlan0:ip addr show wlan0You should see the IP address
192.168.XX.XXassigned to the interface.
5. Enable the Service at Boot
Ensure that
systemd-networkdis enabled to run at every boot:sudo systemctl enable systemd-networkd
6. Reboot the System
To confirm everything works correctly on startup:
sudo reboot
You have now successfully configured a static IP address for the
wlan0interface usingsystemd-networkdon your voxl2! -
-
Another way to do it, maybe more in line with the way modal ai intended it is this :
Update dhcpcd.conf for Static IP
Open the dhcpcd.conf file for editing:nano /etc/dhcpcd.confAdd the following lines at the end of the file to configure a static IP for wlan0:
interface wlan0 static ip_address=192.168.XX.XX/24 static routers=192.168.XX.1 static domain_name_servers=8.8.8.8 1.1.1.1Explanation:
interface wlan0: Specifies the network interface to configure.
static ip_address=192.168.XX.XX/24: Assigns the static IP and subnet mask.
static routers=192.168.XX.1: Sets the gateway address.
static domain_name_servers=8.8.8.8 1.1.1.1: Configures DNS servers (Google and Cloudflare in this case).
Save and exit the file.Restart dhcpcd Service
Apply the changes by restarting the dhcpcd service:systemctl enable dhcpcd systemctl restart dhcpcd -
Another way to do it, maybe more in line with the way modal ai intended it is this :
Update dhcpcd.conf for Static IP
Open the dhcpcd.conf file for editing:nano /etc/dhcpcd.confAdd the following lines at the end of the file to configure a static IP for wlan0:
interface wlan0 static ip_address=192.168.XX.XX/24 static routers=192.168.XX.1 static domain_name_servers=8.8.8.8 1.1.1.1Explanation:
interface wlan0: Specifies the network interface to configure.
static ip_address=192.168.XX.XX/24: Assigns the static IP and subnet mask.
static routers=192.168.XX.1: Sets the gateway address.
static domain_name_servers=8.8.8.8 1.1.1.1: Configures DNS servers (Google and Cloudflare in this case).
Save and exit the file.Restart dhcpcd Service
Apply the changes by restarting the dhcpcd service:systemctl enable dhcpcd systemctl restart dhcpcd -
J jmltt referenced this topic on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login