Skip to main content

Ethernet Troubleshooting

This document shows simple ways to troubleshoot Ethernet settings on CE devices. It doesn't matter whether the connection uses DHCP, static IP, or PPPoE. This guide explains the main steps and commands to diagnose and fix common problems.

It includes:

  • How to log in to the CE terminal and view the last settings.
  • Check the current IP address and interface status.
  • View the system log for Ethernet interfaces.
  • Verify the system's network settings using UCI.

By following the steps in this guide, users can diagnose and fix most Ethernet problems themselves.


Troubleshooting Steps

When encountering issues configuring the Ethernet interface, the following steps can help diagnose the problem.

Initial Access

Follow these steps to gain access to the CE device via the Command Line Interface (CLI).

sudo su -

The sudo su - command starts a shell session with superuser privileges, enabling execution of tasks that require elevated permissions, such as networking and system configuration.

Verify the Last Applied Configuration

Use this command to view information about the last successfully applied Ethernet configuration.

cat /tmp/last_config_response.json | jq '.interfacesConfig.ethernet.eth0'

Example Response:

{
"disable": false,
"trafficPolicy": null,
"zoneType": "wan",
"multiWanConfigType": "dhcp",
"isPrimaryMultiWan": false,
"isSecondaryMultiWan": false,
"multiWanFailOverTime": null,
"multiWanRestoreTime": null,
"multiWanPingTarget": null,
"multiWanNotificationEmail": null,
"interfaceName": "eth0",
"configType": "dhcp",
"bridgeGroup": null,
"addresses": [
{
"address": "10.255.254.50",
"netmask": "255.255.255.0",
"gatewayIp": null,
"announce": false
}
],
"description": "WAN Interface eth0",
"isAutoConfigured": 0,
"status": null,
"duplex": null,
"mtu": 0,
"speed": null,
"isHubInterface": null,
"pppoeUser": null,
"pppoePassword": null,
"multiWanConfig": {
"interfaceName": "eth0",
"targetIps": [
"8.8.8.8",
"4.2.2.2"
],
"failureInterval": 5,
"recoveryInterval": 5,
"pingInterval": 5,
"pingTimeout": 2,
"multiWANMetric": 1,
"multiWANWeight": 2,
"enable": false
}
}

Purpose: Check previous Ethernet configurations such as interface mode, IP settings, DHCP/static status, PPPoE credentials, etc.

Tip: Pay attention to the "disable": true/false, "configType": "static"/"dhcp"/"pppoe", and "addresses" fields for each interface.

More information: This command displays the contents of the /tmp/last_config_response.json file, which contains the response to the last successful configuration request. The jq .'interfacesConfig' part filters only the specific section related to interface configuration, making the information easier to read.

Validate the Assigned IP Address and Network Configuration

Use this command to view the status of current network interfaces and the IP addresses assigned to them.

ifconfig eth0

What to look for:

  • DHCP: Automatically assigned IP address. Ensure a valid IP is obtained from the DHCP server.
  • Static IP: Ensure the subnet mask and gateway IP are correct and aligned with the network configuration.
  • PPPoE: If the PPPoE connection is established correctly, an interface named pppX (such as ppp0) will display the Internet address.

More information: The ifconfig command displays detailed information about each network interface, including its IP address, MAC address, subnet mask, and other statistical information.

System Log Inspection

Use this command to check for networking-related events and errors in the system logs.

logread | grep eth0

Purpose: Review logs for DHCP/PPPoE failures, interface errors, or misconfigurations.

More information: System logs provide invaluable information for diagnosing networking problems. Problems obtaining an IP address by a DHCP client, errors establishing a PPPoE connection, or problems at the interface level will appear in the logs.

Verify Network Configuration Details

Check the network configuration using the Unified Configuration Interface (UCI).

uci show netwrok | grep eth0

Example Response

