Nexus 7000 XML Schema Files (xsds) and Sample XML Instances/Scripts Cisco NX-OS 5.2(1) Release

helmetpastoralSoftware and s/w Development

Dec 13, 2013 (3 years and 10 months ago)

859 views



Nexus 7000 XML Schema Files (xsds) and Sample XML Instances/Scripts


Cisco NX
-
OS 5.2(1) Release


This document provides complete set of XML schema files (.xsd) supported in
Cisco NX
-
OS
5.2(1)

release. It also includes examples of XML instances and script
s that can be
incorporated into NMS. The scripts are example scripts only. Customizations would be
required to change the output format to make it suitable for its output to be included into
NMS.


Supported XML Schema Files (.xsd)


aaa_tree.xsd



ip.xsd





rip.xsd

aclmgr.xsd



isis_fabricpath.xsd



rpm.xsd

aclqos.xsd



l3vm.xsd




satmgr.xsd

am.xsd




lcmcli.xsd




stp.xsd

arp.xsd




m2rib.xsd




svi.xsd

ascii_cfg.xsd



mcecm.xsd




tacacs_dynamic_tree.xsd

cdpd.xsd



tm.xsd

dhcp_snoop.xsd



netconf.xsd




u2rib.xsd

dot1x.xsd



nxos_common_types.xsd



udld.xsd

drap.xsd



nxos.xsd




vdc_mgr.xsd

eth_pcm_dc3.xsd

pong.xsd




vlan_mgr_cli.xsd


glbp.xsd



ppm.xsd




vshd.xsd

hsrp_engine.xsd

pvlan.xsd




xml.xsd

if_manager.xsd



radius_tree.xsd



Sample
Perl Sc
ripts using XML interface:


http://bock
-
bock.cisco.com/wiki/N7K:docs:netconf_examples



Sample XML Instances


1.

Add vlan on interface


CLI cmds:


spN7K1# conf t

Enter configuration com
mands, one per line. End with CNTL/Z.

spN7K1(config)# int e2/2

spN7K1(config
-
if)# switchport

spN7K1(config
-
if)# switchport access vlan 200

spN7K1(config
-
if)# no sh

spN7K1(config
-
if)# exit

1.1

Complete Instance

<?xml version="1.0"?>

<nf:rpc xmlns="http://www.
cisco.com/nxos:1.0:vlan_mgr_cli"
xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:if="http://www.cisco.com/nxos:1.0:if_manager" message
-
id="1">


<nf:edit
-
config>



<nf:target>




<nf:running/>



</nf:target>



<nf:config>




<if:configure>





<if:
__XML__MODE__exec_configure>






<if:interface>







<if:ethernet>








<if:interface>2/2</if:interface>








<if:__XML__MODE_if
-
ethernet>









<if:__XML__MODE_if
-
eth
-
non
-
member>










<if:switchport/>









</if:__XML__MODE_if
-
eth
-
non
-
member
>








</if:__XML__MODE_if
-
ethernet>







</if:ethernet>







</if:interface>





</if:__XML__MODE__exec_configure>




</if:configure>




<configure>





<__XML__MODE__exec_configure>






<interface>







<ethernet>








<interface>2/2</interface>








<__XML__MODE_if
-
ethernet
-
switch>









<switchport>










<access>











<vlan>












<vlan
-
id
-
access>200</vlan
-
id
-
access>











</vlan>










</access>









</switchport>








</__XML__MODE_if
-
ethernet
-
switch>







</ether
net>






</interface>





</__XML__MODE__exec_configure>




</configure>



</nf:config>


</nf:edit
-
config>

</nf:rpc>

]]>]]>



1.2

Using <exec
-
command>

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisc
o.com/nxos:1.0" message
-
id="1">


<nxos:exec
-
command>


<nxos:cmd>configure terminal ; interface ethernet 2/2 ; switchport ;
switchport access vlan 200 ; no shutdown </nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>


On success, XML response:

<?xm
l version="1.0"?>

<nf:rpc
-
reply xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns="http://www.cisco.com/nxos:1.0:
vlan_mgr_cli" message
-
id="1
">


<nf:ok/>

</nf:rpc
-
reply>

]]>]]>



2.

Delete VLAN # on interface

CLI Cmds:

spN7K1# conf t

Enter configuration

commands, one per line. End with CNTL/Z.

spN7K1(config)# interface e2/2

spN7K1(config
-
if)# no switchport access vlan 200

spN7K1(config
-
if)# no switchport

spN7K1(config
-
if)# shutdown

spN7K1(config
-
if)# exit

2.1

C
omplete instance

<
nf:rpc

xmlns:if
="
http://www
.cisco.com/nxos:1.0:if_manager
"

xmlns
="
http://www.cisco.com/nxos:1.0:vlan_mgr_cli
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
"

message
-
id
="
2
">


<
nf:edit
-
config
>



<
nf:target
>




<
nf:running
/>



</
nf:target
>



<
nf:config
>




<
configure
>





<
__XML__M
ODE__exec_configure
>






<
interface
>







<
ethernet
>








<
interface
>
2/2
</
interface
>








<
__XML__MODE_if
-
ethernet
-
switch
>









<
no
>










<
switchport
>











<
access
>












<
vlan
/>











</
access
>










</
switchport
>









</
n
o
>








</
__XML__MODE_if
-
ethernet
-
switch
>







</
ethernet
>






</
interface
>





</
__XML__MODE__exec_configure
>




</
configure
>




<
if:configure
>





<
if:__XML__MODE__exec_configure
>






<
if:interface
>







<
if:ethernet
>








<
if:interface
>
2/2
</
if:i
nterface
>








<
if:__XML__MODE_if
-
ethernet
>










<
if:__XML__MODE_if
-
ethernet
>










<
if:no
>











<
if:switchport
></
if:switchport
>




















</
if:no
>










<
if:shutdown
></
if:shutdown
>















</
if:__XML__MODE_if
-
ethernet
>








</
if:__XML__MODE_if
-
ethernet
>







</
if:ethernet
>






</
if:interface
>





</
if:__XML__MODE__exec_configure
>




</
if:configure
>



</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>

]]>]]>

2.2

Using exec
-
cmd

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml
:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="1">


<nxos:exec
-
command>


<nxos:cmd>configure terminal ; interface ethernet 2/2 ; no switchport
access vlan ; no switchport ; shutdown </nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>

]]>]]>

3.

config VPC (portchannel)

Before executing the command you need to have the feature vpc and lacp enabled, create a
vpc domain and set the peer
-
keepalive.


config terminal


interface port
-
channel2000



switchport




switchport mode trunk




vpc 2000



no shutdown



exit


interface Ethernet1/11




switchport mode trunk




channel
-
group 2000 mode active



no shutdown



exit


3.1

Complete Instance

<?xml version="1.0" encoding="UTF
-
8"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"

xmlns="http://www.cisco.com/nxos:1.0:if_manager"
xmlns:mcecm="http://www.cisco.com/nxos:1.0:mcecm"


xmlns:eth_pcm=”http://www.cisco.com/nxos:1.0:eth_pcm_dc3”

message
-
id="1">


<nf:edit
-
config>


<nf:target>


<nf:running/>


</nf:target>


<nf:c
onfig>


<configure>


<__XML__MODE__exec_configure>


<interface>


<port
-
channel>


<interface>2000</interface>


<__XML__MODE_if
-
eth
-
port
-
channel
-
switch>


<__XML__MODE_if
-
port
-
channel>



<switchport/>


</__XML__MODE_if
-
port
-
channel>


<__XML__MODE_if
-
eth
-
port
-
channel
-
switch>


<switchport>


<mode>


<__XML__BLK_Cmd_switchport_mode_ethernet_
port_mode>


<port_mode>trunk</port_mode>


</__XML__BLK_Cmd_switchport_mode_ethernet_port_mode>


</mode>


</switchport>


</__XML__MODE_if
-
eth
-
port
-
channel
-
switch>


