Cookbook Configuration
27
3.2.2 Configuring DHCP in CLI Mode
(1) Connect to the NBE router as shown in the following figure.
(2) Run the following commands in turn.
Ruijie>enable
Ruijie#configure terminal
Ruijie(config)#service dhcp //Enable DHCP.
Ruijie(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.10 //Retain 192.168.1.1-192.168.1.10.
Ruijie(config)#ip dhcp pool Test //Creat a DHCP pool named Test.
Ruijie(dhcp-config)#lease 0 1 0 // Set lease time, ā0 1 0ā means 0 day, 1 hour, 0 minute. The default lease
time is 24 hours.
Ruijie(dhcp-config)#network 192.168.1.0 255.255.255.0 //Configure an IP address range for the DHCP
pool.
*The following is static IP distribution in DHCP.
Ruijie(dhcp-config)# hardware-address 0026.b90b.a48a //Set the terminal MAC address to
0026.b90b.a48a.
Ruijie(dhcp-config)# host 192.168.1.150 255.255.255.0 //Configure a static IP address and mask.
*The above is static IP distribution in DHCP.
Ruijie(dhcp-config)#dns-server 192.168.58.110 8.8.8.8 //The primary DNS server address is
192.168.58.110 and the secondary IP address is 8.8.8.8.
Ruijie(dhcp-config)#default-router 192.168.1.1 //Set the router IP address.
Ruijie(dhcp-config)#end
Ruijie#write //Save the configuration.
PC
NBR device
Console port
Gi0/0
Normal cable
Console cable