R0106-HP MSR Router Series Layer 3 - IP Services Configuration Guide(V7)

45
2. Configure the DHCP server:
# Enable DHCP.
[RouterA] dhcp enable
# Enable the DHCP server on GigabitEthernet 2/1/1.
[RouterA] interface gigabitethernet 2/1/1
[RouterA-GigabitEthernet2/1/1] dhcp select server
[RouterA-GigabitEthernet2/1/1] quit
# Create DHCP address pool 0.
[RouterA] dhcp server ip-pool 0
# Configure a static binding for Router B.
[RouterA-dhcp-pool-0] static-bind ip-address 10.1.1.5 25 client-identifier
0030-3030-662e-6532-3030-2e30-3030-322d-4574-6865-726e-6574-302f-30
# Configure a static binding for Router C.
[RouterA-dhcp-pool-0] static-bind ip-address 10.1.1.6 25 hardware-address
000f-e200-01c0
# Specify the DNS server and gateway.
[RouterA-dhcp-pool-0] dns-list 10.1.1.2
[RouterA-dhcp-pool-0] gateway-list 10.1.1.126
Verifying the configuration
Router B can obtain IP address 10.1.1.5 and other network parameters, and Router C can obtain IP
address 10.1.1.6 and other network parameters from Router A. You can use the display dhcp server
ip-in-use command on the DHCP server to display the IP addresses assigned to the clients.
Dynamic IP address assignment configuration example
Network requirements
As shown in Figure 17, the DHCP server (Router A) assigns IP addresses to clients on subnet 10.1.1.0/24,
w h i c h i s s u b n e t t e d i n t o 10 .1.1. 0 / 2 5 a n d 10 .1.1.12 8 / 2 5 .
Configure DHCP server on Router A to implement the following assignment scheme.
Table 3 Assignment scheme
DHCP clients IP address Lease
Other confi
g
uration
p
arameters
Clients that connect
to GigabitEthernet
2/1/1
IP addresses on
subnet 10.1.1.0/25
10 days and 12
hours
G a t e w a y : 10 .1.1.126 / 2 5
DNS server: 10.1.1.2/25
Domain name: aabbcc.com
WINS server: 10.1.1.4/25
Clients that connect
to GigabitEthernet
2/1/2
IP addresses on
subnet
10.1.1.128/25
Five days
G a t e w a y : 10 .1.1. 2 5 4 / 2 5
DNS server: 10.1.1.2/25
Domain name: aabbcc.com