</__XML__MODE_if
-
eth
-
port
-
channel
-
switch>


</port
-
channel>


</interface>


</__XML__MODE__exec_configure>


</configure>


<mcecm:configure>


<mcecm:__XML__MODE__exec_configure>


<mcecm:inter
face>


<mcecm:port
-
channel>


<mcecm:interface>2000</mcecm:interface>


<mcecm:__XML__MODE_if
-
eth
-
port
-
channel
-
switch>


<mcecm:vpc>


<mcecm:__XML__OPT_Cmd_vpc_vpc_num>


<
mcecm:vpc_num>2000</mcecm:vpc_num>


</mcecm:__XML__OPT_Cmd_vpc_vpc_num>


</mcecm:vpc>


</mcecm:__XML__MODE_if
-
eth
-
port
-
channel
-
switch>


</mcecm:port
-
channel>


</mcecm:interface>


</mce
cm:__XML__MODE__exec_configure>


</mcecm:configure>


<configure>


<__XML__MODE__exec_configure>


<interface>


<ethernet>


<interface>1/11</interface>


<__XML__MODE_if
-
ethernet
-
switch>



<__XML__MODE_if
-
eth
-
non
-
member>


<switchport/>


</__XML__MODE_if
-
eth
-
non
-
member>


<__XML__MODE_if
-
eth
-
l2
-
non
-
member>


<switchport>



<mode>


<__XM
L__BLK_Cmd_switchport_mode_ethernet_port_mode>


<port_mode>trunk</port_mode>


</__XML__BLK_Cmd_switchport_mode_ethernet_port_mode>


</mode>


</switchport>


</__X
ML__MODE_if
-
eth
-
l2
-
non
-
member>


</__XML__MODE_if
-
ethernet
-
switch>


</ethernet>


</interface>


</__XML__MODE__exec_configure>


</configure>


<eth_pcm:configure>


<eth_pcm:__XML__MODE__exec_configure>


<eth_pcm:interface>


<eth_pcm:ethernet>


<eth_pcm:interface>1/11</eth_pcm:interface>


<eth_pcm:__XML__MODE_if
-
ethernet
-
switch>


<eth_pcm:__XML__MODE_if
-
eth
-
base>


<eth_pcm:chann
el
-
group>


<eth_pcm:channel
-
id>






<eth_pcm:__XML__PARAM_value>
























2000



















</eth_pcm:__XML__PARAM_value>


<eth_pcm:__XML__OPT_Cmd_channel_group_id_mode_mode>



<eth_pcm:mode>








<eth_pcm:__XML__BLK_Cmd_channel_group_id_mode_active>







<eth_pcm:active/>


</eth_pcm:__XML__BLK_Cmd_channel_group_id_mode_active>



</eth_pcm:mode>


</eth_pcm:__XML__OPT_Cmd_channel_group_id_mode_mode>


</eth_pcm:channel
-
id>


</eth_pcm:channel
-
group>


</eth_pcm:__XML__MODE_if
-
eth
-
base>


</eth_pcm:__XM
L__MODE_if
-
ethernet
-
switch>


</eth_pcm:ethernet>


</eth_pcm:interface>


</eth_pcm:__XML__MODE__exec_configure>


</eth_pcm:configure>


<configure>


<__XML__MODE__exec_configure>


<interface>


<
ethernet>


<interface>1/11</interface>


<__XML__MODE_if
-
ethernet>


<__XML__MODE_if
-
eth
-
base>


<no>


<shutdown/>


</no>


</__XML__MODE_if
-
eth
-
base>


</__XML__MODE_if
-
ethernet>


</ethernet>


</interface>


</__XML__MODE__exec_configure>


</configure>


</nf:config>


</nf:edit
-
config>


</nf:rpc>

]]>]]>

3.2

Exec
-
Command Instance

<?xml version="1.0"?>

<nf:rpc xmln
s:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="3">


<nxos:exec
-
command>


<nxos:cmd>conf t ; interface port
-
channel 2000 ; switchport ; switchport

mode trunk ; vpc 200 ; no shutdown </nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>



<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="4">


<nxos:exec
-
command>


<nxos:cmd>conf t ; interface Ethernet 1/11
; switchport mode trunk ;
channel
-
group 2000 mode active ; no shutdown </nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>



4.

Delete VPC ( portchannel)


config terminal


interface Ethernet1/11




no channel
-
group 2000 mode active


no switchport mode
trunk



exit



shutdown


no interface port
-
channel2000


4.1

Complete instance


<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
1
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
"

xmlns
="
http://www.cisco.com/nxos:1.0:if_manager
"

xmlns:mcecm
="
http:
//www.cisco.com/nxos:1.0:mcecm
"

xmlns:eth_pcm
="
http://www.cisco.com/nxos:1.0:eth_pcm_dc3
">

<
nf:edit
-
config
>


<
nf:target
>



<
nf:running
></
nf:running
>


</
nf:target
>


<
nf:config
>


<
eth_pcm:configure
>



<
eth_pcm:__XML__MODE__exec_configure
>




<
eth_pcm:interfa
ce
>






<
eth_pcm:ethernet
>






<
eth_pcm:interface
>
1/11
</
eth_pcm:interface
>






<
eth_pcm:__XML__MODE_if
-
ethernet
-
switch
>






<
eth_pcm:__XML__MODE_if
-
eth
-
base
>







<
eth_pcm:no
>







<
eth_pcm:channel
-
group
>








<
eth_pcm:__XML__OPT_Cmd_channel_group_i
d_mode_channel
-
id
>








<
eth_pcm:channel
-
id
>









<
eth_pcm:__XML__PARAM_value
>
2000
</
eth_pcm:__XML__PARAM_value
>








</
eth_pcm:channel
-
id
>








</
eth_pcm:__XML__OPT_Cmd_channel_group_id_mode_channel
-
id
>







</
eth_pcm:channel
-
group
>







</
eth_p
cm:no
>






</
eth_pcm:__XML__MODE_if
-
eth
-
base
>






</
eth_pcm:__XML__MODE_if
-
ethernet
-
switch
>





</
eth_pcm:ethernet
>




</
eth_pcm:interface
>



</
eth_pcm:__XML__MODE__exec_configure
>



</
eth_pcm:configure
>




<
configure
>



<
__XML__MODE__exec_configure
>



<
interface
>




<
ethernet
>





<
interface
>
2/1
</
interface
>





<
__XML__MODE_if
-
ethernet
-
switch
>





<
__XML__MODE_if
-
eth
-
non
-
member
>





<
no
>






<
switchport
></
switchport
>





</
no
>





</
__XML__MODE_if
-
eth
-
non
-
member
>




</
__XML__MODE_if
-
ethernet
-
switch
>




</
ethernet
>



</
interface
>



</
__XML__MODE__exec_configure
>



</
configure
>



<
configure
>



<
__XML__MODE__exec_configure
>



<
interface
>




<
ethernet
>





<
interface
>
1/11
</
interface
>





<
__XML__MODE_if
-
ethernet
>





<
__XML__MODE_if
-
eth
-
base
>






<
shutdown
>
</
shutdown
>





</
__XML__MODE_if
-
eth
-
base
>





</
__XML__MODE_if
-
ethernet
>




</
ethernet
>



</
interface
>



<
no
>




<
interface
>





<
port
-
channel
>






<
interface
>
2000
</
interface
>





</
port
-
channel
>




</
interface
>



</
no
>



</
__XML__MODE__exec_configure
>



</
configure
>


</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>


]]>]]>


4.2

Exec
-
command Instance

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="3">


<nxos:exec
-
command>



<nxos:cmd>conf t ; interface ethernet 1/11 ; no channel
-
group 2000 ; no
switchport ; shutdown ; </nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>


<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" mes
sage
-
id="3">


<nxos:exec
-
command>


<nxos:cmd>conf t ; no interface port
-
channel 2000</nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>



5.

config QoS on N7K

5.1

marking


configure terminal


