Configuring Ethernet Connectivity
Overview
This guide explains how to configure and verify a wired Ethernet connection on a device running Clea OS.
Ethernet interfaces are typically recognized automatically by the system, but in some situations, manual configuration may be required.
The following steps describe how to identify the interface, configure IP settings, and confirm network connectivity using standard Linux commands.
Requirements
Before configuring Ethernet, verify the following:
- The device is equipped with an Ethernet port or interface (for example,
eth0). - The Ethernet cable is connected to a valid network switch or router.
- The corresponding driver is loaded and visible through
ip link show.
All commands in this guide are executed on the target device, indicated by the # prompt.
Do not copy and paste the # to execute commmands.
1. Identify the Ethernet Interface
List the available network interfaces using:
# ip link show
You should see an entry similar to the following:
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 00:11:22:33:44:55 brd ff:ff:ff:ff:ff:ff
The interface name (eth0, enp1s0, etc.) may vary depending on the hardware and kernel version.
Use this name in the following commands.
2. Enable the Interface
If the interface is listed as DOWN, enable it with:
# ip link set eth0 up
You can verify the interface state again:
# ip link show eth0
The interface should now show state UP.
3. Obtain an IP Address Automatically (DHCP)
To request an IP address from a DHCP server, use the udhcpc command:
# udhcpc -i eth0
If successful, the terminal output should include messages indicating the lease of an IP address.
You can confirm by checking the interface configuration:
# ip addr show eth0
4. Assign a Static IP Address (Optional)
If you need to configure a static IP address instead of using DHCP, run:
# ip addr add 192.168.1.100/24 dev eth0
# ip link set eth0 up
Replace 192.168.1.100/24 with the desired IP address and subnet mask.
You may also set a default gateway:
# ip route add default via 192.168.1.1
To make sure the routing configuration is active, check with:
# ip route show
5. Verify Network Connectivity
Test basic connectivity within the local network:
# ping -c 4 192.168.1.1
If the gateway responds, test external connectivity (if Internet access is available):
# ping -c 4 8.8.8.8
Finally, check DNS resolution by pinging a domain name:
# ping -c 4 www.google.com
If all tests are successful, the Ethernet connection is configured and functional.
Troubleshooting
If the Ethernet connection does not work as expected, perform the following checks.
Check Interface Status
Confirm that the Ethernet link is detected:
# ethtool eth0
Look for the line:
Link detected: yes
If the link is no, ensure that the Ethernet cable and network port are functioning correctly.
Check Driver and Module
Verify that the appropriate driver is loaded:
# dmesg | grep eth
If the driver is missing or not recognized, refer to the Clea OS hardware compatibility list or kernel configuration documentation.
Restart the Network Stack
You can reset the interface by bringing it down and up again:
# ip link set eth0 down
# ip link set eth0 up
Then request a new IP address:
# udhcpc -i eth0
Tips for Persistent Configuration
To make the Ethernet configuration persistent across reboots:
- For DHCP: Create a simple startup script that runs
udhcpc -i eth0automatically. - For static IP: Add your configuration to
/etc/network/interfacesor a dedicated systemd network unit (for example,/etc/systemd/network/eth0.network). - Confirm that no other network manager is controlling the same interface.
Example of a simple static configuration in /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
Summary
You have configured Ethernet connectivity on a Clea OS device using standard Linux networking tools.
The basic workflow includes identifying the interface, enabling it, assigning an IP address, and verifying connectivity.
You can use DHCP for automatic addressing or configure a static IP for fixed network environments.
By following these steps, your Clea OS device can maintain stable Ethernet communication, suitable for both development and production deployments.