1. DHCP function configuration
1.1. Configure the Linux kernel to enable DHCP-related options:
[*] Networking Support--
Networking Support
Networking Options--
[*] Packet socket
[*] Ip:kernel level Autoconfiguration
[*] IP:DHCP Support
[*] Network packet filtering Framework (NetFilter)--//downlevel sub-options are not configurable
Such as:
1.2. Configure BusyBox to enable the following options:
Networking Utilities
[*]UDHCP Server (UDHCPD)
[*] Dhcprelay
[*] Lease Display Utility (dumpleases)
[*]udhcp Client (UDHCPC)
[*] Verify the offered address is free,using ARP Ping
Such as:
1.3, the use of busybox under the Simple.script
Enter the BusyBox directory: busybox1.19.2/example/udhcp/, copy the file Simple.script to the/usr/share/udhcpc/directory of the root file system, Change the name to Default.script, and then Default.script resolv_conf= "/etc/resolv.conf" to Resolv_conf= "/tmp/resolv.conf".
(Note: Because the test uses the Cramfs file system, the ETC directory is not writable, run UDHCPC cannot create resolv.conf files in the/etc directory.) )
1.4. Copy Tool
Recompile the installation BusyBox, copy the installation files to the root file system directory, and run UDHCPC to obtain the IP dynamically.
BusyBox root file system usage records