policy
-
map type qos untrust_dcsp


class class
-
default


set dscp 0


policy
-
map type queuing untrust_1Gport_policy


class type queuing 2q4t
-
in
-
q
-
default


set cos 0


5.1.1

Complete instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
1
"

xmlns
="
http://www.cisco.com/nxos:1.0:qosmgr
"

xmlns:nf
="
urn:ie
tf:params:xml:ns:netconf:base:1.0
">


<
nf:edit
-
config
>




<
nf:target
>




<
nf:running
/>



</
nf:target
>



<
nf:config
>




<
configure
>





<
__XML__MODE__exec_configure
>







<
policy
-
map
>







<
__XML__OPT_Cmd_policy
-
map_type
>








<
type
>









<
qos
/>








</
type
>








<
__XML__OPT_Cmd_policy
-
map_match
-
first
>









<
pmap
-
name
-
qos
>










<
__XML__PARAM_value
>
untrust_dcsp
</
__XML__PARAM_value
>










<
__XML__MODE_policy
-
map
>











<
class
>












<
class
-
default
>













<
__XML__MODE_policy
-
m
ap_class
>














<
set
>















<
__XML__BLK_Cmd_set_cos
>
















<
dscp
>

















<
__XML__OPT_Cmd_set_tunnel
>


















<
__XML__BLK_Cmd_set_dscp
-
val
>



















<
dscp
-
val
>
0
</
dscp
-
val
>


















</
__XML__BLK_Cmd_
set_dscp
-
val
>

















</
__XML__OPT_Cmd_set_tunnel
>
















</
dscp
>















</
__XML__BLK_Cmd_set_cos
>














</
set
>













</
__XML__MODE_policy
-
map_class
>












</
class
-
default
>











</
class
>










</
__XML__MODE_
policy
-
map
>









</
pmap
-
name
-
qos
>








</
__XML__OPT_Cmd_policy
-
map_match
-
first
>







</
__XML__OPT_Cmd_policy
-
map_type
>






</
policy
-
map
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
n
ame
-
que
>











<
__XML__PARAM_value
>












untrust_1Gport_policy











</
__XML__PARAM_value
>











<
__XML__MODE_policy
-
map_type_queuing
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
e
num
-
name
>
















<
cmap
-
enum
-
name
>

















2q4t
-
in
-
q
-
default
















</
cmap
-
enum
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
set
>



















<
cos
>




















<
cos
-
val
>
0
</
cos
-
val
>



















</
cos
>


















</
set
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>















</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_type_queuing
>










</
pmap
-
name
-
que
>









</
__XML__OPT_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>





<
/
__XML__MODE__exec_configure
>




</
configure
>



</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>

]]>]]>



5.1.2

Exec
-
cmd

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="4">


<nxo
s:exec
-
command>


<nxos:cmd>conf t ; policy
-
map type qos untrust_dcsp ; class class
-
default ; set dscp 0 ; policy
-
map type queuing untrust_1Gport_policy ;


class type queuing 2q4t
-
in
-
q
-
default ; set cos 0


</nxos:cmd>


</
nxos:exec
-
command>

</nf:rpc>]]>]]>

5.2

Priority and queue limit


configure terminal


class
-
map type queuing match
-
any 1p3q4t
-
out
-
pq1


match cos 5
-
7


class
-
map type queuing match
-
any 1p3q4t
-
out
-
q2


match cos 3
-
4


policy
-
map type queuing priority_queue1


class type queue 1p3q4t
-
out
-
pq1


priority


class type queue 1p3q4t
-
out
-
q2


bandwidth remaining percent 60


queue
-
limit 1 mbytes


5.2.1

Complete instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
1
"

xmlns
="
http://www.cisco.
com/nxos:1.0:qosmgr
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">


<
nf:edit
-
config
>



<
nf:target
>





<
nf:running
/>



</
nf:target
>



<
nf:config
>




<
configure
>





<
__XML__MODE__exec_configure
>






<
class
-
map
>







<
type
>








<
queuing
>









<
any_or_all
>










<
__XML__PARAM_value
>
match
-
any
</
__XML__PARAM_value
>










<
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>











<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
pq1
</
cmap
-
enum
-
name
>











<
__XML__MODE_class
-
map_type_queuing
>












<
match
>













<
cos
>














<
cos
-
list
>
5
-
7
</
cos
-
list
>













</
cos
>












</
match
>











</
__XML__MODE_class
-
map_type_queuing
>










</
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>









</
any_or_all
>








</
queuing
>







</
type
>







<
type
>








<
queuing
>









<
any_or_all
>










<
__XML__PARAM_value
>
match
-
any
</
__XML__PARAM_value
>










<
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>











<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
q2
</
cmap
-
enum
-
name
>











<
__XML__MODE_class
-
map_type_queuing
>












<
match
>













<
cos
>














<
cos
-
list
>
3
-
4
</
cos
-
list
>













</
cos
>












</
match
>











</
__XML__MODE_class
-
map_type_queuing
>










</
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>









</
any_or_all
>








</
queuing
>







</
type
>






</
class
-
map
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__PARAM_value
>
priority_queue1
</
__XML__PARAM_value
>











<
__XML__MODE_policy
-
map_type_queui
ng
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
q2
</
cmap
-
enum
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__M
ODE_policy
-
map_type_queuing_class
>


















<
priority
/>

















</
__XML__MODE_policy
-
map_type_queuing_class
>

















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
q2
</
cmap
-
enum
-
name
>
















<
__XML__OPT_Cmd_class_inser
t
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
bandwidth
>



















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>




















<
remaining
>





















<
percent
>






















<
rem
-
perc
>
60
</
rem
-
per
c
>





















</
percent
>




















</
remaining
>



















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>


















</
bandwidth
>


















<
queue
-
limit
>



















<
__XML__OPT_Cmd_queue
-
limit_cos
>




















<
__X
ML__BLK_Cmd_queue
-
limit_q
-
size
>





















<
q
-
size
>






















<
__XML__PARAM_value
>
1
</
__XML__PARAM_value
>






















<
__XML__OPT_Cmd_queue
-
limit_packets
>























<
mbytes
/>






















</
__XML__OPT_Cmd_que
ue
-
limit_packets
>





















</
q
-
size
>




















</
__XML__BLK_Cmd_queue
-
limit_q
-
size
>



















</
__XML__OPT_Cmd_queue
-
limit_cos
>


















</
queue
-
limit
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_type_queuing
>










</
pmap
-
name
-
que
>









</
__XML__O
PT_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>





</
__XML__MODE__exec_configure
>




</
configure
>



</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>

]]>]]>


5.2.2

Exec cmd

<?xml version="1.0"?>


<nf:rpc xmlns:nf="urn:ietf:params:xml:ns
:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="4">


<nxos:exec
-
command>


<nxos:cmd>configure t ;


class
-
map type queuing match
-
any 1p3q4t
-
out
-
pq1 ; match cos 5
-
7 ;
class
-
map type queuing match
-
any 1p3q4t
-
out
-
q2 ; m
atch cos 3
-
4


</nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>


<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="4">


<nxos:exec
-
command>


<nxos:cmd>con
figure t ; policy
-
map type queuing priority_queue1 ; class
type queuing 1p3q4t
-
out
-
pq1 ; priority ;


class type queuing 1p3q4t
-
out
-
q2 ; bandwidth remaining percent

60 ; queue
-
limit 1 mbytes </nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]
>


5.3

Shaping and Tail Drop


configure terminal


class
-
map type queuing match
-
any 1p3q4t
-
out
-
pq1


match cos 5
-
7


class
-
map type queuing match
-
any 1p3q4t
-
out
-
q2


match cos 3
-
4


policy
-
map type queuing shape_dt


class type queue 1p3q4t
-
out
-
pq1



shape percent 50


queue
-
limit cos 5 percent 10


queue
-
limit cos 6 percent 10


class type queue 1p3q4t
-
out
-
q2


shape percent 25


