Arm-linux configuring DHCP to obtain IP addresses automatically

Source: Internet
Author: User

Note:
Kernel version: 2.6.30.9
BusyBox version: 1.15.2

Working users for PC Linux and Development Board Linux: root


1. Configure the kernel:
[*] Networking Support--->
Networking Options--->
<*> Packet Socket
<*> Unix domain sockets
[*] TCP/IP Networking
[*] Ip:kernel level Autoconfiguration
[*] IP:DHCP Support
[*] Network packet filtering Framework (NetFilter)--->
2. Configure BusyBox:
Networking Utilities--->
[*] UDHCP client (UDHCPC)
3. Create the configuration file:
Copy the Simple.script file from BusyBox examples/udhcp/to the/usr/share/udhcpc/of the Development Board and rename it to Default.script

4. Test:
Perform UDHCPC on the command console, note that you must ensure that a DHCP server exists in the LAN or UDHCP execution fails.
The following results are performed on easy2440:
UDHCPC (v1.15.2) started
Setting IP address 0.0.0.0 on eth0
Sending Discover ...
Sending Select for 192.168.1.101 ...
Lease of 192.168.1.101 obtained, Lease time 7200
Setting IP address 192.168.1.101 on eth0
Deleting Routers
Route:SIOCDELRT:No such process
Adding Router 192.168.1.1
Recreating/etc/resolv.conf
Adding DNS Server 211.148.192.141
Adding DNS Server 210.21.196.6

5. Modify the System initialization configuration file to get the IP address automatically after the board is powered on:
Modify the/etc/init.d/rcs file to add a command in the appropriate location:/SBIN/UDHCPC &

6. Enjoy it!

Arm-linux configuring DHCP to obtain IP addresses automatically

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.