By default, Maivin uses DHCP for Ethernet connections, and a hostname to find the unit on the network (verdin-imx8mp-xxxxxxxx) where xxxxxxxx is the serial number of the Verdin module installed. Maivin running Torizon OS uses NetworkManager for managing the network connections.
Note: If the static IP address is set to something that is not accessible on the network, then the unit will no longer be accessible using the hostname, or IP address. This will require the unit to be opened to access the internal serial port to reconfigure the network, or connected to a network that can be accessed.
To set a static IP address:
- SSH into the unit using the host name and torizon as the user.
- Find the connection name of the interface you want to set the static IP address to.
-
nmcli connection show
For example, to set the ethernet port to a static IP address, the connection name is 'network0'
-
- Set the static IP address using:
-
# nmcli con mod '<Connection_name>' ipv4.addresses "<desired IP/mask>"
- For example:
-
# nmcli con mod 'network0' ipv4.addresses "10.10.41.41/16"
-
- Set the gateway
-
nmcli con mod 'network0' ipv4.gateway "10.10.40.1"
-
- Configure DNS
-
nmcli con mod 'network0' ipv4.dns "10.10.40.3"
-
- Finally, set the connection type to manual. This will save the static configuration. Reboot the unit to ensure all changes take effect.
-
# nmcli con mod 'network0' ipv4.method "manual"
-
After running the commands above, you can visualize your entire network configuration by opening the <connection-name>.nmconnection
file:
# cd /etc/NetworkManager/system-connections/
# sudo cat <connection-name>.nmconnection
Expected file output:
[connection]
id=<connection-name>
uuid=a690e7e8-a413-331d-830d-d0df5bad3983
type=ethernet
autoconnect-priority=-999
permissions=
timestamp=1581530428
[ethernet]
mac-address=00:14:2D:63:47:64
mac-address-blacklist=
[ipv4]
address1=<board-ip>,10.0.0.1
dns-search=
method=manual
[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto
After the changes were made, do not forget to reload the configuration file:
# sudo nmcli connection reload
Reboot the unit for the IP address to update.
# sudo reboot
For additional information and commands, refer to the Torizon network and connectivity page.
To return to Dynamic Network Configuration:
Enter the following commands to remove the static IP address and return to DHCP mode. Note the order of commands is important. The examples assume 'network0'. If not using 'network0', replace with the connection name.
- Set the connection type to auto
# nmcli con mod 'network0' ipv4.method "auto"
- Remove the gateway from the list
# nmcli con mod 'network0' ipv4.gateway ""
- Remove the static IP address from the list.
# nmcli con mod 'network0' ipv4.addresses ""
Comments
0 comments
Please sign in to leave a comment.