queue
-
limit cos 4 percent 15


5.3.1

Complete instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
1
"

xmlns
="
http://www.cisco.com/nxos:1.0:qosmgr
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">


<
nf:edit
-
config
>



<
nf:target
>




<
nf:running
/>



</
nf:target
>



<
nf:config
>





<
configure
>





<
__XML__MODE__exec_configure
>






<
class
-
map
>







<
t
ype
>








<
queuing
>









<
any_or_all
>










<
__XML__PARAM_value
>
match
-
any
</
__XML__PARAM_value
>










<
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>











<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
pq1
</
cmap
-
enum
-
name
>











<
__XML__MODE_class
-
map_type_queuin
g
>












<
match
>













<
cos
>














<
cos
-
list
>
5
-
7
</
cos
-
list
>













</
cos
>












</
match
>











</
__XML__MODE_class
-
map_type_queuing
>










</
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>









</
any_or_all
>








</
queuing
>







</
type
>







<
type
>








<
queuing
>









<
any_or_all
>










<
__XML__PARAM_value
>
match
-
any
</
__XML__PARAM_value
>










<
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>











<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
q2
</
cmap
-
enum
-
name
>











<
__XML__MODE
_class
-
map_type_queuing
>












<
match
>













<
cos
>














<
cos
-
list
>
3
-
4
</
cos
-
list
>













</
cos
>












</
match
>











</
__XML__MODE_class
-
map_type_queuing
>










</
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>









</
any_or_
all
>








</
queuing
>







</
type
>






</
class
-
map
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__PARAM_value
>
shape_dt
</
__XML__PARAM_value
>











<
__XML__MO
DE_policy
-
map_type_queuing
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
pq1
</
cmap
-
enum
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
shape
>



















<
__XML__OPT_Cmd_shape_average
>




















<
__XML__BLK_Cmd_shape_avg
-
rate
>





















<
percent
>






















<
percentage
>
50
</
perc
entage
>






















</
percent
>




















</
__XML__BLK_Cmd_shape_avg
-
rate
>



















</
__XML__OPT_Cmd_shape_average
>


















</
shape
>


















<
queue
-
limit
>



















<
__XML__OPT_Cmd_queue
-
limit_cos
>




















<
cos
>





















<
cos
-
val
>
5
</
cos
-
val
>




















</
cos
>




















<
__XML__BLK_Cmd_queue
-
limit_q
-
size
>





















<
percent
>






















<
perc
-
q
-
size
>
10
</
perc
-
q
-
size
>





















</
percent
>




















</
__XML__BLK_Cmd_queue
-
limit_q
-
size
>



















</
__XML__OPT_Cmd_queue
-
limit_cos
>


















</
queue
-
limit
>


















<
queue
-
limit
>



















<
__XML__OPT_Cmd_queue
-
limit_cos
>




















<
cos
>





















<
cos
-
val
>
6
</
cos
-
val
>




















</
cos
>




















<
__XML__BLK_Cmd_queue
-
limit_q
-
size
>





















<
percent
>






















<
perc
-
q
-
size
>
10
</
perc
-
q
-
size
>





















</
percent
>




















</
__XML__BLK_Cmd
_queue
-
limit_q
-
size
>



















</
__XML__OPT_Cmd_queue
-
limit_cos
>


















</
queue
-
limit
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_
cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
q2
</
cmap
-
enum
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
shape
>



















<
__XML__OPT_Cmd_shape_average
>




















<
__XML__BLK_Cmd_shape_avg
-
rate
>





















<
percent
>






















<
percentage
>
25
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_shape_avg
-
rate
>



















</
__XML__OPT_Cmd_shape_average
>


















</
shape
>


















<
queue
-
limit
>



















<
__XML__OPT_Cmd_queue
-
limit_cos
>




















<
cos
>





















<
cos
-
val
>
4
</
cos
-
val
>




















</
cos
>




















<
__XML__BLK_Cmd_queue
-
limit_q
-
size
>





















<
percent
>























<
perc
-
q
-
size
>
1
5
</
perc
-
q
-
size
>





















</
percent
>




















</
__XML__BLK_Cmd_queue
-
limit_q
-
size
>



















</
__XML__OPT_Cmd_queue
-
limit_cos
>


















</
queue
-
limit
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_type_queuing
>










</
pmap
-
name
-
que
>









</
__XML__OP
T_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>





</
__XML__MODE__exec_configure
>




</
configure
>



</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>

]]>]]>

5.3.2

Exec cmd

Type the commands inside of the <exec
-
command> tag. Notice the
limit on 255 characters
there.

5.4

Bandwidth and WRED


configure terminal


class
-
map type queuing match
-
any 1p3q4t
-
out
-
pq1


match cos 5
-
7


class
-
map type queuing match
-
any 1p3q4t
-
out
-
q2


match cos 3
-
4


policy
-
map type queuing bandwidth_wred


class
type queuing 1p3q4t
-
out
-
pq1


bandwidth percent 50


random
-
detect cosbased


random
-
detect cos 5 minimum
-
threshold percent 10 maximum
-
threshold percent 30


random
-
detect cos 6 minimum
-
threshold percent 40 maximum
-
threshold percent 60


class type queuing 1p3q4t
-
out
-
q2


bandwidth percent 25


random
-
detect cos
-
based


random
-
detect cos 4 minimum
-
threshold percent 20 maximum
-
threshold percent 40

5.4.1

Complete Instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
1
"

xm
lns
="
http://www.cisco.com/nxos:1.0:qosmgr
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">



<
nf:edit
-
config
>



<
nf:target
>




<
nf:running
/>



</
nf:target
>



<
nf:config
>




<
configure
>





<
__XML__MODE__exec_configure
>






<
class
-
map
>







<
type
>








<
queuing
>









<
any_or_all
>










<
__XML__PARAM_value
>
match
-
any
</
__XML__PARAM_value
>










<
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>











<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
pq1
</
cmap
-
enum
-
name
>











<
__XML__MODE_class
-
map_type_queuing
>












<
match
>













<
cos
>














<
cos
-
list
>
5
-
7
</
cos
-
list
>













</
cos
>












</
match
>











</
__XML__MODE_class
-
map_type_queuing
>










</
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>









</
any_or_all
>








</
queuing
>







</
type
>







<
type
>








<
queuing
>









<
any_or_all
>










<
__XML__PARAM_value
>
match
-
any
</
__XML__PARAM_value
>










<
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>











<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
q2
</
cmap
-
enum
-
name
>











<
__XML__MODE_class
-
ma
p_type_queuing
>












<
match
>













<
cos
>














<
cos
-
list
>
3
-
4
</
cos
-
list
>













</
cos
>












</
match
>











</
__XML__MODE_class
-
map_type_queuing
>










</
__XML__BLK_Cmd_class
-
map_cmap
-
enum
-
name
>









</
any_or_all
>








</
queuing
>







</
type
>






</
class
-
map
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__PARAM_value
>
bandwidth_wred
</
__XML__PARAM_value
>











<
__XML__MODE_
policy
-
map_type_queuing
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
pq1
</
cmap
-
enum
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>



















<
bandwidth
>



















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>




















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>





















<
percent
>






















<
percentag
e
>
50
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>



















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>


















</
bandwidth
>


















<
random
-
detect
>



















<
cos
-
based
/>


















</
random
-
detect
>


















<
random
-
detect
>



















<
cos
>




















<
cos
-
list
>





















<
__XML__PARAM_value
>
5
</
__XML__PARAM_value
>





















<
__XML__OPT_Cmd_random
-
detect_minimum
-
threshold
>






















<
minimum
-
threshold
/>






















<
__XML__BLK_Cmd_random
-
detect_min
-
thresh
>























<
percent
>
























<
min
-
percent
-
of
-
qsize
>
10
</
min
-
percent
-
of
-
qsize
>























</
percent
>























<
__XML__OPT_Cmd_random
-
detect_maximum
-
threshold
>
























