DHCP Client configuration in Linux

Source: Internet
Author: User
Configuration of the DHCP Client in Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. Dhclient

Get the address directly from dhcp
/Etc/dhclient. config

No by default. It is also copied.
# Dhclient. conf
Interface "eth0 "{
Prepend domain-name-servers 127.0.0.1;
Request subnet-mask, broadcast-address, time-offset, routers,
Domain-name, domain-name-servers, host-name;
Require subnet-mask, domain-name-servers;
}
# End dhclient. conf

Or

① Directly edit the file/etc/sysconfig/network-scripts/ifcfg-ethO and change the statement "BOOTPROTO = none" to "BOOTPROTO = dhcp ".

② Restart the NIC. You can run the following command in the local terminal window of the client:
Ifdown eth0; ifup eth0
Or
Ifconfig eth0 down; ifconfig eth0 up

③ Test whether the DHCP Client is configured. Run the following command:
Ifconfig eth0

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.