Reply

Duplex check

[ Edited ]
Authority
Posts: 27
6460     0

Hello,

   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?

 

Thank you,

Jerry

Re: Duplex check

Adviser
Posts: 353
6461     0

 

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.

 

John

 

Re: Duplex check

Authority
Posts: 27
6461     0

Mr. Belamaric,

    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>?

 

Thank you,

Jerry

Re: Duplex check

Adviser
Posts: 353
6461     0

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.

 

 

Re: Duplex check

Authority
Posts: 27
6461     0

Would this return the hard set duplex, or the one it actually negotiated at? I know understand about the in-group.

 

Thank you,

Jerry

Re: Duplex check

Adviser
Posts: 353
6461     0

The negotiated duplex.

 

Re: Duplex check

Authority
Posts: 27
6461     0

Sir,

  You are the man! Thank you.

 

Thank you,

Jerry

Re: Duplex check

Authority
Posts: 27
6461     0

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.

 

 

Thank you,

Jerry

Showing results for 
Search instead for 
Did you mean: 

Recommended for You