The router allocates IP address (DHCP) and DHCP relay.

Source: Internet
Author: User
Tags virtual environment

The main function of a vro is network addressing, which sometimes needs to be used to assign IP addresses. However, assigning a router address increases the load on the router, so sometimes we can assign the address to a PC.

 

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4B/60/wKioL1QqcFfySSikAABvxD00n48656.jpg "Title =" qq20140930083234.png "alt =" wkiol1qqcffyssikaabvxd00n48656.jpg "/>

1. Use the router to assign an IP Address:


Router> en

Router # conf t

Enter configuration commands, one per line. End with cntl/Z.

Router (config) # int VLAN 1

Router (config-If) # ip dhcp pool vlan1 // sets the IP address pool. vlan1 is just a name

Router (DHCP-config) # network 192.168.1.0 255.255.255.0 // you can specify the allocated IP address segment.

Router (DHCP-config) # default-router 192.168.1.1 // sets the Default Gateway

Router (DHCP-config) # DNS-server 8.8.8.8 // sets the DNS server

Router (DHCP-config) # lease 2 // sets the address lease time, in days

Router (DHCP-config) # ip dhcp excluded-address 192.168.1.100 // retain unallocated addresses


After configuring the router, remember to turn on the switch. I am in the vmare virtual environment. Therefore, you must first disable the DHCP service of the virtual machine so that the client can normally receive the IP address assigned by the router.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4B/60/wKioL1QqcrezmCTxAAJ9OFGyja4342.jpg "Title =" qq20140930084102.png "alt =" wkiol1qqcrezmctxaaj9ofgyja4342.jpg "/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4B/5D/wKiom1Qqcp3yYc9uAAHn50ey1FM700.jpg "Title =" dhcpok.png "alt =" wkiom1qqcp3yyc9uaahn50ey1fm700.jpg "/>


2. DHCP relay:


Router (config) # int VLAN 1

Router (config-If) # IP address 192.168.1.1 255.255.255.0

Router (config-If) # IP helper-address 192.168.1.100

Router (config-If) # No Shutdown


650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4B/60/wKioL1QqdPWSHsFeAAFc4yAG7NI310.jpg "Title =" qq20140930091520.png "alt =" wkiol1qqdpwshsfeaafc4yag7ni310.jpg "/>

Install the DHCP service on the server of the relay proxy and manually set the IP address to 192.168.1.100. Create a DHCP address pool and activate it. You can set the default gateway and DNS server in "scope options.

This article from the "Dragon love Xueqi" blog, please be sure to keep this source http://dragon123.blog.51cto.com/9152073/1559929

The router allocates IP address (DHCP) and DHCP relay.

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.