DHCP (Dynamic Host Configuration Protocol) has been proved to be very useful protocol. DHCP provides IP addresses to its hosts automatically. You can configure DHCP server on SRX for one or multiple VLANs. You can also configure DHCP Server in Juniper switches. Here we will setup DHCP server for one VLAN. So, lets configure DHCP Server in Juniper SRX device.
Configure DHCP Server in Juniper SRX Device
The diagram above shows the network scenario. We will configure DHCP Server in SRX 240 device. The device is connected to the internet. The EX2200 switch is connected to ge-0/0/0 interface of SRX. The ge-0/0/0 interface of SRX have the IP address of 192.168.1.1/24.
So to make the SRX device as DHCP server hit the following commands in the SRX device’s cli.
[edit] MustBeGeek@SRX210# edit system services [edit system services] MustBeGeek@SRX210# set dhcp pool 192.168.1.0/24 address-range low 192.168.1.3 [edit system services] MustBeGeek@SRX210# set dhcp pool 192.168.1.0/24 address-range high 192.168.1.20 [edit system services] MustBeGeek@SRX210# set dhcp pool 192.168.1.0/24 router 192.168.1.1 [edit system services] MustBeGeek@SRX210# set dhcp pool 192.168.1.0/24 domain-name xyz.com [edit system services] MustBeGeek@SRX210# set system services dhcp pool 192.168.1.0/24 name-server 192.168.1.2 [edit system services] MustBeGeek@SRX210# set system services dhcp pool 192.168.1.0/24 default-lease-time 3600
At last you must configure ge-0/0/0 interface to zone and allows DHCP protocol.
MustBeGeek@SRX210# set security zones security-zone untrust interfaces fe-0/0/0.0 host-inbound-traffic system-services dhcp
DHCP Server Troubleshooting
The EX2200 switch is in layer 2 domain. So the clients will obtain IP address from SRX device via DHCP Server. Other useful commands for troubleshooting DHCP Server are,
MustBeGeek@SRX210> show system services dhcp binding MustBeGeek@SRX210> show system services dhcp client MustBeGeek@SRX210> show system services dhcp conflict MustBeGeek@SRX210> show system services dhcp pool MustBeGeek@SRX210> show system services dhcp statistics
For information about DHCP visit Juniper website.
You may also like -
Latest posts by Bipin (see all)
- Install Exchange 2019 in Windows Server 2019 - November 28, 2020
- Why Backup your Microsoft Office 365 - November 27, 2020
- What’s New in VMware vSphere 7 - September 18, 2020