DHCP Configuration
Fixed Switch Configuration Guide 4-19
Example
In this example, VLAN 6 is created and ports ge.1.1 through ge.1.10 are added to VLAN 6. An IP
address is associated with routed interface VLAN 6 in router configuration mode. Returning to
switch mode, DHCP is enabled and a dynamic IP address pool is configured in the same subnet as
the routed interface. DHCP clients in VLAN 6 will be served IP addresses from this DHCP address
pool.
C5(su)->set vlan create 6
C5(su)->set port vlan ge.1.1-10 6
C5(su)->router
C5(su)->router>enable
C5(su)->router#configure
Enter configuration commands:
C5(su)->router(Config)#interface vlan 6
C5(su)->router(Config-if(Vlan 6))#no shutdown
C5(su)->router(Config-if(Vlan 6))#ip address 6.6.1.1 255.255.0.0
C5(su)->router(Config-if(Vlan 6))#exit
Procedure 4-5 DHCP Server Configuration on a Routing System
Step Task Command(s)
1. Create a VLAN and add ports to the VLAN. Only
DHCP clients associated with this VLAN will be
served IP addresses from the DHCP address
pool associated with this routed interface
(VLAN).
set vlan create vlan-id
set port vlan port-string vlan-id
2. Create a routed interface for the VLAN in router
configuration mode.
interface vlan vlan-id
no shutdown
ip address ip-addr ip-mask
3. Enable DHCP server functionality in switch
mode.
set dhcp enable
4. Configure an IP address pool for dynamic IP
address assignment. Note that the pool has to
be in the same subnet as the routed interface
and use the same mask configured on the
routed interface.
Refer to “Manual IP Pool Configuration” on
page 4-21 for information about configuring a
manual pool and for additional IP address pool
configuraiton.
set dhcp pool poolname network
subnet {mask | prefix-length}
5. Optionally, limit the scope of addresses
assigned to the dynamic pool.
Remove address exclusions with the clear dhcp
exclude command.
set dhcp exclude low-ipaddr [high-
ipaddr]
clear dhcp exclude low-ipaddr [high-
ipaddr]
6. Optionally, set other DHCP server parameters. set dhcp conflict logging
set dhcp bootp {enable | disable}
set dhcp ping packets number