CISCO PT Simulation Experiment (18) router DHCP server and relay configuration

Source: Internet
Author: User
Tags ccna study guide

CISCO PT Simulation Experiment (18) router DHCP server and relay configuration

Experimental Purpose :

Master the configuration method of router DHCP server

Master the configuration method of DHCP relay Agent

Mastering the DHCP protocol and the principle and implementation process of the relay

Experimental Background :

with the expansion of the company's network, more and more office computers in the company, the original fixed IP access scheme is no longer applicable to the complex and changeable network environment. in order to simplify the management and maintenance work, the company decided to use the router as a DHCP server, so that the enterprise network internal host access to automatically obtain an IP address, so that the host communication between each other.

Technical Principle :

  • DHCP (Dynamic Host Configuration Protocol) is a LAN protocol that uses UDP to work with two main purposes: assigning an IP address to an internal network or network service provider automatically, For users or internal network administrators as a means of central management of all computers.

  • The client can correctly obtain dynamically assigned IP addresses when the DHCP client client is in the same physical network segment as the DHCP server server. the implementation of the DHCP process is roughly as follows:

    • client requests DHCP: First broadcast the DHCP Discover packet to the LAN and discover a DHCP server that can provide IP to it.

    • server response: When the available DHCP server receives the Discover packet, it sends a reply by sending a DHCP offer packet, which is intended to tell the client that it can provide an IP address.

    • Client request IP: After the client receives the offer package, the DHCP Request packet is sent for the IP assignment.

    • The server confirms the IP lease: The DHCP server sends ACK packets, confirming the information.

  • DHCP relay (proxy), which is DHCP Relay (DHCPR) enables the ability to process and forward DHCP information between a physical network segment and a different subnet . If you are not on the same physical network segment, you need a relay agent. The implementation process for DHCP relay is as follows:

    • When the client is started and DHCP initialized, it configures the request message on the local network broadcast.

    • If a DHCP server exists on the local network, DHCP configuration can be done directly and no DHCP relay is required.

    • If the local network does not have a DHCP server , the DHCP agent in the local network receives the broadcast message and is properly processed and forwarded to the DHCP server on the specified other network.

    • The DHCP server configures the request information and sends the configuration information to the client through DHCP relay to complete the dynamic assignment of the IP address.

  • DHCP configuration mode (dhcp-config) #


Experimental Equipment : ROUTER-PT 2 units, switch_2960 1, PC 2, Server 1, straight line, crossover line, serial line.

Experimental topology :

650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/A5/2A/wKioL1m42h2gJ6RoAAA0m6sFEOU498.png-wh_500x0-wm_ 3-wmp_4-s_1698740861.png "title=" 18.1.PNG "width=" 429 "height=" border= "0" hspace= "0" vspace= "0" style= "width : 429px;height:300px; "alt=" Wkiol1m42h2gj6roaaa0m6sfeou498.png-wh_50 "/>

Experimental steps:

New Cisco PT topology diagram

Set the IP and gateway addresses of each PC and server to auto get (DHCP)

Configuration of each router (interface IP, clock frequency, etc.)

Configuring RIP dynamic routing on ROUTER0 and Router1

Configure the DHCP service on ROUTER0 and create the desired address pool

Configuring the DHCP Relay Agent on Router1

Test interoperability between terminals (PC, Server)


# PC Settings set the PC's IP address, subnet mask, default gateway, DNS server as DHCP
/*=part1  router0  Basic Configuration   */router>enablerouter#conf trouter (config) #inter  f0/0                  //Enter No. 0 module NO. 0 port (Fast Ethernet interface) Router (config-if) #ip  address 192.168.1.1 255.255.255.0     //Configuration F0/0 Interface Iprouter (config-if) #no  shutdown              //open port, default off router (config-if) #exitRouter (config) #interface  serial 2/0        //enters 2nd module NO. 0 port (Serial interface) Router (config-if) #ip  address 10.254.10.1  255.255.255.0    //Configuration S2/0 Interface Iprouter (config-if) #clock  rate 64000         //must be configured with a clock to communicate router (config-if) #no  shutdown              //open port, default off router (config-if) #exit/*=part2   rip Dynamic Routing configuration   */router (conFIG) #router  rip                      //Enter routing configuration mode  -  enable RIP protocol router (config-router) #version  2                //uses version 2, the RIPV2 protocol router ( Config-router) #network  192.168.1.0     //Specifies the network that needs to be advertised (in the routing interface) router (config-router) # Network 10.254.10.0router (config-router) #exit/*=part3  dhcp server configuration   */router (config) # service dhcp                    //Enable DHCP function//Configure DHCP address pool Cisco1router (config) #ip  dhcp pool cisco1router ( Dhcp-config) #network  192.168.1.0 255.255.255.0     //dhcp address pool range Router ( Dhcp-config) #default-router 192.168.1.1        //client's default gateway router ( Dhcp-config) #dns-server 114.114.114.114        //Client DNS server router (config) #ip  dhcp  excluded-address 192.168.1.1 192.168.1.100  //exclude DHCP-assigned addresses//Configure DHCP address pool Cisco2router (config) # Ip dhcp pool cisco2router (dhcp-config) #network  192.168.2.0 255.255.255.0      //DHCP address pool range Router (dhcp-config) #default-router 192.168.2.1         //Client's default gateway (dhcp-config) #dns-server 114.114.114.114         //Client DNS server router (config) #ip  dhcp excluded-address 192.168.2.100  192.168.2.200  //exclude DHCP-assigned address router (config) #^zrouter#show ip dhcp pool             router#show ip dhcp binding
/*=part1  router1  Basic Configuration   */router>enablerouter#conf trouter (config) #inter  f0/0                  //Enter No. 0 module NO. 0 port (Fast Ethernet interface) Router (config-if) #ip  address 192.168.2.1 255.255.255.0     //Configuration F0/0 Interface Iprouter (config-if) #no  shutdown              //open port, default off router (config-if) #exitRouter (config) #interface  serial 2/0        //enters 2nd module NO. 0 port (Serial interface) Router (config-if) #ip  address 10.254.10.2  255.255.255.0    //Configuration S2/0 Interface Iprouter (config-if) #no  shutdown              //open port, default off Router (config) #exit/*=part2   RIP dynamic routing configuration   */router (config) #router  rip                      //into routing configuration mode  -  enable RIP protocol router (config-router) #version  2                //using version 2, That is, the RIPV2 protocol router (config-router) #network  192.168.2.0     //Specifies the network that needs to be advertised (located in the routing interface) router ( Config-router) #network  10.254.10.0router (config-router) #exit/*=part3  dhcp Relay Agent configuration   */ Router (config) #service  dhcp                 //enable DHCP feature router (config) #inter  f0/0                   //Enter No. 0 module NO. 0 port (Fast Ethernet interface) Router (config-if) #ip   HELPER-ADDRESS 10.254.10.1    //forwards DHCP request packets in 192.168.2.0 subnets to 10.254.10.1Router (config-if ) #^zrouter#show r
# Link Test (in this case each terminal IP is as follows, the IP address obtained under different experimental environments may be different) PC0 and PC1 (Command prompt cmd) ping 192.168.1.1//link ping 10.254.10.1 Link ping 192.168.2.2//Link Pass


Lab environment: Windows 7,cisco PT 7.0

Reference: CCNA Study Guide (7th edition)


CISCO PT Simulation Experiment (18) router DHCP server and relay configuration

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.