Configure a dhcp server on the route

Source: Internet
Author: User


I. Environment: cisco Simulator
2. Topology:
 
3. Preparation Process
1. Configure Rouetr0 first
Router> en
Router # conft
Router (config )#
1> Configure the IP address Pool and enter the DHCP Pool configuration mode.
Router (config) # ip dhcp pool dg <-- address pool name
Router (dhcp-config) # ip dhcp pool 289 <-- address pool name
# Note: The address pool name can contain letters or numbers, as shown in the preceding figure.
Www.2cto.com
2> Configure the IP address pool and subnet mask
Router (dhcp-config) # network 192.168.10.0 255.255.255.0
Router (dhcp-config) # exit
3> Configure IP addresses not used for Dynamic Allocation
Router (config) # ip dhcp ex allow Tab key completion
Router (config) # ip dhcp excluded-address 192.168.10.20 192.168.10.30
# Exclude a segment of IP addresses from 192.168.10.20 to 192.168.10.30.
Router (config) # ip dhcp pool dg
4> Configure the default gateway for the IP address pool
Router (dhcp-config) # default-router 192.168.10.1
5> Configure the IP address of the Domain Name Server in the IP address pool
Router (dhcp-config) # dns
Router (dhcp-config) # dns-server 192.168.10.40
Router (dhcp-config) # exit
6> Configure the port ip Address
Router (config) # int f0/0
Router (config-if) # ip add 192.168.10.1 255.255.255.0
Router (config-if) # no shut
Router # wr
Building configuration...
[OK]
7> View the configuration
Router # show running-config
Building configuration...
Current configuration: 694 bytes
!
Version 12.4:
No service timestamps log datetime msec
No service timestamps debug datetime msec
No service password-encryption
!
Hostname Router
!
!
Ip dhcp excluded-address 192.168.10.20 192.168.10.30
!
Ip dhcp pool dg
Network 192.168.10.0 255.255.255.0
Default-router 192.168.10.1
Dns-server 192.168.10.40
Ip dhcp server pool 256
Network 192.168.10.0 255.255.255.0
Ip dhcp server pool 289
Www.2cto.com
2. vswitch Configuration
Configure the ip address of vlan 1
Switch # conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch (config) # int vlan 1
Switch (config-if) # ip add 192.168.10.2 255.255.255.0
Switch (config-if) # int f0/1
Switch (config-if) # no shut
3. pc Verification
Pc0 example
Release the ip address before obtaining the ip address.
PC> ipconfig/release
PC> ipconfig/renew
 
All right, the basic configuration is complete.
 

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.