I'm using an EX2200-C 12T on version 14.1X53-D40.8 to lab this out.
I'm trying to figure out how to log when bpdu disables a port due to a user's accidental network loop.
* I've turned on rstp for all my interfaces except for my trunk port (ge-0/0/10).
* I also purposefully created a loop on ge-0/0/1.
This works well enough, but when I turn on traceoptions I'm barraged with these IFL 71 messages over and over which I do not want to see:
Nov 9 10:28:00.235303 STP periodic xmit on IFL 71Nov 9 10:28:02.208273 STP periodic xmit on IFL 71Nov 9 10:28:04.130240 STP periodic xmit on IFL 71Nov 9 10:28:06.011206 STP periodic xmit on IFL 71Nov 9 10:28:06.064032 STP programmed periodic xmit on IFL 77, VLAN 0 interval 2 0Nov 9 10:28:07.276071 direct_bpdu_xmit_stop_periodic, for ifl_id: 77, vlan_id: 0Nov 9 10:28:07.331020 STP stop periodic xmit to interface ge-0/0/1.0, VLAN 0Nov 9 10:28:07.847273 STP periodic xmit on IFL 71Nov 9 10:28:09.792222 STP periodic xmit on IFL 71
I've been able to determine that "IFL 71" corresponds to ge-0/0/0 which is where I have my Laptop actively plugged in.
Additionally, I see that the loop I created on ge-0/0/1 appears in the log, which is great.
To get around this I wanted to do something like: "set protocols rstp traceoptions file bpdu-log | match "stop periodic"
or something like: "set protocols rstp traceoptions file bpdu-log | except IFL", however, when I enter these commands in config mode I don't get any error, but in checking the config they don't show up either.
Does anyone have any ideas how I may be able to accomplish this, or have a better idea than what I'm trying to do?
set protocols rstp traceoptions file bpdu-logset protocols rstp traceoptions flag bpduset protocols rstp interface ge-0/0/10.0 disableset protocols rstp interface all edgeset protocols rstp bpdu-block-on-edge
set ethernet-switching-options bpdu-block disable-timeout 300
I believe you are trying to log the traceoptions without the IFL 71 messages.
However i think it may not be possible to selectively log the traceoption output. However you can achieve "not seeing those messages" while doing a show command for the repective logs.
>show log bpdu-log | except "IFL 71"
This way everything is logged and you can just see what you are looking for while analyzing them.
You can do this from the shell as well using grep to filter the relevant logs.
Hope this helps.
Thanks for the reply.
I should have mentioned this in the begining, however, I plan on getting the logs into our NMS.
The only problem with simply parsing out the log by doing a >show log bpdu-log | except "IFL 71" is it will result in giant logs as it seems that the "IFL ##" messages are going to be sent by all the PCs connected on our switches and our NMS would get bloated with all of these unwanted messages.
Is there perhaps a better way to log when a port is shutdown by rstp?
I believe the better way to log which port has shut down due to rstp would be to send the logs to the syslog server instead of sending the traceoptions. The traceoptions will send a lot of unwanted messages as well as it traces all the transactions done on all the ports related to the rstp bpdu. It would be better to use system logs to track if an interface is going down due to rstp.
Thank you for that tip.
Just getting into Junos and I didn't realize traceoption was for debug.
You're right it's better to use a syslog command to log this.
I'm still tuning the logs but I'm seeing messages like:
"ESWD_BPDU_BLOCK_ERROR_DISABLED: ge-0/0/1.0: bpdu-block disabled port" being generated when the ports are disabled so maybe matching this and sending it to the syslog server would be the solution.
Thanks for pointing me in the right direction.