Part 1
요약·해설
Host autoipd, board build·serial 출력·ping까지 5개 원문 block을 순서대로 보존합니다.
169.254.0.0/16
Avahi
FRDM-K64F
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
D4E3098E62EE5CEDDA0020805900971D55F6B819FE674DD77ED7A70174EF04E4
.. zephyr:code-sample:: ipv4-autoconf
:name: IPv4 autoconf client
:relevant-api: networking net_if net_context net_mgmt
Perform IPv4 autoconfiguration and self-assign a random IPv4 address
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
************
- :ref:`networking_with_host`
Building and Running
********************
These are instructions for how to use this sample application running
on a :ref:`frdm_k64f` board to configure a link local IPv4 address and
connect to a Linux host.
Connect ethernet cable from a :ref:`Freedom-K64F board <frdm_k64f>` 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
.. code-block:: console
$ avahi-autoipd --force-bind -D eth0
FRDM_K64F
=========
Build Zephyr the ``samples/net/ipv4_autoconf`` application using these
steps:
.. zephyr-app-commands::
:zephyr-app: samples/net/ipv4_autoconf
:host-os: unix
:board: frdm_k64f
:goals: build flash
:compact:
Once IPv4 LL has completed probing and announcement, details are shown like this:
.. code-block:: console
$ sudo screen /dev/ttyACM0 115200
.. code-block:: console
[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:
.. code-block:: console
$ ping -I eth1 169.254.218.128
Part 3
한국어 전문 번역
개요
이 sample application은 IPv4 autoconfiguration을 시작하고 169.254.0.0/16 범위에서 random IPv4 address를 스스로 할당합니다.
선택한 IPv4 address를 방어하며 여러 참여자가 같은 address를 할당하려 할 때 IPv4 conflict를 해결합니다.
요구 사항
Build와 실행
다음 절차는 FRDM-K64F board에서 sample을 실행해 IPv4 link-local address를 구성하고 Linux host에 연결하는 방법입니다.
Freedom-K64F board와 Linux host machine을 Ethernet cable로 연결하고 새 interface를 확인합니다.
Linux host에서 Avahi client 실행
Linux system의 interface에 IPv4 link-local address를 할당합니다.
$ avahi-autoipd --force-bind -D eth0
FRDM-K64F
다음 단계로 Zephyr samples/net/ipv4_autoconf application을 build하고 flash합니다.
west build -b frdm_k64f samples/net/ipv4_autoconf
west flash
IPv4 link-local probing과 announcement가 끝나면 serial console을 엽니다.
$ sudo screen /dev/ttyACM0 115200
Client가 선택한 link-local address가 다음과 같이 표시됩니다.
[ipv4ll] [INF] main: Run ipv4 autoconf client
[ipv4ll] [INF] handler: Your address: 169.254.218.128
Self-assignment를 수행할 때마다 IP address가 달라질 수 있습니다.
Zephyr application이 실행 중이고 IP address를 구성했는지 다음 ping으로 확인합니다.
$ ping -I eth1 169.254.218.128
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.