No DHCP Address

If i try to get IP-Adress of my DHCP no Adress is set. If i set IP-Address static, everything works fine. There is a Windows 7 on the same computer which gets an IP Address. Also other devices with android get IP-Adresses from these DHCP. So i dont think the DHCP is the problem.

**linux-aqyn:/ #** lspci|grep net
00:12.0 Ether**net** controller: VIA Technologies, Inc. VT6102/VT6103 [Rhine-II] (rev 7c)

**linux-aqyn:/ #** /usr/sbin/wicked ifstatus all
lo              up
      link:     #1, state up
      type:     loopback
      config:   compat:suse:/etc/sysconfig/network/ifcfg-lo
      leases:   ipv4 static granted
      addr:     ipv4 127.0.0.1/8 [static]

enp0s18         setup-in-progress
      link:     #2, state up, mtu 1500
      type:     ethernet, hwaddr 00:18:f3:24:e4:88
      config:   compat:suse:/etc/sysconfig/network/ifcfg-enp0s18
      leases:   ipv4 dhcp requesting

**linux-aqyn:/ #** systemctl status network.service  
**●** wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled; vendor preset: disab
   Active: **active (exited)** since Thu 2018-05-03 23:19:18 CEST; 3s ago
  Process: 7877 ExecStop=/usr/sbin/wicked --systemd ifdown all (code=exited, status=0/SU
  Process: 7125 ExecReload=/usr/sbin/wicked --systemd ifreload all (code=exited, status=
  Process: 9386 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUC
 Main PID: 9386 (code=exited, status=0/SUCCESS)

Mai 03 23:18:48 linux-aqyn systemd[1]: Starting wicked managed network interfaces...
Mai 03 23:19:18 linux-aqyn wicked[9386]: lo              up
Mai 03 23:19:18 linux-aqyn wicked[9386]: enp0s18         setup-in-progress
Mai 03 23:19:18 linux-aqyn systemd[1]: Started wicked managed network interfaces.

**linux-aqyn:/ #** cat /etc/sysconfig/network/ifcfg-enp0s18
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME=''
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
DHCLIENT_SET_DEFAULT_ROUTE='yes'
ZONE=public
PREFIXLEN='24'

Tell me if more information is needed,

This is very likely Bug 1080832.

Check comment #5 on that bug report, and create the suggested file “local.xml” in “/etc/wicked”.

It looks as if the “fix” for this bug is going to be that the document the need for this file, when the DHCP server does not support the latest standards.

Switching to “NetworkManager” probably also works as an alternative work around.

I assume that you are dual-booting your machine.
When you dual-boot, the problem is that when an IP address is assigned to you, it’s based on your MAC address and the DHCP server will assume that your machine already has your address since the NIC physical MAC is the same for both OS

Solution:
Since setting the DHCP lease TTL to something very short is usually not a practical solution (for many reasons), the simple solution is to modify the NIC setting to use a custom instead of MAC address.

In MSWindows, this can be done easily in the NIC Advanced Settings.

In openSUSE,
If you are running Network Manager, this can be done by entering a value in the “Cloned Address” field
If you are running Wicked, then you should edit the interface file directly and add a “hwaddress=” setting

When you do this in either the MSWindows or your openSUSE, then your DHCP server can clearly see that your boot into either of these OS are clearly different.

The alternative is to restart your network service to force a refresh from your DHCP Server.

TSU

First of all, thank you for your reply!

I created the the file “/etc/wicked/local.xml”


  <config>
    <addrconf>
      <dhcp4>
        <create-cid>rfc2132</create-cid>
      </dhcp4>
    </addrconf>
  </config>

After that i restartet networ and wickedd.


**linux-aqyn:/ #** /usr/sbin/wicked ifstatus all
lo              up
      link:     #1, state up
      type:     loopback
      config:   compat:suse:/etc/sysconfig/network/ifcfg-lo
      leases:   ipv4 static granted
      addr:     ipv4 127.0.0.1/8 [static]

enp0s18         setup-in-progress
      link:     #2, state up, mtu 1500
      type:     ethernet, hwaddr 00:18:f3:24:e4:88
      config:   compat:suse:/etc/sysconfig/network/ifcfg-enp0s18
      leases:   ipv4 dhcp requesting


linux-aqyn:/ #journalctl|grep dhcp
Mai 04 21:03:04 linux-aqyn wickedd-dhcp4[10372]: enp0s18: Request to acquire DHCPv4 leas
e with UUID 68aeec5a-d904-0100-8628-000002000000
Mai 04 21:03:19 linux-aqyn wickedd-dhcp4[10372]: enp0s18: defer timeout 15 reached (stat
e SELECTING)
Mai 04 21:03:50 linux-aqyn wickedd-dhcp4[10372]: ni_dhcp4_device_close: timer active for
 enp0s18
Mai 04 21:05:03 linux-aqyn wickedd-dhcp4[828]: enp0s18: Request to acquire DHCPv4 lease 
with UUID dfaeec5a-eb3c-0d00-6303-000003000000
Mai 04 21:05:19 linux-aqyn wickedd-dhcp4[828]: enp0s18: defer timeout 15 reached (state 
SELECTING)
Mai 04 21:09:05 linux-aqyn wickedd-dhcp4[828]: enp0s18: DHCP4 discovery failed
Mai 04 21:09:40 linux-aqyn wickedd-dhcp4[828]: ni_dhcp4_device_close: timer active for e
np0s18
Mai 04 21:09:42 linux-aqyn wickedd-dhcp4[3095]: enp0s18: Request to acquire DHCPv4 lease
 with UUID f6afec5a-a9bc-0300-190c-000002000000
Mai 04 21:09:57 linux-aqyn wickedd-dhcp4[3095]: enp0s18: defer timeout 15 reached (state
 SELECTING)


**cat** /etc/sysconfig/network/ifcfg-enp0s18
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME=''
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
DHCLIENT_SET_DEFAULT_ROUTE='yes'
ZONE=public
PREFIXLEN='24'

I know what you mean, but i releaed all leases from dhcp-server and restarted dhcp-server. Does not work. On Windows i got another IP of the pool.

But i will give it a try. Do i only need to add “hwaddress=” or do i need a fake MAC after “=”?

Have you disabled the firewall and tested?

You can also watch bootp through tcpdump or wireshark

If on MSWindows,

ipconfig /release
ipconfig /renew

If on openSUSE,
The equivalent of the above Windows commands is

systemctl restart network.service

When you specify a MAC address with “hwaddr=” yes, you do need to specify a “fake MAC”

TSU

Because of massiv filesystem problem i had to reinstall opensuse tumbleweed. I installed with latest tumbleweed and had no prblems anymore. Maybe there was a bug which is fixed now. No changes on the DHCP - Device.

Thanks for your help!