<
__XML__BLK_Cmd_random
-
detect_max
-
thresh
>

























<
percent1
>


























<
max
-
percent
-
of
-
qsize
>
30
</
max
-
percent
-
of
-
qsize
>

























</
percen
t1
>
























</
__XML__BLK_Cmd_random
-
detect_max
-
thresh
>























</
__XML__OPT_Cmd_random
-
detect_maximum
-
threshold
>






















</
__XML__BLK_Cmd_random
-
detect_min
-
thresh
>





















</
__XML__OPT_Cmd_random
-
detect
_minimum
-
threshold
>




















</
cos
-
list
>



















</
cos
>


















</
random
-
detect
>


















<
random
-
detect
>



















<
cos
>




















<
cos
-
list
>





















<
__XML__PARAM_value
>
6
</
__XML__PARAM_val
ue
>





















<
__XML__OPT_Cmd_random
-
detect_minimum
-
threshold
>






















<
minimum
-
threshold
/>






















<
__XML__BLK_Cmd_random
-
detect_min
-
thresh
>























<
percent
>
























<
min
-
percent
-
of
-
qsize
>
4
0
</
min
-
percent
-
of
-
qsize
>























</
percent
>























<
__XML__OPT_Cmd_random
-
detect_maximum
-
threshold
>
























<
__XML__BLK_Cmd_random
-
detect_max
-
thresh
>

























<
percent1
>


























<
m
ax
-
percent
-
of
-
qsize
>
60
</
max
-
percent
-
of
-
qsize
>

























</
percent1
>
























</
__XML__BLK_Cmd_random
-
detect_max
-
thresh
>























</
__XML__OPT_Cmd_random
-
detect_maximum
-
threshold
>






















</
__XML__BLK_Cm
d_random
-
detect_min
-
thresh
>





















</
__XML__OPT_Cmd_random
-
detect_minimum
-
threshold
>




















</
cos
-
list
>



















</
cos
>


















</
random
-
detect
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>

















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_cl
ass_cmap
-
enum
-
name
>
















<
cmap
-
enum
-
name
>
1p3q4t
-
out
-
q2
</
cmap
-
enum
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
bandwidth
>



















<
__XML__BLK_Cmd
_bandwidth_bw
-
value
>




















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>





















<
percent
>






















<
percentage
>
25
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>



















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>


















</
bandwidth
>


















<
random
-
detect
>



















<
cos
-
based
/>


















</
random
-
detect
>


















<
random
-
detect
>



















<
cos
>




















<
cos
-
list
>





















<
__XML__PARAM_value
>
4
</
__XML__PARAM_value
>





















<
__XML__OPT_Cmd_random
-
detect_minimum
-
threshold
>






















<
minimum
-
threshold
/>






















<
__XML__BLK_Cmd_random
-
detect_min
-
thresh
>























<
percent
>
























<
min
-
percent
-
of
-
qsize
>
20
</
min
-
percent
-
of
-
qsize
>























</
percent
>























<
__XML__OPT_Cmd_random
-
detect_maximum
-
threshold
>
























<
__XML__BLK_Cmd_random
-
detect_max
-
thresh
>

























<
percent1
>


























<
max
-
percent
-
of
-
qsize
>
40
</
max
-
percent
-
of
-
qsize
>

























</
percent1
>
























</
__XML__BLK_Cmd_random
-
detect_max
-
thresh
>























</
__XML__OPT_Cmd_random
-
det
ect_maximum
-
threshold
>






















</
__XML__BLK_Cmd_random
-
detect_min
-
thresh
>





















</
__XML__OPT_Cmd_random
-
detect_minimum
-
threshold
>




















</
cos
-
list
>



















</
cos
>


















</
random
-
detect
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map
_type_queuing
>










</
pmap
-
name
-
que
>









</
__XML__OPT_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>







</
policy
-
map
>





</
__XML__MODE__exec_configure
>




</
configure
>



</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>

]]>]]>



6.

F1 QOS

6.1

Ingr
ess Queuing Policy


policy
-
map type queuing p
-
4que
-
7e
-
drop
-
in


class type queuing 4q4t
-
7e
-
in
-
q1


queue
-
limit percent 45


bandwidth percent 25


class type queuing 4q4t
-
7e
-
in
-
q2


queue
-
limit percent 10


bandwidth percent 25

policy
-
map type que
uing p
-
4que
-
7e
-
in


class type queuing c
-
4q
-
7e
-
drop
-
in


service
-
policy type queuing p
-
4que
-
7e
-
drop
-
in


queue
-
limit percent 70

6.1.1

Complete Instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
1
"

xmlns
="
http://www.cisco.com/nxos:1.0:qosmgr
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">


<
nf:edit
-
config
>



<
nf:target
>




<
nf:running
/>



</
nf:target
>



<
nf:config
>




<
configure
>





<
__XML__MODE__exec_configure
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__XML__OPT_Cmd_pol
icy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__PARAM_value
>
p
-
4que
-
7e
-
drop
-
in
</
__XML__PARAM_value
>











<
__XML__MODE_policy
-
map_type_queuing
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_c
lass_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
4q4t
-
7e
-
in
-
q1
</
cmap
-
dce
-
name
>




























<
__XML__OPT_Cmd_class_insert
-
before
>


















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
queue
-
limit
>



















<
_
_XML__OPT_Cmd_queue
-
limit_cos
>




















<
__XML__BLK_Cmd_queue
-
limit_q
-
size
>





















<
percent
>






















<
perc
-
q
-
size
>
45
</
perc
-
q
-
size
>





















</
percent
>




















</
__XML__BLK_Cmd_queue
-
limit_q
-
size
>



















</
__XML__OPT_Cmd_queue
-
limit_cos
>


















</
queue
-
limit
>


















<
bandwidth
>



















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>




















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>





















<
percent
>






















<
percentage
>
25
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>



















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>


















</
bandwidth
>

















</
__XML__MODE_policy
-
map_
type_queuing_class
>

















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
4q4t
-
7e
-
in
-
q2
</
cmap
-
dce
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
queue
-
limit
>



















<
__XML__OPT_Cmd_queue
-
limit_cos
>




















<
__XML__BLK_Cmd_queue
-
limit_q
-
size
>





















<
percent
>






















<
perc
-
q
-
size
>
10
</
perc
-
q
-
size
>





















</
percent
>




















</
__XML__BLK_Cmd_queue
-
l
imit_q
-
size
>



















</
__XML__OPT_Cmd_queue
-
limit_cos
>


















</
queue
-
limit
>


















<
bandwidth
>



















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>




















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>





















<
percent
>






















<
percentage
>
25
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>



















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>


















</
bandwidth
>

















</
__XML__M
ODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_type_queuing
>











</
pmap
-
name
-
que
>









</
__XML__OPT_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__PARAM_value
>
p
-
4que
-
7e
-
in
</
__XML__PARAM_value
>











<
__XML__MODE_policy
-
map_type_queuing
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
c
-
4q
-
7e
-
drop
-
in
</
cmap
-
dce
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>
















<
__XML__MODE_policy
-
map_type_queuing_class
>

















<
service
-
policy
>


















<
type
>



















<
queuing
>




















<
pmap
-
name
>
p
-
4que
-
7e
-
drop
-
in
</
pmap
-
name
>



















</
queuing
>


















</
type
>

















</
service
-
policy
>

















<
queue
-
limit
>


















<
__XML__OPT_Cmd_queue
-
limit_cos
>



















<
__XML__BLK_Cmd_queue
-
limit_q
-
size
>




















<
percent
>





















<
perc
-
q
-
size
>
70
</
perc
-
q
-
size
>




















</
percent
>



















</
__XML__BLK_Cmd_queue
-
limit_q
-
size
>


















</
__XML__OPT_Cmd_queue
-
limit_cos
>

















</
queue
-
limit
>
















</
__XML__
MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_type_queuing
>










</
pmap
-
name
-
que
>

















</
__XML__OPT_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>





