10-06-2015 06:30 AM - edited 10-06-2015 06:44 AM
I am trying to use exclusive policy rules to check for issues, and came across the issue of checking for negotiated half duplex. I went to make an interface group, however, there was not a criteria I could see to poll for interfaces negotiating at half duplex. Is there a way to use XML to check for this, or am I stuck using only CCS?
Edit: Or is there a way to pull CCS results into XML, then evaluate the results into a pass/fail?
Solved! Go to Solution.
10-06-2015 07:15 AM
There is a report that comes with the product called 100/Half interfaces, I believe. This simply looks for 100Mb interfaces that have negotiated half duplex. You could use that or duplicate and modify it for your needs.
Is that sufficient? Or do you need this as an issue and/or policy violation?
If you need a policy, then you can use the "interfaces" method on the device object and loop through each, checking the duplex. But remember, policy violations are on a per-device basis - so you would get a single violation for a device if it had any such interfaces. Also, the typical use case for them is for configuration, not operational data.
10-06-2015 08:04 AM
I did see the report, and offered that up as a solution, however, the higher up want a single report sent out instead of several reports, so a policy violation would help immensely. Just for my own clarification, you are suggesting using the object identifier to move the object pointer from the device to the interfaces, then checking each interface for their negotiated value? Would the code look like <Expr object='interfaces'><If>statment,</If>?
10-06-2015 11:00 AM
Close, see my post on the other thread ('in-group'). If you don't want to use 'in-group', you can check it directly like you are doing here:
<Expr object='_loop_value' field='ifDuplex'/>
would have the duplex.
10-06-2015 12:09 PM
Would this return the hard set duplex, or the one it actually negotiated at? I know understand about the in-group.
10-06-2015 12:54 PM
Just a heads up, for this I had to type it as follows:
<ForEach> <Expr field='interfaces'/> <Do> <If> <Expr op='matches'> <Expr field='ifDuplex' object='_loop_value'/> <Expr value='halfDuplex'/> </Expr> <Then> <Return> <PolicyRuleFail>Message</PolicyRuleFail> </Return> <Else> <PolicyRulePass/> </Else> </If> </Do> </ForEach> </PolicyRuleLogic>
Hopefully that will save some others some fustration.