Let’s say we need to setup a quick DHCP server on IOS and JunOS.
We’ve been tasked with configuring DHCP to give out addresses in the subnet, but only from to
We’ve also been asked to not give out as this has been hardcoded in the local fileserver. The lease time should only be 1 hour, and the default gateway should be

This is how we do it on the IOS we know and love:

 >conf t
#ip dhcp pool
#lease 0 1
#ip dhcp excluded-address
#ip dhcp excluded-address
#ip dhcp excluded-address

Now on JunOS:

> configure
# edit system service dhcp
# set default-lease-time 3600
# set router
# set pool address-range low high
# set pool exclude-address

There are extra things you can add to both, like domain name and so on, but I wanted a quick and dirty comparison between the 2. Remember that you will need an interface in the scope on either router in order for DHCP to actually work.

Let’s now say that we do have a DHCP server. This server is on another subnet, and so DHCP requests won’t get through (as they are broadcasted). Consider the following topology:

Both IOS and JunOS allows you to configure the router as a DHCP relay agent. This is how it’s done.

On IOS it’s extremely simple. All you need to do is put the following command on the interface receiving the broadcast. In this topology it’ll be the interface connected to the switch and workstation the user is on

>conf t
# int fa0
# ip helper-address

On JunOS it’s just as simple. The configuration is not put on a particular interface, rather you specify which interface will be receiving the broadcast.

> configure
# set forwarding-options helpers bootp interface em1
# set forwarding-options helpers bootp server

Nice and easy :)

© 2009-2020 Darren O'Connor All Rights Reserved -- Copyright notice by Blog Copyright