</
__XML__MODE__exec_configure
>




</
configure
>



</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>

]]>]]>


6.1.2

Exec cmd

Type the com
mands inside of the <exec
-
command> tag. Notice the limit on 255 characters
there.

6.2

Egress Queuing Policy


policy
-
map type queuing p
-
4que
-
6e
-
drop
-
out


class type queuing 1q3p1t
-
6e
-
out
-
pq1


priority level 1


shape average percent 50


class type queui
ng 1q3p1t
-
6e
-
out
-
q4


bandwidth remaining percent 100

policy
-
map type queuing p
-
4que
-
6e
-
ndrop
-
out


class type queuing 1q3p1t
-
6e
-
out
-
pq2


priority level 1


shape average percent 50


class type queuing 1q3p1t
-
6e
-
out
-
pq3


priority level 2

polic
y
-
map type queuing p
-
4que
-
6e
-
out


class type queuing c
-
4q
-
6e
-
drop
-
out


service
-
policy type queuing p
-
4que
-
6e
-
drop
-
out


bandwidth percent 70


6.2.1

Complete Instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
1
"

xmlns
="
http://www.cisco.com
/nxos:1.0:qosmgr
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">


<
nf:edit
-
config
>



<
nf:target
>




<
nf:running
/>



</
nf:target
>



<
nf:config
>




<
configure
>





<
__XML__MODE__exec_configure
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__
XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__PARAM_value
>
p
-
4que
-
6e
-
drop
-
out
</
__XML__PARAM_value
>











<
__XML__MODE_policy
-
map_type_queuing
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
1q3p1t
-
6e
-
out
-
pq1
</
cmap
-
dce
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
priority
>




















<
__XML__OPT_Cmd_priority_level
>




















<
level
>





















<
value
>
1
</
value
>




















</
level
>



















</
__XML__OPT_Cmd_priority_level
>


















</
priority
>


















<
shape
>



















<
__XM
L__OPT_Cmd_shape_average
>




















<
average
/>




















<
__XML__BLK_Cmd_shape_avg
-
rate
>





















<
percent
>






















<
percentage
>
50
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_sha
pe_avg
-
rate
>



















</
__XML__OPT_Cmd_shape_average
>


















</
shape
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
1q3p1t
-
6e
-
out
-
q4
</
cmap
-
dce
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
bandwidth
>



















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>




















<
remaining
>





















<
percent
>






















<
rem
-
perc
>
100
</
rem
-
perc
>





















</
percent
>




















</
remaining
>



















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>


















</
bandwidth
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_type_queuing
>










</
pmap
-
name
-
que
>









</
__XML__OPT_Cmd_pol
icy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>






<
policy
-
map
>







<
type
>








<
queuing
>









<
__XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__PARAM_value
>
p
-
4que
-
6e
-
ndrop
-
out
</
__XML__PARAM
_value
>











<
__XML__MODE_policy
-
map_type_queuing
>













<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
1q3p1t
-
6e
-
out
-
pq2
</
cmap
-
dce
-
name
>
















<
__XML__
OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
priority
>



















<
__XML__OPT_Cmd_priority_level
>




















<
level
>





















<
value
>
1
</
value
>




















</
leve
l
>



















</
__XML__OPT_Cmd_priority_level
>


















</
priority
>


















<
shape
>



















<
__XML__OPT_Cmd_shape_average
>




















<
average
/>




















<
__XML__BLK_Cmd_shape_avg
-
rate
>





















<
percent
>






















<
percentage
>
50
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_shape_avg
-
rate
>



















</
__XML__OPT_Cmd_shape_average
>


















</
shape
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
1q3p1t
-
6e
-
out
-
pq3
</
cmap
-
dce
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
priority
>



















<
__XML__OPT_Cmd_priority_level
>




















<
level
>





















<
value
>
2
</
value
>




















</
level
>



















</
__XML__OPT_Cmd_priority_level
>


















</
priority
>

















</
__XML__MODE_poli
cy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_type_queuing
>










<
/
pmap
-
name
-
que
>









</
__XML__OPT_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>






<
policy
-
map
>








<
type
>








<
queuing
>









<
__XML__OPT_Cmd_policy
-
map_match
-
first
>










<
pmap
-
name
-
que
>











<
__XML__P
ARAM_value
>
p
-
4que
-
6e
-
out
</
__XML__PARAM_value
>











<
__XML__MODE_policy
-
map_type_queuing
>












<
class
>













<
type
>














<
queuing
>















<
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>
















<
cmap
-
dce
-
name
>
c
-
4q
-
6e
-
drop
-
out
</
cmap
-
dce
-
name
>
















<
__XML__OPT_Cmd_class_insert
-
before
>

















<
__XML__MODE_policy
-
map_type_queuing_class
>


















<
service
-
policy
>



















<
type
>




















<
queuing
>





















<
pmap
-
name
>
p
-
4que
-
6e
-
drop
-
out
</
pmap
-
name
>




















</
queuing
>



















</
type
>


















</
service
-
policy
>


















<
bandwidth
>



















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>




















<
__XML__BLK_Cmd_bandwidth_bw
-
value
>





















<
percent
>






















<
percentage
>
70
</
percentage
>





















</
percent
>




















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>



















</
__XML__BLK_Cmd_bandwidth_bw
-
value
>


















</
bandwidth
>

















</
__XML__MODE_policy
-
map_type_queuing_class
>
















</
__XML__OPT_Cmd_class_insert
-
before
>















</
__XML__BLK_Cmd_class_cmap
-
enum
-
name
>














</
queuing
>













</
type
>












</
class
>











</
__XML__MODE_policy
-
map_t
ype_queuing
>










</
pmap
-
name
-
que
>









</
__XML__OPT_Cmd_policy
-
map_match
-
first
>








</
queuing
>







</
type
>






</
policy
-
map
>





</
__XML__MODE__exec_configure
>




</
configure
>



</
nf:config
>


</
nf:edit
-
config
>

</
nf:rpc
>

]]>]]>

6.2.2

Exec cmd

Type t
he commands inside of the <exec
-
command> tag. Notice the limit on 255 characters
there.



7.

Show commands

7.1


Show N7K MAC table



show mac address
-
table.

7.1.1

Complete instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
4
"
xmlns
="
http://www.cisco.co
m/nxos:1.0:l2fm
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">


<
nf:get
>



<
nf:filter

type
="
subtree
">




<
show
>





<
mac
>






<
address
-
table
/>





</
mac
>




</
show
>



</
nf:filter
>


</
nf:get
>

</
nf:rpc
>

]]>]]>

7.1.2

<exec
-
cmd> instance

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="110">


<nxos:exec
-
command>


<nxos:cmd> show
mac address
-
table

</nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>

]]>]]>

7.2


Show N7K ARP tab
le



show ip arp

7.2.1

Complete Instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="1"

xmlns
="
http://www.cisco.com/nxos:1.0:arp
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">


<
nf:get
>



<
nf:filter

type
="
subtree
">




<
show
>





<
ip
>






<
a
rp
></
arp
>





</
ip
>




</
show
>



</
nf:filter
>


</
nf:get
>

</
nf:rpc
>

]]>]]>


7.2.2

Exec
-
cmd Instance


<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="110">


<nxos:exec
-
comman
d>


<nxos:cmd>
show ip arp

</nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>

]]>]]>


7.3


Show ip route table



show ip route


7.3.1

Complete Instance

<?xml version="1.0" encoding="UTF
-
8"?>

<
nf:rpc

message
-
id
="
3
"
xmlns
="
http://www.cisco.com/nxos:1.0:urib
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">

<
nf:get
>


<
nf:filter

type
="
subtree
">



<
show
>




<
ip
>





<
route
/>




</
ip
>



</
show
>


</
nf:filter
>

</
nf:get
>

</
nf:rpc
>

]]>]]>

7.3.2

Exec
-
cmd Instance

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netc
onf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="110">


<nxos:exec
-
command>


