Static IP address assignment configuration example
Network requirements
As shown in Figure 20, Router A (DHCP server) assigns a static IP address, a DNS server address, and a gateway address to Router B (DHCP client) and Router C (BOOTP client).
The client ID of the interface GigabitEthernet 1/0/1 on Router B is:
0030-3030-662e-6532-3030-2e30-3030-322d-4574-6865-726e-6574.
The MAC address of the interface GigabitEthernet 1/0/1 on Router C is 000f-e200-01c0.
Figure 20: Network diagram
Configuration procedure
Specify an IP address for GigabitEthernet 1/0/1 on Router A:
<RouterA> system-view [RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] ip address 10.1.1.1 25 [RouterA-GigabitEthernet1/0/1] quit
Configure the DHCP server:
# Enable DHCP.
[RouterA] dhcp enable
# Enable the DHCP server on GigabitEthernet 1/0/1.
[RouterA] interface gigabitethernet 1/0/1 [RouterA-GigabitEthernet1/0/1] dhcp select server [RouterA-GigabitEthernet1/0/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
# 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 [RouterA-dhcp-pool-0] quit [RouterA]
Verifying the configuration
# Verify that Router B can obtain IP address 10.1.1.5 and all other network parameters from Router A. (Details not shown.)
# Verify that Router C can obtain IP address 10.1.1.6 and all other network parameters from Router A. (Details not shown.)
# On the DHCP server, display the IP addresses assigned to the clients.
[RouterA] display dhcp server ip-in-use IP address Client identifier/ Lease expiration Type Hardware address 10.1.1.5 0030-3030-662e-6532- Jan 21 14:27:27 2014 Static(C) 3030-2e30-3030-322d- 4574-6865-726e-6574 10.1.1.6 000f-e200-01c0 Unlimited Static(C)