So we haven't talked about debugging yet,
because debugging is a really big deal.
When we turn debug messages on,
basically we're saying we want a live stream
of log messages from the debug level or lower
printed out to the console.
And the reason why this is a big deal
is because it is very compute intensive.
Especially on older Cisco equipment,
this used to actually like lock up
and just kill Cisco equipment. WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
and just kill Cisco equipment.
Now, obviously, you know, it's 2026
at the time that I'm recording this,
we got better CPUs, we got better RAM,
and you can obviously more safely
debug whatever it is that you're doing.
But this should always come with a warning
that you shouldn't just debug everything
out to the terminal,
or else you probably will kill your system.
There's a good chance.
So what we have is we have something
called conditional debugging,
where if only these certain parameters are met, WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
where if only these certain parameters are met,
then I want to see that printed out to the terminal.
Let's first get our head wrapped around
what debugging can do.
From the privilege mode, not in configuration mode,
if I say debug IP OSPF,
nope, didn't get everything.
And that's probably a good thing.
Why?
Because we're telling it we only want
to see specific messages that come from OSPF,
a specific function of OSPF.
So if I say debug IP OSPF and then question mark, WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
So if I say debug IP OSPF and then question mark,
what piece of OSPF do we want to debug?
I can debug things like hello messages.
That way I can just confirm,
am I sending hello messages?
Am I receiving hello messages?
When I debug IP OSPF hello messages,
now we start to see where we send
and receive hello messages.
And specifically on which interfaces,
I see gig 00, 10, and 20,
all streaming from this output here. WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
all streaming from this output here.
So this is great that I can see all this,
but what if I was really only concerned
with the OSPF process and hello adjacencies
on one or two specific interfaces,
I don't want to see them all.
Immediately, I'm getting too much information
so that I could potentially lose information
among the clutter.
And secondly, I'm consuming too many CPU cycles.
So let me do undebug all to stop debugging right there. WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
So let me do undebug all to stop debugging right there.
In fact, this is an aside for a second.
One of the pro tips that I heard from Keith,
Keith Barker, before you ever turn a debug on,
run undebug all first.
That way, when you turn debugging on
for say debug IP OSPF hello, like this,
if that does start to lock up your machine,
you can just hit the up arrow two times
to get to undebug all and press enter.
You don't have to type undebug, WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
You don't have to type undebug,
you don't have to type UN all or whatever.
You can just hit the up arrow two times
and press enter really quickly to turn debugging off.
Okay, so now I'm only interested in say,
let's say interface gig 10.
How can I set up a condition
so that it only debugs that particular thing?
It's interesting because you actually issue this command,
this configuration from privilege mode.
You don't go into configuration mode.
So if I say debug condition, WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
So if I say debug condition,
then you press question mark,
you can start to see what are the conditions
that I'm interested in.
Let's say I'm only interested in debugging things
that come in or out of a specific interface.
So I'll say interface gig 10
because I'm only interested in gig 10.
Let's just pretend that's it.
And now I have one condition set.
When I run my debug command again,
now my debug messages will be only for gig 10. WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
now my debug messages will be only for gig 10.
There it is, gig 10.
So we're receiving and sending our hello messages
on that default timer through gig 10 only.
Let's do undebug all.
Now this can be a double edged sword
because you can also very easily forget
that you put a debugging condition on here.
Then you'll go to debug something
and you'll not see anything on the terminal.
Make sure you give it a show debug conditions
and it'll show you what conditions you've had set. WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
and it'll show you what conditions you've had set.
Notice here they're numbered condition one.
That's the thing that we say here
when we're looking at these condition rules.
So when I wanna delete a condition,
I say no debug condition
and then I specify which number.
So in this case, condition one,
I wanna delete condition one, like so.
Yes, I want to proceed with that removal.
And then when I go back to debugging IP OSPF hello packets,
we start to see all the interfaces again. WEBVTT X-TIMESTAMP-MAP=MPEGTS:0,LOCAL:00:00:00.000
we start to see all the interfaces again.
Let's give it an undebug all, like so.
And that's how we can leverage conditional debugging
to get only the information that we're really interested in
without overwhelming our machine.