root@Backup_node:~# uci show network
network.loopback=interface
network.loopback.device='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.@globals[0]=globals
network.@globals[0].packet_steering='1'
network.eth0=interface
network.eth0.device='eth0'
network.eth0.default_wan='1'
network.eth0.disabled='0'
network.eth0.proto='static'
network.eth0.ipaddr='172.20.10.8'
network.eth0.netmask='255.255.255.0'
network.eth0.dns='172.20.10.1'
network.eth3=interface
network.eth3.device='eth3'
network.eth3.proto='static'
network.eth3.netmask='255.255.255.0'
network.eth3.disabled='0'
network.eth3.ipaddr='172.30.1.1'
network.@rule[0]=rule
network.@rule[0].priority='901'
network.@rule[0].lookup='main'
network.wlm0=interface
network.wlm0.disabled='1'
network.wlm0.proto='3g'
network.wlm0.pppname='wlm0'
network.wlm0.device='ttyUSB0'
network.wlm0.apn='comgt'
network.wlm0.ipv6='0'
network.wlm0.delegate='0'
network.wlm0.metric='2'
network.wlm0.ip4table='2'
network.f85c71f21c3040bdb4abcd168fa8e900=route
network.f85c71f21c3040bdb4abcd168fa8e900.target='172.30.2.0'
network.f85c71f21c3040bdb4abcd168fa8e900.netmask='255.255.255.0'
network.f85c71f21c3040bdb4abcd168fa8e900.gateway='172.31.0.2'
network.f85c71f21c3040bdb4abcd168fa8e900.table='main'
network.f85c71f21c3040bdb4abcd168fa8e900.proto='static'
network.f85c71f21c3040bdb4abcd168fa8e900.metric='1'
network.f85c71f21c3040bdb4abcd168fa8e900.interface='br25'
network.1777530465de4eafada07376f1239abf=route
network.1777530465de4eafada07376f1239abf.target='172.30.1.0'
network.1777530465de4eafada07376f1239abf.netmask='255.255.255.0'
network.1777530465de4eafada07376f1239abf.gateway='172.31.0.1'
network.1777530465de4eafada07376f1239abf.table='main'
network.1777530465de4eafada07376f1239abf.proto='static'
network.1777530465de4eafada07376f1239abf.metric='1'
network.eth1=interface
network.eth1.proto='static'
network.eth1.device='eth1'
network.eth1.ipaddr='100.100.100.2'
network.eth1.netmask='255.255.255.0'
network.eth1.dns='172.20.10.1'

What to check:

  • Interface names (e.g., eth0, eth1).
  • Protocol types (proto='dhcp', static, pppoe).
  • IP addresses, netmasks, and gateways.

More information: UCI is a common framework for managing configuration files in OpenWrt-based systems. The uci show network command displays the current network configuration in a readable format.


Basic Debugging Steps

Follow these basic steps to quickly diagnose and resolve some common issues.

Check the physical connection

  • Make sure the Ethernet cables are securely connected. Loose or faulty cables can cause connectivity issues.
  • Check for blinking link lights on the Ethernet ports. The absence of a link light indicates that there is no physical connection or that a link has not been established.
cat /tmp/last_keepalive_response.json

Look for "httpCode" errors. HTTP errors may indicate that the device is failing to communicate with the DHCP server.

Reset CE device

sudo su -
firstboot -y
reboot now

Warning: This action erases all settings and restores the system to factory defaults. It should be used only as a last resort or when a complete reset is required.

Detailed debugging by connection type

More detailed debugging steps depending on your connection type.

A. DHCP Debugging

  • Check the Ethernet cable to the modem. Make sure it is securely connected to the correct port on the modem.
  • Monitor last_keepalived_response.json for HTTP errors (see above).
  • Reboot the CE device if necessary. This may force the DHCP client to re-request an IP address.

B. Static IP Debugging

  • IP Conflict: Ping the static IP from another device. If there is a response, it indicates that another device on the network is using the same IP address.
  • Subnet Mask: Ensure compatibility with the local network. An incorrect subnet mask may prevent the device from communicating with other devices on the network.
  • Gateway: Ensure it is a valid router IP. The gateway is the IP address used to communicate with networks outside the local network.
  • Firewall Rules: Check for blocks on required ports or protocols. Sometimes, firewall settings can block network traffic.

C. PPPoE Debugging

  • Credentials: Confirm the username and password provided by the ISP. Incorrect credentials will cause the PPPoE connection to fail.
  • Modem Lights: Make sure the modem is active and stable. The lights on the modem usually indicate the connection status. Check the modem manual to see what the lights mean.
  • VLAN Tagging: Check the ISP documentation for the required VLAN ID. Some ISPs require specific VLAN tagging.
  • View Logs: Monitor the logs for PPPoE-related errors.
logread | grep eth0

D. UCI interface check

Check the UCI configuration for the specific interface.

uci show network.eth0

If the interface name is different, change it. For example, here the interface name is eth0.

Make sure the following are correct:

  • Protocol Type (proto): DHCP, Static, or PPPoE is set correctly.
  • IP Addresses: The correct IP address is assigned for a static IP setup.
  • Gateway and DNS: The correct gateway and DNS servers are configured for a static IP setup.
  • PPPoE Credentials: The username and password are entered correctly.