Skip to content
Marius Tomaschewski edited this page Jul 5, 2018 · 21 revisions

Frequently Asked Questions

Q: Why is wicked unable to provide a DHCPv4 lease on newer versions?

DHCP is using a "client identifier" (client-id) option (DHCPv4/DHCPv6) to identify a DHCP client to the DHCP server, which is using the identifier to index their database of address bindings. The client-id is expected to be unique for all clients in the same administrative domain. The RFC4361 updates DHCPv4 clients to use a DHCPv6 compatible client-identifier, which is required to perform dynamic DNS updates for IPv4 (A) and IPv6 (AAAA) address records in the same DNS zone/domain and is mandatory to use for InfiniBand / IPoIB interfaces where the hardware address is too long to fit into the DHCPv4 header. It also permits to use other, non-hardware address based client-identifiers like Enterprise specific DUID-EN and UUID based DUID-UUID identifiers for both, DHCPv4 and DHCPv6.

Wicked changed its defaults to use this DHCPv6 compatible RFC4361 client-id in favour of the older RFC2132 client-id. However, this has caused some issues with older DHCPv4 servers and existing setups where the client-id stored by the server is used to assign a (static) address. It is recommended to fix this server-side, but still, wicked provides several ways of addressing this issue:

  • The sysconfig ifcfg-<ifname> file can contain a DHCLIENT_CLIENT_ID variable (see man 5 ifcfg-dhcp), allowing to manually set the desired client-id, e.g.

    DHCLIENT_CLIENT_ID='01:00:01:02:03:04:05'
    

    which is an "old" (rfc2132) client-id where the 1st byte 01 is the number of ethernet hardware-type, followed by 6 bytes with the ethernet hardware/MAC address '00:01:02:03:04:05`.

  • The DHCLIENT_CLIENT_ID can be passed as kernel/boot parameter to the linuxrc installer as:

    ifcfg=00:01:02:03:04:05=dhcp4,DHCLIENT_CLIENT_ID=01:00:01:02:03:04:05
    
  • In wicked xml config files (/etc/wicked/ifconfig) the client-id can be defined inside the <ipv4:dhcp> node, e.g.

    <ipv4:dhcp><client-id>01:00:01:02:03:04:05</client-id></ipv4:dhcp>
    

    The format is the same as visible in the wicked show-config command output.

  • When the configuration does not provide any client-id for a device, wicked is using the settings defined in the wicked-config (see man 5 wicked-config) to generate a client id, which also permits to change the behavior to use a rfc4321 client-id again by creating an /etc/wicked/local.xml with the following content:

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

    See man 5 wicked-config man page for more details.

  • When there is no advise in wicked-config(5) which one to generate, a compile time default is used, which can be specified using the --enable-dhcp4-rfc4361-cid/--disable-dhcp4-rfc4361-cid via configure options.


Q: Why does wicked not request DHCPv6 IP address on my card?

Wicked follows the network administrator configuration provided by the router in its advertisements (IPv6 RA) by default and starts DHCPv6 request if the Managed or OtherConfig flags in the RA forwarded to it by the kernel is enabled. When there is no IPv6 router on the network, the router sends an IPv6 RA with DHCPv6 disabled, the firewall blocks icmpv6 traffic or the network card is incorrectly reporting carrier detection, wicked-dhcp6 may stay silent waiting for RA events.

Set FW_BOOT_FULL_INIT="yes" in /etc/sysconfig/SuSEfirewall2, so the SuSEfirewall2_init.service does not block icmpv6 packets. To provide/override the RA flags, set the DHCLIENT6_MODE=managed either in the ifcfg(5) file or in /etc/sysconfig/network/dhcp.

See also ifcfg-dhcp(5) manual page.


Q: My network is not IPv6 enabled, how to use DHCPv4 only?

Change the ifcfg(5) config file to use BOOTPROTO=dhcp4 instead of BOOTPROTO=dhcp. To disable IPv6 completely, you can use either sysctl.conf(5) config file:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

or the ipv6.disable=1 kernel boot parameter, e.g. in the GRUB_CMDLINE_LINUX variables of /etc/default/grub.


Q: Why is wicked not setting IP address on my network card?

The network card probably does not have carrier.

Wicked monitors events and states and preforms the setup steps according to state and layering of network device. Once the carrier is detected (and e.g. wireless link authentication was successful), it will start verifying the IP addresses for duplicates and applying them.

To break the rules and apply the IP address before the carrier is detected and layer 2 setup finished, you can disable it per interface using LINK_REQUIRED=no in the ifcfg- config file.

See also ifcfg(5) manual page.


Q: Why wicked does not set my (default) static route?

Each route using a gateway needs a direct route covering the gateway. When there is a static IP address (IPADDR) defined and it is in the same network as the gateway, the IP address causes to prepend the direct route matching also the gateway.

Otherwise declare such route explicitely, for example, when there is an IPADDR="192.168.1.2/24" (192.168.1 net), but the router has the IP 192.168.0.1 (in 192.168.0 net), define an explicit direct route for the gateway first:

192.168.0.1  -           - eth0
default      192.168.0.1 - eth0

See also routes(5) manual page.

Clone this wiki locally