Lines Matching +full:address +full:- +full:1

1 .. zephyr:code-sample:: dhcpv4-client
3 :relevant-api: dhcpv4 net_mgmt
5 Start a DHCPv4 client to obtain an IPv4 address from a DHCPv4 server.
10 This application starts a DHCPv4 client, gets an IPv4 address from the
11 DHCPv4 server, and prints address, lease time, netmask and router
17 - :ref:`networking_with_host`
26 QEMU on a Linux host to negotiate IP address from DHCPv4 server (kea) running
31 Here's a sample server configuration file '/etc/kea/kea-dhcp4.conf'
34 .. code-block:: console
38 "interfaces-config": {
40 "dhcp-socket-type": "raw"
43 "valid-lifetime": 7200,
47 "id": 1,
49 "pools": [ { "pool": "192.0.2.10 - 192.0.2.100" } ],
50 "option-data": [
56 "name": "domain-name-servers",
68 .. code-block:: console
70 $ sudo kea-dhcp4 -c /etc/kea/kea-dhcp4.conf
74 .. zephyr-app-commands::
75 :zephyr-app: samples/net/dhcpv4_client
76 :host-os: unix
81 Once DHCPv4 client address negotiation completed with server, details
84 .. code-block:: console
87 [00:00:00.000,000] <inf> net_dhcpv4_client_sample: Start on slip: index=1
89 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Address[1]: 192.0.2.10
90 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Subnet[1]: 255.255.255.0
91 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Router[1]: 192.0.2.2
92 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Lease time[1]: 7200 seconds
95 an ip address by typing:
97 .. code-block:: console
99 $ ping -I tap0 192.0.2.10
106 :zephyr:board:`frdm_k64f` board to negotiate IP address from DHCPv4 server (kea) running
109 Connect ethernet cable from :zephyr:board:`Freedom-K64F board <frdm_k64f>` to Linux host
112 .. code-block:: console
116 Add ip address and routing information to interface:
118 .. code-block:: console
123 Here's a sample server configuration file '/etc/kea/kea-dhcp4.conf'
126 .. code-block:: console
130 "interfaces-config": {
132 "dhcp-socket-type": "raw"
135 "valid-lifetime": 7200,
139 "id": 1,
141 "pools": [ { "pool": "192.0.2.10 - 192.0.2.100" } ],
142 "option-data": [
148 "name": "domain-name-servers",
160 .. code-block:: console
162 $ sudo kea-dhcp4 -c /etc/kea/kea-dhcp4.conf
166 .. zephyr-app-commands::
167 :zephyr-app: samples/net/dhcpv4_client
168 :host-os: unix
173 Once DHCPv4 client address negotiation completed with server, details
176 .. code-block:: console
180 [00:00:00.000,000] <inf> net_dhcpv4_client_sample: Start on ethernet: index=1
182 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Address[1]: 192.0.2.10
183 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Subnet[1]: 255.255.255.0
184 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Router[1]: 192.0.2.2
185 [00:00:07.080,000] <inf> net_dhcpv4_client_sample: Lease time[1]: 7200 seconds
188 an ip address by typing:
190 .. code-block:: console
192 $ ping -I eth1 192.0.2.10
202 address from DHCPv4 server running on Arm FVP, so there is no extra
207 .. zephyr-app-commands::
208 :zephyr-app: samples/net/dhcpv4_client
209 :host-os: unix
214 Once DHCPv4 client address negotiation completed with server, details
217 .. code-block:: console
225 *** Booting Zephyr OS build zephyr-v3.2.0-4300-g3e6505dba29e ***
227 [00:00:00.180,000] <inf> net_dhcpv4_client_sample: Start on ethernet@9a000000: index=1
229 [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Address[1]: 172.20.51.1
230 [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Subnet[1]: 255.255.255.0
231 [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Router[1]: 172.20.51.254
232 [00:00:07.180,000] <inf> net_dhcpv4_client_sample: Lease time[1]: 86400 seconds