1.. zephyr:code-sample:: ipv4-autoconf 2 :name: IPv4 autoconf client 3 :relevant-api: networking net_if net_context net_mgmt 4 5 Perform IPv4 autoconfiguration and self-assign a random IPv4 address 6 7Overview 8******** 9 10This sample application starts a IPv4 autoconf and self-assigns 11a random IPv4 address in the 169.254.0.0/16 range, it defends 12the IPv4 address and resolves IPv4 conflicts if multiple 13parties try to allocate an identical address. 14 15Requirements 16************ 17 18- :ref:`networking_with_host` 19 20Building and Running 21******************** 22 23These are instructions for how to use this sample application running 24on a :zephyr:board:`frdm_k64f` board to configure a link local IPv4 address and 25connect to a Linux host. 26 27Connect ethernet cable from a :zephyr:board:`Freedom-K64F board <frdm_k64f>` to a Linux 28host machine and check for new interfaces. 29 30Running Avahi client in Linux Host 31================================== 32 33Assign a IPv4 link local address to the interface in the Linux system 34 35.. code-block:: console 36 37 $ avahi-autoipd --force-bind -D eth0 38 39 40FRDM_K64F 41========= 42 43Build Zephyr the ``samples/net/ipv4_autoconf`` application using these 44steps: 45 46.. zephyr-app-commands:: 47 :zephyr-app: samples/net/ipv4_autoconf 48 :host-os: unix 49 :board: frdm_k64f 50 :goals: build flash 51 :compact: 52 53Once IPv4 LL has completed probing and announcement, details are shown like this: 54 55.. code-block:: console 56 57 $ sudo screen /dev/ttyACM0 115200 58 59.. code-block:: console 60 61 [ipv4ll] [INF] main: Run ipv4 autoconf client 62 [ipv4ll] [INF] handler: Your address: 169.254.218.128 63 64Note that the IP address may change at each self assignment. 65 66To verify the Zephyr application is running and has configured an IP address 67type: 68 69.. code-block:: console 70 71 $ ping -I eth1 169.254.218.128 72 73Wi-Fi 74===== 75 76The IPv4 Wi-Fi support can be enabled in the sample with 77:ref:`Wi-Fi snippet <snippet-wifi-ipv4>`. 78