The latest development version of this page may be more current than this released 4.0.0 version.

IPv4 autoconf client

Browse source code on GitHub

Overview

This sample application starts a IPv4 autoconf and self-assigns a random IPv4 address in the 169.254.0.0/16 range, it defends the IPv4 address and resolves IPv4 conflicts if multiple parties try to allocate an identical address.

Requirements

Building and Running

These are instructions for how to use this sample application running on a FRDM-K64F board to configure a link local IPv4 address and connect to a Linux host.

Connect ethernet cable from a Freedom-K64F board to a Linux host machine and check for new interfaces.

Running Avahi client in Linux Host

Assign a IPv4 link local address to the interface in the Linux system

$ avahi-autoipd --force-bind -D eth0

FRDM_K64F

Build Zephyr the samples/net/ipv4_autoconf application using these steps:

west build -b frdm_k64f samples/net/ipv4_autoconf
west flash

Once IPv4 LL has completed probing and announcement, details are shown like this:

$ sudo screen /dev/ttyACM0 115200
[ipv4ll] [INF] main: Run ipv4 autoconf client
[ipv4ll] [INF] handler: Your address: 169.254.218.128

Note that the IP address may change at each self assignment.

To verify the Zephyr application is running and has configured an IP address type:

$ ping -I eth1 169.254.218.128

Wi-Fi

The IPv4 Wi-Fi support can be enabled in the sample with Wi-Fi snippet.

See also

Networking
Network Interface abstraction layer
Application network context
Network Management