No network connection after fresh install

Just installed a fresh copy of leap on a newly built pc, opensuse detects a card, eth0, but can not obtain an IP address from the DHCP server on my router. The connection is hardwired ethernet, the “card” is onboard ethernet. Haven’t touched the settings much except to enter a hostname and to try putting my routers IP as the IPv4 gateway and to turn off IPv6. Any help would be much appreciated, I can’t seem to get this to work.

Welcome to openSUSE Forums. There are two mechanisms for managing a network connection with openSUSE. They are wicked and NetworkManager, configured via YaST > System > Network Settings. I’m using you’re using the former. With wicked, you need to edit the pertinent NIC as described in the openSUSE networking guide.

The key configuration file is /etc/sysconfig/network/ifcfg-eth0 and for a DHCP connection it should look something like this…

BOOTPROTO='dhcp'
BROADCAST=''
DHCLIENT_SET_DEFAULT_ROUTE='yes'
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME='82540EM Gigabit Ethernet Controller'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='ifplugd'
IFPLUGD_PRIORITY='0'
PREFIXLEN='24'

These commands should show the assigned IP address and default route…

ip address
ip route

So I took a quick look at the config file you mentioned and set it up exactly like the one you posted except I left the name the same, rebooted, still no network connection. The only difference between out two was startmode, mine was on boot so I changed it to ifplugd and added the last two options with the assigned values in your post. It is still not able to get an ip address. Thank you for your welcome and your reply, any further help is much appreciated. And yes, Im using wicked, I tried the network manager as well but to no avail.

  1. Do you have active link lights showing on the ports at both ends of the cable?

  2. Check that wicked is active and running with

sudo systemctl status wicked

If it is active, then something like the following will be reported…

● wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2017-11-10 15:48:01 NZDT; 1 day 16h ago
  Process: 933 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUCCESS)
 Main PID: 933 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 512)
   CGroup: /system.slice/wicked.service

Nov 10 15:47:44 linux-kgxs systemd[1]: Starting wicked managed network interfaces...
Nov 10 15:48:01 linux-kgxs wicked[933]: lo              up
Nov 10 15:48:01 linux-kgxs wicked[933]: eth0            up
Nov 10 15:48:01 linux-kgxs systemd[1]: Started wicked managed network interfaces.
  1. You can observe the device node status with
/sbin/ifstatus eth0

or

ip link

If eth0 is up, then the link should be reported as such.

If it is down, try

sudo ifup eth0

and check the status again.

  1. You can also monitor the journal logging live, while unplugging and plugging the ethernet cable
sudo journalctl -f

Do you get any dhcp-related output?

BTW, if you want to share any of this output, I suggest copying it to a text file and transfer to an internet-connected machine via a memory stick.

eth0 status is continually setup-in-progress, when I run

sudo ifup eth0

it hangs until I hit ctrl+c then returns “setup-in-progress”

when I run:

sudo journalctl -f

and pull ethernet and plug it back in I get an error:

_ni_rtnl_send_newroute(ipv4 0.0.0.0/0 via 192.168.0.1 dev eth0 type unicast table main scope universe protocol boot):ni_nl_talk failed. [Unspecific failure]

Both lights are lighting up, on the “card” and on the router.
Thanks again for your help.

Do you have invalid routes defined in /etc/sysconfig/network/routes perhaps? (You mentioned adding the gateway explicitly in the opening post.)

cat /etc/sysconfig/network/routes

If so, remove them and let DHCP do its job.

sudo rm -f /etc/sysconfig/network/routes

currently that file is empty, the file ifroute-eth0 (in the same folder) does have the entry for my router though. will try getting rid of the IPv4 gateway entry and reboot to see if that works but I remember entering it in order to try and fix this issue. Thanks again for the reply man, I recall having this problem with another box(same router) a few years back, hard wired to router as well. The only solution I found was using a different linux distro.

Yes, it shouldn’t be necessary when using DHCP.

Got it, checked DHCP server settings in router configuration. No default gateway was specified there, changed it to my routers IP address and now I’m good to go. Thanks for the help.

Glad you found the cause of the problem. :slight_smile: