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 scripts 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 Scripts using XML interface:
Sample XML Instances
- Add vlan on interface
CLI cmds:
spN7K1# conf t
Enter configuration commands, 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.1Complete Instance
<?xml version="1.0"?>
<nf:rpc xmlns=" xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:if=" 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>
</ethernet>
</interface>
</__XML__MODE__exec_configure>
</configure>
</nf:config>
</nf:edit-config>
</nf:rpc>
]]>]]>
1.2Using <exec-command>
<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos=" 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:
<?xml version="1.0"?>
<nf:rpc-reply xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns=" 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.1Complete instance
nf:rpc xmlns:if=" xmlns=" 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__MODE__exec_configure
interface
ethernet
interface2/2</interface
__XML__MODE_if-ethernet-switch
no
switchport
access
vlan/>
</access
</switchport
</no
</__XML__MODE_if-ethernet-switch
</ethernet
</interface
</__XML__MODE__exec_configure
</configure
if:configure
if:__XML__MODE__exec_configure
if:interface
if:ethernet
if:interface2/2</if:interface
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.2Using exec-cmd
<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos=" 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.1Complete Instance
<?xml version="1.0" encoding="UTF-8"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns=" xmlns:mcecm="
xmlns:eth_pcm=”
message-id="1">
<nf:edit-config>
<nf:target>
<nf:running/>
</nf:target>
<nf:config>
<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:interface>
<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>
</mcecm:__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>
<__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-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:channel-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:__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>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.2Exec-Command Instance
<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos=" 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=" 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.1Complete 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=" xmlns:mcecm=" xmlns:eth_pcm="
nf:edit-config
nf:target
nf:running</nf:running
</nf:target
nf:config
eth_pcm:configure
eth_pcm:__XML__MODE__exec_configure
eth_pcm:interface
eth_pcm:ethernet
eth_pcm:interface1/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_id_mode_channel-id
eth_pcm:channel-id
eth_pcm:__XML__PARAM_value2000</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_pcm: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
interface2/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
interface1/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
interface2000</interface
</port-channel
</interface
</no
</__XML__MODE__exec_configure
</configure
</nf:config
</nf:edit-config
</nf:rpc
]]>]]>
4.2Exec-command Instance
<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos=" 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=" message-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.1marking
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.1Complete instance
<?xml version="1.0" encoding="UTF-8"?>
nf:rpc message-id="1" xmlns=" 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
__XML__OPT_Cmd_policy-map_type
type
qos/>
</type
__XML__OPT_Cmd_policy-map_match-first
pmap-name-qos
__XML__PARAM_valueuntrust_dcsp</__XML__PARAM_value
__XML__MODE_policy-map
class
class-default
__XML__MODE_policy-map_class
set
__XML__BLK_Cmd_set_cos
dscp
__XML__OPT_Cmd_set_tunnel
__XML__BLK_Cmd_set_dscp-val
dscp-val0</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-name-que
__XML__PARAM_value
untrust_1Gport_policy
</__XML__PARAM_value
__XML__MODE_policy-map_type_queuing
class
type
queuing
__XML__BLK_Cmd_class_cmap-enum-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-val0</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.2Exec-cmd
<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos=" message-id="4">
<nxos: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.2Priority 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.1Complete instance
<?xml version="1.0" encoding="UTF-8"?>
nf:rpc message-id="1" xmlns=" 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_valuematch-any</__XML__PARAM_value
__XML__BLK_Cmd_class-map_cmap-enum-name
cmap-enum-name1p3q4t-out-pq1</cmap-enum-name
__XML__MODE_class-map_type_queuing
match
cos
cos-list5-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_valuematch-any</__XML__PARAM_value
__XML__BLK_Cmd_class-map_cmap-enum-name
cmap-enum-name1p3q4t-out-q2</cmap-enum-name
__XML__MODE_class-map_type_queuing
match
cos
cos-list3-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_valuepriority_queue1</__XML__PARAM_value
__XML__MODE_policy-map_type_queuing
class
type
queuing
__XML__BLK_Cmd_class_cmap-enum-name
cmap-enum-name1p3q4t-out-q2</cmap-enum-name
__XML__OPT_Cmd_class_insert-before
__XML__MODE_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-name1p3q4t-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
remaining
percent
rem-perc60</rem-perc
</percent
</remaining
</__XML__BLK_Cmd_bandwidth_bw-value
</bandwidth
queue-limit
__XML__OPT_Cmd_queue-limit_cos
__XML__BLK_Cmd_queue-limit_q-size
q-size
__XML__PARAM_value1</__XML__PARAM_value
__XML__OPT_Cmd_queue-limit_packets
mbytes/>
</__XML__OPT_Cmd_queue-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__OPT_Cmd_policy-map_match-first
</queuing
</type
</policy-map
</__XML__MODE__exec_configure
</configure
</nf:config
</nf:edit-config
</nf:rpc
]]>]]>
5.2.2Exec cmd
<?xml version="1.0"?>
<nf:rpc xmlns:nf="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nxos=" 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 ; match 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=" message-id="4">
<nxos:exec-command>
<nxos:cmd>configure 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.3Shaping 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.1Complete instance
<?xml version="1.0" encoding="UTF-8"?>
nf:rpc message-id="1" xmlns=" 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_valuematch-any</__XML__PARAM_value
__XML__BLK_Cmd_class-map_cmap-enum-name
cmap-enum-name1p3q4t-out-pq1</cmap-enum-name
__XML__MODE_class-map_type_queuing
match
cos
cos-list5-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_valuematch-any</__XML__PARAM_value
__XML__BLK_Cmd_class-map_cmap-enum-name
cmap-enum-name1p3q4t-out-q2</cmap-enum-name
__XML__MODE_class-map_type_queuing
match
cos
cos-list3-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_valueshape_dt</__XML__PARAM_value
__XML__MODE_policy-map_type_queuing
class
type
queuing
__XML__BLK_Cmd_class_cmap-enum-name
cmap-enum-name1p3q4t-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
percentage50</percentage
</percent
</__XML__BLK_Cmd_shape_avg-rate
</__XML__OPT_Cmd_shape_average
</shape
queue-limit
__XML__OPT_Cmd_queue-limit_cos
cos
cos-val5</cos-val
</cos
__XML__BLK_Cmd_queue-limit_q-size
percent
perc-q-size10</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-val6</cos-val
</cos
__XML__BLK_Cmd_queue-limit_q-size
percent
perc-q-size10</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-name1p3q4t-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
percentage25</percentage
</percent
</__XML__BLK_Cmd_shape_avg-rate
</__XML__OPT_Cmd_shape_average
</shape
queue-limit
__XML__OPT_Cmd_queue-limit_cos
cos
cos-val4</cos-val
</cos
__XML__BLK_Cmd_queue-limit_q-size
percent
perc-q-size15</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
]]>]]>
5.3.2Exec cmd
Type the commands inside of the <exec-command> tag. Notice the limit on 255 characters there.
5.4Bandwidth 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.1Complete Instance
<?xml version="1.0" encoding="UTF-8"?>
nf:rpc message-id="1" xmlns=" 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_valuematch-any</__XML__PARAM_value
__XML__BLK_Cmd_class-map_cmap-enum-name
cmap-enum-name1p3q4t-out-pq1</cmap-enum-name
__XML__MODE_class-map_type_queuing
match
cos
cos-list5-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_valuematch-any</__XML__PARAM_value
__XML__BLK_Cmd_class-map_cmap-enum-name
cmap-enum-name1p3q4t-out-q2</cmap-enum-name
__XML__MODE_class-map_type_queuing
match
cos
cos-list3-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_valuebandwidth_wred</__XML__PARAM_value
__XML__MODE_policy-map_type_queuing
class
type
queuing
__XML__BLK_Cmd_class_cmap-enum-name
cmap-enum-name1p3q4t-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
percentage50</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_value5</__XML__PARAM_value
__XML__OPT_Cmd_random-detect_minimum-threshold
minimum-threshold/>
__XML__BLK_Cmd_random-detect_min-thresh
percent
min-percent-of-qsize10</min-percent-of-qsize
</percent
__XML__OPT_Cmd_random-detect_maximum-threshold
__XML__BLK_Cmd_random-detect_max-thresh
percent1
max-percent-of-qsize30</max-percent-of-qsize
</percent1
</__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_value6</__XML__PARAM_value
__XML__OPT_Cmd_random-detect_minimum-threshold
minimum-threshold/>
__XML__BLK_Cmd_random-detect_min-thresh
percent
min-percent-of-qsize40</min-percent-of-qsize
</percent
__XML__OPT_Cmd_random-detect_maximum-threshold
__XML__BLK_Cmd_random-detect_max-thresh
percent1
max-percent-of-qsize60</max-percent-of-qsize
</percent1
</__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
</__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-name1p3q4t-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
percentage25</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_value4</__XML__PARAM_value
__XML__OPT_Cmd_random-detect_minimum-threshold
minimum-threshold/>
__XML__BLK_Cmd_random-detect_min-thresh
percent
min-percent-of-qsize20</min-percent-of-qsize
</percent
__XML__OPT_Cmd_random-detect_maximum-threshold
__XML__BLK_Cmd_random-detect_max-thresh
percent1
max-percent-of-qsize40</max-percent-of-qsize
</percent1
</__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
</__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.1Ingress 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 queuing 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.1Complete Instance
<?xml version="1.0" encoding="UTF-8"?>
nf:rpc message-id="1" xmlns=" 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_valuep-4que-7e-drop-in </__XML__PARAM_value
__XML__MODE_policy-map_type_queuing
class
type
queuing
__XML__BLK_Cmd_class_cmap-enum-name
cmap-dce-name4q4t-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-size45</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
percentage25</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-name4q4t-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-size10</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
percentage25</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_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_valuep-4que-7e-in</__XML__PARAM_value
__XML__MODE_policy-map_type_queuing
class
type
queuing
__XML__BLK_Cmd_class_cmap-enum-name
cmap-dce-namec-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-namep-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-size70</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.2Exec cmd
Type the commands inside of the <exec-command> tag. Notice the limit on 255 characters there.
6.2Egress 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 queuing 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
policy-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.1Complete Instance
<?xml version="1.0" encoding="UTF-8"?>
nf:rpc message-id="1" xmlns=" 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_valuep-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-name1q3p1t-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
value1</value
</level
</__XML__OPT_Cmd_priority_level
</priority