[Autogenerated] In the next few minutes,
we'll tackle some key elements that make network management a breeze if done,
right?
Namely managing D AC P leases and reservations.
So why bother?
Well,
imagine running out of IP S on a busy day or the same device and
getting different IP S causing all kinds of confusion.
We'll explore practical use cases where effective leased and
reservation management will save via network nightmares and
we'll do all that using PowerShell, your trustee,
psychic and efficient network management time for another demo and the
upcoming demo will dive into how to view the current status of DH CP leases
such as expiration times and client identifiers.
And you'll also learn how to refresh or release those leases when necessary.
All right.
So let's dive in and tackle DH CP lease management.
So first up, let's check out to see what the current DH CP leases are.
So I'm going to run the G DH CP server V four lease commandment and
I'm going to look for the scope ID of 192168.1 0.0.
Writing that on the DH CP server,
you can see we have one lease that is all the active
leases within the 1921681.0 scope.
So right now, we only have one.
All right.
So now let's look up a specific lease.
So in this case, for this example, we only have one lease,
but we what we can do is add the IP address parameter to this and that will
limit the scope of the leases returned only to 0.1 0.100.
This command link gives us detailed info like the mac address,
Le Lease X and so on.
It's this is specific to the 1.100.
So this kind of filters it down by that IP address.
Now let's say that I don't know.
Maybe we need to release that lease manually typically
if it will expire out if it was in a, you know,
a normal production environment.
But in this case, since we're just in a test environment,
maybe we need to release it.
I don't know.
Maybe we need to do some troubleshooting or maybe he's
freeing up some resources or whatever.
So here's how you would do that to remove.
It is pretty much just as simple as getting it,
you specify the scope id and the same IP address.
And just use the remove DH CP server V four lease command lit.
Once you run that you'll have no output.
If you don't, no error, no air is great.
Now let's check and see if that lease is gone.
See if it's gone.
I'll just simply run the G DH CP server V four lease command lit again,
specify exact same school ID and IP address,
hit enter and no output is good output.
That means that it is removed.
So it's really easy to manage DH CP leases.
And you can see there's really not a whole lot to it in this.
We've covered how to list active DH B leases.
We drilled down into a specific lease and we demonstrated
how to remove or release a lease manually.
Now, like I said, there's not a whole lot to managing leases,
but with PowerShell, you can do everything you need.
Let's shift the focus to something all need but rarely love to manage manually,
which is D eight CP reservations with PowerShell.
You can automate the process ensuring that static IP addresses for
your critical devices without breaking a sweat.
By the end of this clip,
you'll know how to manage D eight CP reservations with PowerShell,
giving you one last task to worry about in your busy day.
Ready to dive deeper in this demo.
We'll tackle reservations.
You'll learn how to use PowerShell to create new reservations.
So specific clients only get the same IP address, but that's not all.
We'll also modify existing reservations and if needed, remove them.
So let's get started implementing some DH CP reservations.
So I'm going to start first by confirming that the scope that
I wanna work with actually exists And yep,
we have the 192.168 0.1 0.0 scope.
That is the scope that we're going to be adding the reservations to.
Now, I'm going to add a DC P reservation.
Let's just say, I don't know for, it's for a printer, all that worked.
So the command,
let a DH CB server V four reservation is the command
letter that you used to add a reservation.
You specify the scope ID, which is the id,
that the reservation will be in the IP address that you would like to reserve.
And the client id, the or the,
the mac address of the client that you want the IP
address to be associated with and a, an optional description.
In this case,
I just said printer right now that the D AC P reservation is in there.
Let me see if it actually applied.
Great.
Looks like it did.
So I specified the scope id of 1.0 and it gave me all the
reservations associated with that scope and it does have the 1.60
IP address in there with the correct client id.
So it's all in the DH CP database.
All right, great.
So the reservation is there.
Now, let's just say you need to change this reservation.
Well, unfortunately, you can't directly change your reservation.
You have to remove it and create a new one.
So what first I'm gonna do is I'm gonna remove this one temporarily
and then just change it with another IP address.
So to remove it,
I can query just the exact reservation by specifying the scope id
and the exact IP address for this reservation.
And it's gonna tell me, oh, can't resolve the name parameters.
That's because probably it doesn't need the scope id.
Let's see this.
Try this out.
There we go.
We just need to specify the IP address.
So now we're only getting just that IP address for just this lease.
Now using PowerShell,
I can simply pipe this to remove the HCP server V for
reservation hit enter and it should be gone.
We run this again and y it is failed to get reservation.
I don't know why it gives me an error message, but that is OK.
We don't need a reservation.
So now the reservation is gone and then to update it,
we simply run a DH CP server V four reservation again
with a different IP address right.
There we go.
Now, I just simply change the IP address.
I hit up in up arrow a few times, change the IP address to 1.65.
And now we'll try this with 1.60 doesn't exist what you expect
and we try it with 1.65 and it does exist.
So there we go.
This wraps up the demo on creating and modifying,
well, air quotes, modifying and removing DC reservations using PowerShell.
This task really is far simpler and faster with
PowerShell rather than clicking around,
whether you're handling one reservation like we did here or dozens.