-
Notifications
You must be signed in to change notification settings - Fork 0
Ubuntu OS configuration
This page describes the process to configure Ubuntu 24.04 to interface with the vehicle sensors and run docker containers
In order to configure the network properly, we need to migrate the configuration files/settings that the previous CentOS 7 had to communcate with the sensors.
The sever neeeds two configurations: the network interface and the dhcp server.
CentOS7 ifconfig
output:
enp129s0f0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.27.28.69 netmask 255.255.252.0 broadcast 172.27.31.255
inet6 fe80::ae1f:6bff:fe8a:5218 prefixlen 64 scopeid 0x20<link>
ether ac:1f:6b:8a:52:18 txqueuelen 1000 (Ethernet)
RX packets 3004 bytes 863431 (843.1 KiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 523 bytes 46865 (45.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp129s0f1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.31.0.1 netmask 255.255.0.0 broadcast 172.31.255.255
inet6 fe80::ae1f:6bff:fe8a:5219 prefixlen 64 scopeid 0x20<link>
ether ac:1f:6b:8a:52:19 txqueuelen 1000 (Ethernet)
RX packets 1129 bytes 102963 (100.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2198 bytes 380183 (371.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp129s0f1:1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.2.0.81 netmask 255.255.0.0 broadcast 10.2.255.255
ether ac:1f:6b:8a:52:19 txqueuelen 1000 (Ethernet)
enp129s0f1.101: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.1.0.81 netmask 255.255.0.0 broadcast 10.1.255.255
inet6 fe80::ae1f:6bff:fe8a:5219 prefixlen 64 scopeid 0x20<link>
ether ac:1f:6b:8a:52:19 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 667 bytes 41746 (40.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
We need to recplicate this settings in Ubuntu.
Ubuntu uses Netplan to configure networks based on YAML files
Based on CentOS ifcfg-enp129s0f1
and route-enp129s0f1
configuration files:
# ifcfg-enp129s0f1
DEVICE="enp129s0f1"
TYPE="Ethernet"
ONBOOT="yes"
BOOTPROTO="static"
IPADDR="172.31.0.1"
NETMASK="255.255.0.0"
NM_CONTROLLED="no"
IPV6INIT="no"
ZONE="sensor-lan"
DEFROUTE="no"
ETHTOOL_OPTS="-L ${DEVICE} combined 16; -A ${DEVICE} autoneg off tx off rx off"
# route-enp129s0f1
0.2.0.0/16 dev enp129s0f1
Ubuntu 24.04 by default sets both enp129s0f1
and enp129s0f0
both to be DHCP4 clients by default due to Cloud configuration (???) and automatically defines /etc/netplan/50-cloud-init.yaml
:
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
enp129s0f0:
dhcp4: true
enp129s0f1:
dhcp4: true
version: 2
As per file description, we created a /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
file with the network: {config: disabled}