<nxos:cmd>
show ip route
</nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>

]]>]]>


7.4


Show N7K MAC table usage


show hardware capacity forwarding | end Netf
low

7.4.1

Complete Instance

<?xml version="1.0" encoding="UTF
-
8"?>


<
nf:rpc

message
-
id
="
2
"

xmlns
="
http://www.cisco.com/nxos:1.0:syscli
"

xmlns:nf
="
urn:ietf:params:xml:ns:netconf:base:1.0
">


<
nf:get
>



<
nf:filter

type
="
subtree
">




<
show
>





<
hardware
>






<
capac
ity
>







<
forwarding
/>






</
capacity
>





</
hardware
>




</
show
>



</
nf:filter
>


</
nf:get
>

</
nf:rpc
>

]]>]]>


7.4.2

Exec
-
cmd Instance

<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" m
essage
-
id="110">


<nxos:exec
-
command>


<nxos:cmd>
show hardware capacity forwarding

</nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>

]]>]]>


7.5

Show config


copy startup
-
config tftp://10.1.1.1 vrf management



8.

Copy startup config


copy startup
-
config tf
tp://10.1.1.1 vrf management


<?xml version="1.0"?>

<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0" message
-
id="4">


<nxos:exec
-
command>


<nxos:cmd>copy startup
-
config tftp://
10.1.1.1
vrf manage
ment </nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>

9.

Copy running
-
config to startup
-
config


copy running
-
config startup
-
config


<?xml version="1.0"?>


<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nxos="http://www.cisco.com/nxos:1.0"

message
-
id="4">


<nxos:exec
-
command>


<nxos:cmd>copy running
-
config startup
-
config</nxos:cmd>


</nxos:exec
-
command>

</nf:rpc>]]>]]>



Sample Scripts


1.
show_fabric_utilization.pl

Provides a dump of the fabric (crossbar) utilization of a Nexus
7000 system. This is an
example script only. Customizations would be required to change the output format such to
make it suitable for its output to be incorporated into a NMS.


$ ./show_fabric_utilization.pl

usage: ./show_fabric_utilization.pl (switch) (
user) (pass)

$ ./show_fabric_utilization.pl ltd
-
n7010
-
1.cisco.com user password

logging into switch ltd
-
n7010
-
1.cisco.com as admin

sending password

netconf session 15544 established

got

< nc:rpc
-
reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xml
ns="http://www.cisco.com/nxos:1.0:xbm_dbgwrap" message
-
id="101">


< nc:data>
-----------------------------------------------------------------
-----

Fabric Planes:

A
--

Unicast fabric interface

B
--

Multicast/Multidestination fabric interface

------------
----------------------------------------------------------

I/O Fabric Fabric Fabric Fabric

Slot Mod Instance Channel ID Plane Direction Utilization

----------------------------------------------------------------------

1 1

1 5 A ingress 0%

1 1 1 5 A egress 0%

..

6 5 1 7 B ingress 0%

6 5 1 7 B egress 0%


< /nc:data>

<
/nc:rpc
-
reply>




2.

show_fabric_utilization_using_cli.pl

Script provides fabric (crossbar) utilization in a format that is suitable for input directly
into a NMS, MRTG, Cricket etc.


The script uses CLI to pull the information, preferably using
a predefined
user with RBAC limiting them to specific CLI show commands.


it makes use of
SSH command calling in NX
-
OS and provides the data in a comma
-
seperated format.



$ ./show_fabric_utilization_cli.pl

usage: ./show_fabric_utilization_cli.pl (switch) (username)

$ .
/show_fabric_utilization_cli.pl ltd
-
n7010
-
1.cisco.com nmsuser

# io_slot, fabric_module, fabric_instance, fabric_channel, fabric_plane,
direction, utilization

1,1,5,A,ingress,0,0

1,1,5,A,egress,0,0

1,1,5,B,ingress,0,0

1,1,5,B,egress,0,0

...

5,1,7,B,ingress
,0,0

5,1,7,B,egress,0,0



3.

show_ip_arp.pl

Provides ability to collect ARP (adjacency) table for a given VRF from a script/NMS.


Makes
use of NetConf/XML to collect the data (faster/more scaleable than SNMP GETs ever could
be), can be used to collect in an a
utomated fashion using a preshared SSH key on a limited
user on the switch with RBAC restricting that user to "show ip arp".


$ ./show_ip_arp.pl

usage: ./show_ip_arp.pl (switch) (user) (pass) (vrf)


$ ./show_ip_arp.pl ltd
-
n7010
-
1.cisco.com nmsuser passwor
d management

logging into switch ltd
-
n7010
-
1.cisco.com as nmsuser

sending password

netconf session 15844 established

found 3 adjacencies in management vrf


row 0 key ip
-
addr
-
out value 10.67.16.1


row 0 key time
-
stamp value 00:11:25


row 0 key mac value
0004.9b7f.d40a


row 1 key intf
-
out value mgmt0


row 1 key ip
-
addr
-
out value 10.67.16.12


row 1 key time
-
stamp value 00:05:03


row 1 key mac value 001e.c9b4.e670


row 2 key intf
-
out value mgmt0


$ ./show_ip_arp.pl ltd
-
n7010
-
1.cisco.com nmsuser password

default

logging into switch ltd
-
n7010
-
1.cisco.com as nmsuser

sending password

netconf session 15859 established

found 2 adjacencies in default vrf


row 0 key ip
-
addr
-
out value 10.67.16.1


row 0 key time
-
stamp value 00:00:05


row 0 key incomplete value
TRUE


row 1 key intf
-
out value Vlan1




4.

show_mac_table.pl

Provides a dump of the entire MAC (L2) table within a switch.


This makes use of
XML/NetConf to collect the data, far more scaleable (and faster) than multiple SNMP GETs
in a BRIDGE
-
MIB fdb table du
mp.


Intent is that this could be collected by a NMS using this
script and stored.


It is intended that the script could login to a switch using a predefined
user with RBAC limiting that user to "show mac address
-
table" CLI command.


$ ./show_mac_table.pl

usage: ./show_mac_table.pl (switch) (user) (pass)


$ ./show_mac_table.pl ltd
-
n7010
-
1.cisco.com nmsuser password

logging into switch ltd
-
n7010
-
1.cisco.com as nmsuser

sending password

netconf session 16022 established

found 2 mac addresses

0022.5579.3f41

st
atic

sup
-
eth1(R)

0022.5579.3f41

static

sup
-
eth1(R)



5.

xml_routing.pl

Sample script providing an example of how to use XML/Netconf to pull down the routing
table using NetConf.


The output is the raw XML/Netconf from the query.


This script is
intended simpl
y as a Netconf/XML demonstration, in order to make use of the data, one
would need to parse the XML returned.


./xml_routing.pl

usage: ./xml_routing.pl (switch) (user) (pass)


$ ./xml_routing.pl ltd
-
n7010
-
1.cisco.com nmsuser password

logging into switch l
td
-
n7010
-
1.cisco.com as nmsuser

sending password

netconf session 16177 established

<?xml version="1.0" encoding="ISO
-
8859
-
1"?>

<nc:rpc
-
reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns="http://www.cisco.com/nxos:1.0:urib" message
-
id="101">


<n
c:data>



<show>



<routing>



<__XML__OPT_Cmd_urib_show_routing_command_vrf>



<__XML__OPT_Cmd_urib_show_routing_command_ip>



<__XML__OPT_Cmd_urib_show_routing_command_unicast>



<__XML__OPT_Cmd_urib_show_routing_command_ip
-
addr>



<
__XML__OPT_Cmd_urib_show_routing_command_next
-
hop>



<__XML__OPT_Cmd_urib_show_routing_command_summary>



<__XML__OPT_Cmd_urib_show_routing_command_vrf>




<__XML__OPT_Cmd_urib_show_routing_command___readonly__>



<__readon
ly__>



<TABLE_vrf>



<ROW_vrf>



