Title: How to configure DHCP server on Ruijie switch via CLI? [Print this page] Author: GTAC-Sophia Time: 2022-11-17 12:34 Title: How to configure DHCP server on Ruijie switch via CLI? Step 1. Enable the DHCP feature on device
Ruijie>en
Ruijie#config ter
Ruijie(config)#service dhcp ------> This command is not enabled by default, and the switch must be configured Step 2. Create the gateway IP address of DHCP clients
Ruijie(config)#interface vlan 10
Ruijie(config-if-VLAN 10)#ip address 192.168.1.254 255.255.255.0
Ruijie(config-if-VLAN 10 )#exit Step 3. create the DHCP pool for clients in device
Ruijie(config)#ip dhcp pool vlan10
Ruijie(dhcp-config)#network 192.168.1.0 255.255.255.0
Ruijie(dhcp-config)#dns-server 218.85.157.99 ------>Configure the DNS server addresses assigned to clients
Ruijie(dhcp-config)#default-router 192.168.1.254 ------>Configure the gateway address assigned to the clients, which should be consistent with the IP address set on this switch, 192.168.1.254
Ruijie(dhcp-config)#end
Ruijie#wr
Welcome to Ruijie Community (https://community.ruijienetworks.com/)