Routers act as DHCP servers to automatically assign IP addresses

Source: Internet
Author: User

The company recently expanded its office business and set up subsidiaries in many areas. As the subsidiary has just been established, there is not enough funds to purchase the server, and the Office of the IP address is ready to use DHCP automatic allocation of the way to manage, without a dedicated DHCP server can not implement the automatic allocation of IP addresses.

The author finds that because each subsidiary uses the corresponding router in the network exit, the DHCP service function can be enabled on the routing device of the company export, and the router acts as a DHCP server.

Now, the author of Cisco router as an example to introduce you to configure the method. Assuming that the company's internal IP address is 10.30.70.1~10.30.70.255, the client in the network wants to obtain the IP address automatically via the DHCP service, although the company has two servers (IP addresses are 10.30.70.2 and 10.30.70.100), These two servers cannot choose to automatically obtain an IP address only with a fixed IP address.

Service DHCP

Start the DHCP service.

IP dhcp exclude-add 10.30.70.2 10.30.70.100

Two IP addresses are reserved, that is, these two IP addresses are not automatically allocated through DHCP. In this case, the server retains the two IP addresses, which are implemented by the above command.

IP DHCP Ping packets 3

Before assigning an IP address, ping the address, that is, after assigning to a computer IP address to test connectivity, if connectivity is not a problem, the IP address is completely allocated to the corresponding computer, the use of this method to effectively ensure the normal network connection.

IP DHCP Pool 1

NET 10.30.70.0 255.255.255.0

Sets the scope of DHCP, including the IP range and subnet mask.

Default-router 10.30.70.1

Sets the gateway address.

Lease 8

Set the lease for IP addresses obtained by DHCP to 8 days.

After the above configuration, the router can act as a DHCP server to assign IP addresses and gateways to clients and other network parameters, saving the cost of purchasing a DHCP server, and its automatic access to IP addresses is similar to the effect of using a DHCP server exclusively.

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.