33.2.2 Settings for distributing IP to clients
- Points to note
-
Specify the IP addresses that you want to be excluded from assignment to DHCP clients. and then create a DHCP address pool and use it to dynamically distribute IP addresses to DHCP clients.
Figure 33-1: Client-server configuration (when IP is dynamically distributed)
Command examples
-
(config)# interface vlan 10
(config-if)# ip address 10.1.11.1 255.255.255.0
(config-if)# exit
Sets the necessary VLAN interface and IP address in advance.
-
(config)# service dhcp vlan 10
Specifies the name of the VLAN interface on which the DHCP server is enabled.
-
(config)# ip dhcp excluded-address 10.1.11.1 10.1.11.120
Sets the IP addresses that are to be excluded from assignment to DHCP clients by the DHCP server.
-
(config)# ip dhcp pool Group1
Creates a DHCP address pool.
Switches to DHCP configuration mode.
-
(dhcp-config)# network 10.1.11.0 255.255.255.0
Sets the network address of the DHCP address pool.
-
(dhcp-config)# lease 0 0 20
Sets 20 minutes as the default lease time for the DHCP address pool.
-
(dhcp-config)# default-router 10.1.11.1
Sets the IP address of the router on the subnet.