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