3

Configure DHCP Server in Juniper SRX Device

Share: Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on PinterestEmail this to someone

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

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,

  1. MustBeGeek@SRX210> show system services dhcp binding
  2. MustBeGeek@SRX210> show system services dhcp client
  3. MustBeGeek@SRX210> show system services dhcp conflict
  4. MustBeGeek@SRX210> show system services dhcp pool
  5. MustBeGeek@SRX210> show system services dhcp statistics

For information about DHCP visit Juniper website.

 

Filed in: Juniper Tags: , , ,
© 2014 MustBeGeek. All rights reserved.