<vrf
-
name
-
out>default</vrf
-
name
-
out>



<TABLE_addrf>



<ROW_addrf>



<addrf>1</addrf>



<TABLE_prefix>



<ROW_pre
fix>



<ipprefix>0.0.0.0/0</ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>FALSE</attached>



<TABLE_path>



<ROW_pa
th>



<ubest>TRUE</ubest>



</ROW_path>



<ROW_path>



<ipnexthop>10.67.16.1</ipnexthop>



<ifname>Vlan1</ifname>



<uptime>83711</uptime>




<pref>1</pref>



<metric>0</metric>



<clientname>static</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>




<ipprefix>0.0.0.0/32</ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>FALSE</attached>



<TABLE_path>



<ROW_path>




<ubest>TRUE</ubest>



</ROW_path>



<ROW_path>



<ifname>Null0</ifname>



<uptime>83714</uptime>



<pref>220</pref>



<metric>0
</metric>



<clientname>local</clientname>



<type>discard</type>



</ROW_path>



</TABLE_path>




</ROW_prefix>



<ROW_prefix>



<ippr
efix>1.1.1.3/32</ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>FALSE</attached>



<TABLE_path>



<ROW_path>



<ub
est>TRUE</ubest>



</ROW_path>



<ROW_path>



<ipnexthop>10.67.16.1</ipnexthop>



<ifname>Vlan1</ifname>



<uptime>83711</uptime>



<pref>1</pre
f>



<metric>0</metric>



<clientname>static</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>2.3
.4.5/32</ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>FALSE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE
</ubest>



</ROW_path>



<ROW_path>



<ipnexthop>10.67.16.1</ipnexthop>



<ifname>Vlan1</ifname>



<uptime>83711</uptime>



<pref>1</pref>




<metric>0</metric>



<clientname>static</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>3.4.5.4/30<
/ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>TRUE</attached>



<TABLE_path>



<ROW_path>




<ubest>TRUE</ubest>



</ROW_path>



<ROW_path>



<ipnexthop>3.4.5.6</ipnexthop>



<ifname>loopback0</ifname>



<uptime>83714</uptime>



<pref>0</pref>




<metric>0</metric>



<clientname>direct</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>3.4.5.4/32</ipprefi
x>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>TRUE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>




</ROW_path>



<ROW_path>



<ipnexthop>3.4.5.4</ipnexthop>



<ifname>Null0</ifname>



<uptime>83714</uptime>



<pref>0</pref>



<met
ric>0</metric>



<clientname>local</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>3.4.5.6/32</ipprefix>




<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>TRUE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



<
/ROW_path>



<ROW_path>



<ipnexthop>3.4.5.6</ipnexthop>



<ifname>loopback0</ifname>



<uptime>83714</uptime>



<pref>0</pref>



<metric>0</me
tric>




<clientname>local</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>3.4.5.7/32</ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>TRUE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



</ROW_path
>



<ROW_path>



<ipnexthop>3.4.5.7</ipnexthop>



<ifname>loopback0</ifname>



<uptime>83714</uptime>



<pref>0</pref>



<metric>0</metric>




<clientname>local</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>6.6.6.6/32</ipprefix>



<ucast
-
nh
ops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>FALSE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



</ROW_path>




<ROW_path>



<ipnexthop>10.67.16.1</ipnexthop>



<ifname>Vlan1</ifname>



<uptime>83711</uptime>



<pref>1</pref>



<metric>0</metric>




<clientname>static</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>10.67.16.0/24</ipprefix>



<ucast
-
nhops>1
</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>




<attached>TRUE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



</ROW_path>




<ROW_path>



<ipnexthop>10.67.16.60</ipnexthop>



<ifname>Vlan1</ifname>



<uptime>83714</uptime>



<pref>0</pref>



<metric>0</metric>




<clientname>direct</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>10.67.16.0/32</ipprefix>



<ucast
-
nhops>1</uca
st
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>TRUE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



</ROW_path>




<ROW_path>



<ipnexthop>10.67.16.0</ipnexthop>



<ifname>Null0</ifname>



<uptime>83714</uptime>



<pref>0</pref>



<metric>0</metric>



<c
lientname>local</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>10.67.16.60/32</ipprefix>



<ucast
-
nhops>1</ucast
-
nho
ps>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>TRUE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



</ROW_path>



<RO
W_path>



<ipnexthop>10.67.16.60</ipnexthop>



<ifname>Vlan1</ifname>




<uptime>83714</uptime>



<pref>0</pref>



<metric>0</metric>



<client
name>local</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>10.67.16.255/32</ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>TRUE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



</ROW_path>



<ROW_pa
th>



<ipnexthop>10.67.16.255</ipnexthop>



<ifname>Vlan1</ifname>



<uptime>83714</uptime>



<pref>0</pref>



<metric>0</metric>



<clientnam
e>local</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



<ROW_prefix>



<ipprefix>255.255.255.255/32</ipprefix>



<ucast
-
nhops>1</ucast
-
nhops>



<mcast
-
nhops>0</mcast
-
nhops>



<attached>FALSE</attached>



<TABLE_path>



<ROW_path>



<ubest>TRUE</ubest>



</ROW_path>



<ROW_p
ath>



<ifname>sup
-
eth1</ifname>



<uptime>83714</uptime>



<pref>0</pref>



<metric>0</metric>



<clientname>local</clientname>



</ROW_path>



</TABLE_path>



</ROW_prefix>



</TABLE_prefix>



</ROW_addrf>




</TABLE_addrf>



</ROW_vrf>



</TABLE_vrf>



</__readonly__>



</__XML__
OPT_Cmd_urib_show_routing_command___readonly__>



</__XML__OPT_Cmd_urib_show_routing_command_vrf>



</__XML__OPT_Cmd_urib_show_routing_command_summary>



</__XML__OPT_Cmd_urib_show_routing_command_next
-
hop>



</__XML__OPT_Cmd_urib
_show_routing_command_ip
-
addr>



</__XML__OPT_Cmd_urib_show_routing_command_unicast>



</__XML__OPT_Cmd_urib_show_routing_command_ip>



</__XML__OPT_Cmd_urib_show_routing_command_vrf>



</routing>



</show>


</nc:data>

</nc:rpc
-
reply>


6.

show_vpc_s
tatus

Provides a summary of the vPC status. Can be used as input into a NMS to track vPC
operational status.


Alternatively you could track the underlying PortChannel interfaces via
IF
-
MIB in SNMP.

$ ./show_vpc_status.pl switchname user pass

logging into s
witch switchname as user

sending password

netconf session 17664 established

<?xml version="1.0" encoding="ISO
-
8859
-
1"?>

<nc:rpc
-
reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns="http://www.cisco.com/nxos:1.0:vpc" message
-
id="101">


<nc:data>



<show>



<vpc>



<__XML__OPT_Cmd_show_vpc_brief_vpc
-
number>



<__XML__OPT_Cmd_show_vpc_brief___readonly__>



<__readonly__>



<vpc
-
domain
-
id>not configured</vpc
-
domain
-
id>



<vpc
-
peer
-
status>peer
-
not
-
configured</vpc
-
peer
-
status>




<vpc
-
peer
-
status
-
reason>SUCCESS</vpc
-
peer
-
status
-
reason>



<vpc
-
peer
-
keepalive
-
status>disabled</vpc
-
peer
-
keepalive
-
status>



<vpc
-
peer
-
consistency>inconsistent</vpc
-
peer
-
consistency>



<vpc
-
peer
-
consistency
-
status>SYSERR_MCECM_MCT_DOES_NOT
_EXISTS</vpc
-
peer
-
consistency
-
status>



<num
-
of
-
vpcs>0</num
-
of
-
vpcs>



</__readonly__>



</__XML__OPT_Cmd_show_vpc_brief___readonly__>




</__XML__OPT_Cmd_show_vpc_brief_vpc
-
number>



</vpc>



</show>


</nc:data>

</nc:rpc
-
reply>