DHCP Config issue

Hi there,

I’m having trouble picking dynamic IP address on my LAN network at the office. Below iis what I have, please let me know what else I can share. Also, how can I detect that I am picking an APIPA (169.254.x.x)

cat /etc/sysconfig/network/ifcfg-em1

 
BOOTPROTO='dhcp'
BROADCAST=''
DHCLIENT_SET_DEFAULT_ROUTE='yes'
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME='Ethernet Connection I217-LM'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='ifplugd'


cat /etc/os-release


NAME=openSUSE
VERSION="13.2 (Harlequin)"
VERSION_ID="13.2"
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"


systemctl status network.service


wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled)
   Active: active (exited) since Tue 2016-10-18 09:12:29 EAT; 30s ago
  Process: 3366 ExecStop=/usr/sbin/wicked --systemd ifdown all (code=exited, status=0/SUCCESS)
  Process: 3175 ExecReload=/usr/sbin/wicked --systemd ifreload all (code=exited, status=0/SUCCESS)
  Process: 3370 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUCCESS)
 Main PID: 3370 (code=exited, status=0/SUCCESS)

Oct 18 09:12:29 Doofenshmirtz wicked[3370]: device em1: operation timed out
Oct 18 09:12:29 Doofenshmirtz wicked[3370]: lo              up
Oct 18 09:12:29 Doofenshmirtz wicked[3370]: em1             setup-in-progress
Oct 18 09:12:29 Doofenshmirtz systemd[1]: Started wicked managed network interfaces.

I haven’t used ‘ifplugd’. Perhaps it’s not configured correctly. Does changing the startmode to ‘hotplug’ or ‘auto’ help?

I recall an old thread which may be relevant…

https://forums.opensuse.org/showthread.php/510111-Having-trouble-to-configure-ifplugd-to-start-automatically-on-bootI note that ‘man ifcfg’ mentions…

STARTMODE {manual*|auto|nfsroot|hotplug|off}
Choose when the interface should be set up.
manual
Interface will be set up if ifup is called manually
auto
Interface will be set up as soon as it is available (and service network was started). This either
happens at boot time when network is starting or via hotplug when a interface is added to the system
(by adding a device or loading a driver). To be backward compliant onboot, on and boot are aliases for
auto.
hotplug
Interface will be activated when it is available. Use instead of auto for devices which may be missed,
such as bonding slaves, usb or other plugable hardware.
nfsroot
Nearly like auto, but interfaces with this startmode will be not shut down by default. Use this mode
when you use a root filesystem via network or want to avoid interface shutdown. To force a nfsroot
interface down, use either wicked ifdown --force device-down <interface> or ifdown <inter-
face> -o force.
off
Will never be activated.

   Note:  Hotplugging is available only when wickedd-nanny is enabled.
          See wicked-config(5) for instructions how to enable it.
          Without nanny, an ifup call preforms a one-shot setup.

Thank you Deano.

I tried both options and still have the same problem unfortunately.

Just to confirm that you restarted wicked (or physically remove and reconnect ethernet plug) after making any config changes?

sudo systemctl restart wicked

I found an old openSUSE 13.2 thread describing the same issue, and linking to this bug report.Try manually toggling the interface with

ifdown em1 ; ifup em1

then update your system

zypper clean
zypper up

Thanks. I tried as recommended. Post is code from what happens when I use the “hotplug” option.

 cat /etc/sysconfig/network/ifcfg-em1 
BOOTPROTO='dhcp'
BROADCAST=''
DHCLIENT_SET_DEFAULT_ROUTE='yes'
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME='Ethernet Connection I217-LM'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='hotplug'


 Doofenshmirtz:~ #systemctl restart wicked

Doofenshmirtz:~ # ifdown em1
em1             device-ready

Doofenshmirtz:~ # ifup em1
wicked: device em1: operation timed out
em1             setup-in-progress

Doofenshmirtz:~ # systemctl status wicked
wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled)
   Active: active (exited) since Wed 2016-10-19 08:42:00 EAT; 53s ago
  Process: 19657 ExecStop=/usr/sbin/wicked --systemd ifdown all (code=exited, status=0/SUCCESS)
  Process: 19327 ExecReload=/usr/sbin/wicked --systemd ifreload all (code=exited, status=0/SUCCESS)
  Process: 19664 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUCCESS)
 Main PID: 19664 (code=exited, status=0/SUCCESS)

Oct 19 08:42:00 Doofenshmirtz wicked[19664]: device em1: operation timed out
Oct 19 08:42:00 Doofenshmirtz systemd[1]: Started wicked managed network interfaces.
Oct 19 08:42:00 Doofenshmirtz wicked[19664]: lo              up
Oct 19 08:42:00 Doofenshmirtz wicked[19664]: em1             setup-in-progress
Doofenshmirtz:~ # zypper clean
All repositories have been cleaned up.
Doofenshmirtz:~ # zypper up
Download (curl) error for 'http://download.virtualbox.org/virtualbox/rpm/opensuse/13.2/repodata/repomd.xml':
Error code: Connection failed
Error message: Could not resolve host: download.virtualbox.org

Abort, retry, ignore? [a/r/i/? shows all options] (a): 


Forgot to include this


Doofenshmirtz:~ # ifplugstatus
lo: link beat detected
wlp3s0: unplugged
em1: link beat detected


Hmmm…I was hoping that the ifdown/ifup sequence would get you a working connection (as described in the bug report). You could try switching to NetworkManager via YaST > System > Network Settings, change to NetworkManager. Once complete, you should be able to configure via the KDE (or Gnome) NM front-ends.

This information should be sufficient to guide you to a working DHCP connection…
https://doc.opensuse.org/documentation/html/openSUSE_113/opensuse-startup/cha.nm.html#sec.nm.activate

Unless you’ve been fiddling with ifplugd,
IMO you shouldn’t assume your problem is related to it.

Only things on your machine which should be relevant are

  • Your interface configuration specifies “BOOTPROTO=“dhcp”” which is the case in your first post.
  • Your interface is active.

You should run the following to inspect your working network configuration (or “ifconfig” but that is deprecated)

ip addr

That should tell you whether the interface is up, and whether you’re configured with a link-local address(aka self-assigned when not configured) or something else.

You should also consider that you’re connecting to a part of your network which might be blocking DHCP.
If you have another device which can attach using the same network connection (looks like a wired cable in your case), try that.
Maybe even replace your patch cable.
And, of course always look at your network connectivity LED lights on both ends of the patch cable.

TSU

Hey everyone,

I found out the problem is actually with the ports I was connected to. I tried 2 different ports and concluded the problem was with my laptop. Thanks for all your help!