Error for static IP Toradex COLIBRI IMX7 DUAL 1GB

Hello,

I am trying to configure a static Ethernet address for the board COLIBRI IMX7 using the steps of Ethernet/Network (Linux) (Ethernet/Network (Linux) | Toradex Developer Center), but I need a configuration that will be persistent across reboots. Is it possible?

Thank you in advice.

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

To configure a static Ethernet address on the Colibri iMX7 that persists across reboots, you can use the systemd-networkd service, which is available in the TorizonCore. This method ensures that your network configuration remains consistent through restarts.

Here are the steps to achieve a persistent static IP configuration:

  1. Create a Network Configuration File: Navigate to /etc/systemd/network/ on your Colibri iMX7. You might need to create this directory if it doesn’t exist.

  2. Define the Ethernet Interface Configuration: Create a file named 20-wired.network (or any other name that makes sense to you, but keep the .network extension). Open this file with a text editor and add the following configuration, adjusting the Address, Gateway, and DNS to match your network requirements:

[Match]
Name=eth0

[Network]
Address=192.168.10.2/24
Gateway=192.168.10.1
DNS=192.168.10.1

Replace eth0 with the actual interface name of your Ethernet connection. You can find it by running ip link or ifconfig.

  1. Enable and Start systemd-networkd: For the changes to take effect, enable and start the systemd-networkd service by executing the following commands:
sudo systemctl enable systemd-networkd
sudo systemctl start systemd-networkd
  1. Reboot the Device: After setting up the configuration file and starting the systemd-networkd service, reboot your Colibri iMX7 to apply the changes.
sudo reboot

Upon reboot, your Colibri iMX7 should automatically use the static IP configuration you’ve defined, and this setting will persist across future reboots.

This approach is recommended for managing network configurations on devices running TorizonCore, as it leverages the native systemd-networkd service for network management, providing a robust and persistent setup.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Boot from a TFTP/NFS Server | Toradex Developer Center.

Hello @Sabrina ,

As mentioned by @ToradexAI , the ethernet configuration files available on /etc/systemd/network/ should be enough to make the changes persistent.

If you are developing your image using Yocto, I recommend verifying this topic of the article which describes how to create these configuration files.

Best regards,
Daniel Morais