Using eth0/wired on Ubuntu 18.04 terminal of VIM3 Pro board

I checked how to set-up the WiFi connection for Linux/Ubuntu OS on VIM3 Pro board.

How can I set-up the wired connection (e.g., eth0) on the terminal (w/o GUI)?
I mean that I always want to run a specific static IP address (e.g., 192.168.219.25) by default while
booting Ubuntu 18.94 OS on VIM3 Pro board.

eht0 information on Xfce Terminal

khadas@Khadas:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.113.224.114 netmask 255.255.255.0 broadcast 10.113.224.255
inet6 fe80::ed3d:7479:3e5e:5f17 prefixlen 64 scopeid 0x20
ether c8:63:14:70:48:98 txqueuelen 1000 (Ethernet)
RX packets 118806 bytes 14772111 (14.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 897 bytes 232159 (232.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 14

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 23 bytes 2418 (2.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 23 bytes 2418 (2.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 18:93:7f:68:09:98 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

khadas@Khadas:~$ uname -a
Linux Khadas 4.9.190 #51 SMP PREEMPT Fri Aug 30 11:44:18 CST 2019 aarch64 aarch64 aarch64 GNU/Linux
khadas@Khadas:~$ cat /etc/os-release
NAME=“Ubuntu”
VERSION=“18.04.3 LTS (Bionic Beaver)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 18.04.3 LTS”
VERSION_ID=“18.04”
HOME_URL=“https://www.ubuntu.com/”
SUPPORT_URL=“https://help.ubuntu.com/”
BUG_REPORT_URL=“https://bugs.launchpad.net/ubuntu/”
PRIVACY_POLICY_URL=“https://www.ubuntu.com/legal/terms-and-policies/privacy-policy”
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
khadas@Khadas:~$

In case of GUI, I always disable network service permanently by pressing (*) Enable Networking menu at the right-top task bar.

However, I do not know how to disable the network service (eth0) permanently on the terminal(console).

Welcome to any hints.

You mean the Network Manager? If so, you can try this:

$ sudo systemctl stop network-manager
$ sudo systemctl disable network-manager

@numbqq,

However, result is same even though I try to do the contents that you replied.
Here is log messages.

khadas@Khadas:~$
khadas@Khadas:~$ sudo systemctl stop network-manager
khadas@Khadas:~$ sudo systemctl disable network-manager
Synchronizing state of network-manager.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable network-manager
khadas@Khadas:~$
khadas@Khadas:~$

After rebooting the VIM3 Pro board + Ubuntu 18.04

khadas@Khadas:~$
khadas@Khadas:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.113.224.114 netmask 255.255.255.0 broadcast 10.113.224.255
inet6 fe80::ca63:14ff:fe70:4898 prefixlen 64 scopeid 0x20
ether c8:63:14:70:48:98 txqueuelen 1000 (Ethernet)
RX packets 411 bytes 47354 (47.3 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 27 bytes 4365 (4.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 14

Case study

sudo systemctl stop NetworkManager.service
sudo systemctl disable NetworkManager.service

sudo systemctl stop NetworkManager-wait-online.service
sudo systemctl disable NetworkManager-wait-online.service

sudo systemctl stop NetworkManager-dispatcher.service
sudo systemctl disable NetworkManager-dispatcher.service

sudo systemctl stop networkd-dispatcher.service
sudo systemctl disable networkd-dispatcher.service

sudo systemctl stop network-manager.service
sudo systemctl disable network-manager.service

sudo systemctl stop systemd-networkd.service
sudo systemctl disable systemd-networkd.service

sudo systemctl stop sys-subsystem-net-devices-eth0.device
sudo systemctl disable sys-subsystem-net-devices-eth0.device

ifconfig eth0 down
ifconfig eth0 192.168.1.100 netmask 255.255.255.0 up
route add default gw 192.168.1.1
echo “nameserver 8.8.8.8” >> /etc/resolv.conf

However, I had to run this statements above whenever I turn on VIM3 pro board.

If you want to set static IP address, you don’t need to disable network-namager, you just need to modify /etc/network/interfaces.

Here is the modifications:

khadas@Khadas:~$ diff -Nuar /etc/network/interfaces.orig /etc/network/interfaces
--- /etc/network/interfaces.orig	2019-12-13 13:24:12.274734257 +0000
+++ /etc/network/interfaces	2019-12-13 13:28:52.063716278 +0000
@@ -3,11 +3,12 @@
 # Wired adapter #1
 allow-hotplug eth0
 no-auto-down eth0
-iface eth0 inet dhcp
-#address 192.168.0.100
-#netmask 255.255.255.0
-#gateway 192.168.0.1
-#dns-nameservers 8.8.8.8 8.8.4.4
+#iface eth0 inet dhcp
+iface eth0 inet static
+address 192.168.1.100
+netmask 255.255.255.0
+gateway 192.168.1.1
+dns-nameservers 8.8.8.8 8.8.4.4
 #	hwaddress ether # if you want to set MAC manually
 #	pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838

Verified on VIM2, I think it should be the same to VIM3.

2 Likes

Thanks. It’s okay. When I modify IP address setting in the /etc/network/interfaces file, The static IP address has normally established whenever the device turned on.