DHCP is essential in most networks.
We might have a dedicated HCV server at a large office, but small offices
can benefit from a DHCP server running on a local router or switch.
And that's exactly what we're looking at here.
Running DHB server or DGP relay on a switch
for this video, we're going to use a topology shown here.
There are a few workstations connected to a switch
and a router that they should be using as their default gateway.
For the first part, we're going to configure the switch as a server.
Later on, we'll convert the switch to a DHCP relay
which forwards request to the server on the right
As you've no doubt noticed already,
all the junior switches have slightly different commands to the newer ones.
Juniper changed things up so they can keep things
consistent across all their platforms, and the HBP is no exception.
There is a legacy configuration and an extended configuration.
The associated lab allows you to try them both out.
It's likely that you'll see both in the real world.
So as we go through this video, I'll try to show you both sets
of commands side by side
The extended config requires a bit of pre-work to get started.
The first thing we need is a Layer three interface.
The simplest option is to map an IP to a VLAN on an IAB interface,
but you can use a physical interface if you want to.
Lastly, we need to enable the DHCP server on the interface we just created.
This includes creating a group for identification.
If we have multiple subnets that we want to use the for
We might create multiple groups.
Now we can work on the DHCP pool.
I think this is kind of self-explanatory, but basically we define the network
that we're using and then start an ending IP of the pool.
Notice that the extended configuration requires
us to give the IP range a name
Next, we work on configuring attributes.
The first attribute that we want to add is the IP address of the router
that the workstations will use as the default gateway
The next attribute is the DNS servers.
The conflict varies quite wildly between legacy and extended.
We should also check out that our config is working.
On the left we have a switch with legacy DHCP configuration.
On the right is extended configuration
for legacy config show system services.
DHCP bonding shows us the current leases
if we
try legacy commands on a switch with extended config, they will tell us
that DHCP is not running, which can be a confusing error
anyway.
The extended version of this command is show DHCP server binding.
Sorry, I'm just having some trouble typing this command.
There we go.
I had two of the key words back to front.
Anyway, you'll notice that the output is slightly different.
In either case, we can add the detailed keyword
to the end of the command to get more information.
For some advanced troubleshooting, we can look at the DHCP server statistics
that will show us the various DHC B messages that this, which has seen
and whether it's responded
We can change our perspective a bit
and look at our switch as a DHCP relay rather than a DHCP server.
This will pass DHCP
requests onto the server over on the right
Step one you need not be addressed
such as a villain or IAB interface as we saw earlier.
Next, we need to configure the IP of the server
that we're forwarding the boot IP messages to and the interface we're using
in the same location.
We also need to configure the interface that we're forwarding this with
and that's it much easier.
We can still get some useful troubleshooting info with show helper
statistics
A very short quiz this time.
Still worth your effort if you can spare a few minutes.
And that's how we can figure a DHB server or DHCP relay.
On a switch or router.
That's the end of part one of the video series in part two.
We're going deep into Juniper configuration,
starting with the active and candidate configuration files.
Click the video here to continue the journey.