B 1710 Programmability CG
B 1710 Programmability CG
x
First Published: 2022-11-30
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS,
INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH
THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY,
CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of
the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS.
CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT
LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network
topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional
and coincidental.
All printed copies and duplicate soft copies of this document are considered uncontrolled. See the current online version for the latest version.
Cisco has more than 200 offices worldwide. Addresses and phone numbers are listed on the Cisco website at www.cisco.com/go/offices.
The documentation set for this product strives to use bias-free language. For purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on
age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that
is hardcoded in the user interfaces of the product software, language used based on standards documentation, or language that is used by a referenced third-party product.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL:
https://www.cisco.com/c/en/us/about/legal/trademarks.html. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a
partnership relationship between Cisco and any other company. (1721R)
© 2022 Cisco Systems, Inc. All rights reserved.
Preface
This preface describes the conventions of this document and information on how to obtain other documentation.
It also provides information on what's new in Cisco product documentation.
• Document Conventions , on page iii
• Related Documentation, on page v
• Obtaining Documentation and Submitting a Service Request, on page v
Document Conventions
This document uses the following conventions:
Convention Description
^ or Ctrl Both the ^ symbol and Ctrl represent the Control (Ctrl) key on a keyboard. For
example, the key combination ^D or Ctrl-D means that you hold down the Control
key while you press the D key. (Keys are indicated in capital letters but are not
case sensitive.)
bold font Commands and keywords and user-entered text appear in bold font.
Italic font Document titles, new or emphasized terms, and arguments for which you supply
values are in italic font.
Courier font Terminal sessions and information the system displays appear in courier font.
Bold Courier font Bold Courier font indicates text that the user must enter.
[x] Elements in square brackets are optional.
... An ellipsis (three consecutive nonbolded periods without spaces) after a syntax
element indicates that the element can be repeated.
Convention Description
{x | y} Required alternative keywords are grouped in braces and separated by vertical
bars.
[x {y | z}] Nested set of square brackets or braces indicate optional or required choices within
optional or required elements. Braces and a vertical bar within square brackets
indicate a required choice within an optional element.
string A nonquoted set of characters. Do not use quotation marks around the string or
the string will include the quotation marks.
!, # An exclamation point (!) or a pound sign (#) at the beginning of a line of code
indicates a comment line.
Note Means reader take note. Notes contain helpful suggestions or references to material not covered in the
manual.
Tip Means the following information will help you solve a problem.
Caution Means reader be careful. In this situation, you might do something that could result in equipment damage
or loss of data.
Timesaver Means the described action saves time. You can save time by performing the action described in the
paragraph.
Related Documentation
Related Documentation v
Obtaining Documentation and Submitting a Service Request v
PART I Provisioning 33
CHAPTER 3 iPXE 71
Provisioning
Zero-Touch Provisioning
C9800L
Zero Touch Provisioning: HTTP Cisco IOS XE Fuji 16.8.1
Download
• Cisco 4000 Series Integrated Services Routers
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9500 Series Switches
iPXE Cisco IOS XE Denali 16.3.2 and Cisco IOS XE Everest 16.5.1a
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3650 Series Switches
Model-Driven Programmability
RESTCONF Protocol
Application Hosting
OpenFlow
OpenFlow Cisco IOS XE Fuji 16.9.1
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches and Cisco Catalyst
9500-High Performance Series Switches
Domain Name System (DNS) server IP address, and enables Guest Shell. The device then obtains the IP
address or URL of an HTTP/TFTP server, and downloads the Python script from an HTTP/TFTP server to
configure the device.
Guest Shell provides the environment for the Python script to run. Guest Shell executes the downloaded
Python script and applies an initial configuration to the device.
After initial provisioning is complete, Guest Shell remains enabled. For more information, see the Guest Shell
chapter.
Note In case Zero-Touch Provisioning fails, the device falls back to AutoInstall to load configuration files.
For more information, see Using AutoInstall and Setup.
After receiving these DHCP options, the device connects to the HTTP/TFTP server, and downloads the Python
script. The device, at this point does not have any route to reach the HTTP/TFTP server, so it uses the default
route provided by the DHCP server.
DHCPv6 Support
In Cisco IOS XE Fuji 16.9.1, Dynamic Host Control Protocol Version 6 (DHCPv6) support is added to the
Zero-touch provisioning feature. DHCPv6 is enabled by default, and will work on any device that boots
without a startup configuration.
Note DHCPv6 is only supported on Catalyst 9300 and 9500 Series Switches.
DHCPv6 is supported by both TFTP and HTTP download of Python scripts. If the HTTP or TFTP download
of Python scripts fail, the device will revert to the start (without any configuration). For both DHCPv4, and
DHCPv6 to work, the correct HTTP file path must be available in the DHCP configuration.
There can be scenarios where the same interface can have both IPv4 and IPv6 addresses, or two different
interfaces in the network - one can receive IPv4 traffic and the other IPv6 traffic. We recommend that you
use either the DHCPv4 or DHCPv6 option in your deployment.
The following is a sample DHCPv4: /etc/dhcp/dhcpd.conf:
host <hostname> {
hardware ethernet xx:xx:xx:xx:xx:xx;
option dhcp-client-identifier "xxxxxxxxxxxxxx";
option host-name "<hostname>".
option log-servers x.x.x.x;
fixed-address x.x.x.x;
if option vendor-class-identifier = "..." {
option vendor-class-identifier "...";
if exists user-class and option user-class = "iPXE" {
filename "http://x.x.x.x/…/<image>";
} else {
filename "http://x.x.x.x/…/<script-name>";
}
}
}
Device> enable
Device# configure terminal
Device(config)# ip dhcp excluded-address 10.1.1.1
Device(config)# ip dhcp excluded-address vrf Mgmt-vrf 10.1.1.1 10.1.1.10
Device(config)# ip dhcp pool pnp_device_pool
Device(config-dhcp)# vrf Mgmt-vrf
Device(config-dhcp)# network 10.1.1.0 255.255.255.0
Device(config-dhcp)# default-router 10.1.1.1
Device(config-dhcp)# option 150 ip 203.0.113.254
Device(config-dhcp)# option 67 ascii /sample_python_dir/python_script.py
Device(config-dhcp)# exit
Device(config)# interface gigabitethernet 1/0/2
Device(config-if)# no ip dhcp client request tftp-server-address
Device(config-if)# end
Device> enable
Device# configure terminal
Device(config)# ip dhcp pool pnp_device_pool
Device(config-dhcp)# vrf Mgmt-vrf
Device(config-dhcp)# network 10.1.1.0 255.255.255.0
Device> enable
Device# configure terminal
Device(config)# ip dhcp excluded-address 10.1.1.1
Device(config)# ip dhcp pool pnp_device_pool
Device(config-dhcp)# network 10.1.1.0 255.255.255.0
Device(config-dhcp)# default-router 10.1.1.1
Device(config-dhcp)# option 150 ip 203.0.113.254
Device(config-dhcp)# option 67 ascii /sample_python_dir/python_script.py
Device(config-dhcp)# exit
Device(config)# interface gigabitethernet 1/0/2
Device(config-if)# no ip dhcp client request tftp-server-address
Device(config-if)# end
Device> enable
Device# configure terminal
Device(config)# ip dhcp excluded-address 10.1.1.1
Device(config)# ip dhcp pool pnp_device_pool
Device(config-dhcp)# network 10.1.1.0 255.255.255.0
Device(config-dhcp)# default-router 10.1.1.1
Device(config-dhcp)# option 67 ascii http://192.0.2.1:8000/sample_python_2.py
Device(config-dhcp)# end
}
}
The following sample DHCP configuration shows that a Python script is copied from an HTTP server to the
device:
Day0_with_mgmt_port_http
-------------------------
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.255;
host C2-3850 {
fixed-address 192.168.1.246 ;
hardware ethernet CC:D8:C1:85:6F:00;
option bootfile-name "http://192.168.1.46/sample_python_2.py";
}
}
Once the DHCP server is running, boot a management-network connected device, and the rest of the
configuration is automatic.
Device> enable
Device# configure terminal
Device(config)# ipv6 dhcp pool ztp
Device(config-dhcpv6)# address prefix 2001:DB8::1/64
Device(config-dhcpv6)# domain-name cisco.com
Device(config-dhcpv6)# bootfile-url tftp://[2001:db8::46]/sample_day0_script.py
Device(config-dhcpv6)# exit
Device(config)# interface vlan 20
Device(config-if)# ipv6 dhcp server ztp
Device(config-if)# end
print "\n\n *** Sample ZTP Day0 Python Script *** \n\n"
cli.executep(cli_command)
print "\n\n *** ZTP Day0 Python Script Execution Complete *** \n\n"
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
The Day Zero provisioning is complete, and the IOS prompt is accessible.
going to start.>
...
The section shows how to configure the device for Day Zero provisioning:
Initializing Hardware...
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
*Sep 4 20:36:19.562: [IOX DEBUG] Setting up chasfs for iox related activity
*Sep 4 20:36:19.562: [IOX DEBUG] Setting up for iox pre-clean activity if needed
*Sep 4 20:36:19.562: [IOX DEBUG] Waiting for iox pre-clean setup to take affect
*Sep 4 20:36:19.562: [IOX DEBUG] Waited for 1 sec(s) for iox pre-clean setup to take affect
*Sep 4 20:36:19.563: [IOX DEBUG] Waiting for CAF and ioxman to be up, in that order
*Sep 4 20:36:34.564: [IOX DEBUG] Waited for 16 sec(s) for CAF and ioxman to come up
*Sep 4 20:36:34.564: [IOX DEBUG] Validating if CAF and ioxman are running
*Sep 4 20:36:34.564: [IOX DEBUG] CAF and ioxman are up and running
*Sep 4 20:36:34.564: [IOX DEBUG] Building the simple mgmt-intf enable command string
*Sep 4 20:36:34.564: [IOX DEBUG] Enable command is: request platform software iox-manager
*Sep 4 20:36:34.564: [IOX DEBUG] Issuing guestshell enable command and waiting for it to
be up
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
Would you like to enter the initial configuration dialog? [yes/no]: The process for the
command is not
responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
guestshell installed successfully
Current state is: DEPLOYED
guestshell activated successfully
Current state is: ACTIVATED
guestshell started successfully
Current state is: RUNNING
Guestshell enabled successfully
The section shows how to configure the device for Day Zero provisioning:
Cisco IOS Software [Fuji], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.9.4, RELEASE
SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2019 by Cisco Systems, Inc.
Compiled Thu 22-Aug-19 18:14 by mcpre
Your use of the Software is subject to the Cisco End User License Agreement
(EULA) and any relevant supplemental terms (SEULA) found at
http://www.cisco.com/c/en/us/about/legal/cloud-and-software/software-terms.html.
You hereby acknowledge and agree that certain Software and/or features are
licensed for a particular term, that the license to such Software and/or
features is valid only for the applicable term and that such Software and/or
features may be shut down or otherwise terminated by Cisco after expiration
of the applicable license term (e.g., 90-day trial period). Cisco reserves
the right to terminate any such Software feature electronically or by any
other means available. While Cisco may provide alerts, it is your sole
responsibility to monitor your usage of any such term Software feature to
ensure that your systems and networks are prepared for a shutdown of the
Software feature.
FIPS: Flash Key Check : Key Not Found, FIPS Mode Not Enabled
cisco C9300-48UXM (X86) processor with 1419044K/6147K bytes of memory.
Processor board ID FCW2144L045
2048K bytes of non-volatile configuration memory.
8388608K bytes of physical memory.
1638400K bytes of Crash Files at crashinfo:.
11264000K bytes of Flash at flash:.
0K bytes of WebUI ODM Files at webui:.
Would you like to enter the initial configuration dialog? [yes/no]: The process for the
command is not
responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
The process for the command is not responding or is otherwise unavailable
guestshell installed successfully
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected].
Technology Package License Information:
------------------------------------------------------------------------------
Technology-package Technology-package
Current Type Next reboot
------------------------------------------------------------------------------
network-advantage Smart License network-advantage
None Subscription Smart License None
Smart Licensing Status: UNREGISTERED/EVAL EXPIRED
cisco C9300-48UXM (X86) processor with 1419044K/6147K bytes of memory.
Processor board ID FCW2144L045
36 Ethernet interfaces
1 Virtual Ethernet interface
4 Gigabit Ethernet interfaces
20 Ten Gigabit Ethernet interfaces
2 TwentyFive Gigabit Ethernet interfaces
2 Forty Gigabit Ethernet interfaces
2048K bytes of non-volatile configuration memory.
8388608K bytes of physical memory.
1638400K bytes of Crash Files at crashinfo:.
11264000K bytes of Flash at flash:.
0K bytes of WebUI ODM Files at webui:.
Base Ethernet MAC Address : ec:1d:8b:0a:68:00
Motherboard Assembly Number : 73-17959-06
Motherboard Serial Number : FOC21418FPQ
Model Revision Number : B0
Motherboard Revision Number : A0
Model Number : C9300-48UXM
System Serial Number : FCW2144L045
Switch Ports Model SW Version SW Image Mode
------ ----- ----- ---------- ---------- ----
* 1 64 C9300-48UXM 16.9.4 CAT9K_IOSXE BUNDLE
Configuration register is 0x102
Any interface listed with OK? value "NO" does not have a valid configuration
Interface IP-Address OK? Method Status Protocol
Vlan1 unassigned NO unset up up
GigabitEthernet0/0 10.127.128.5 YES DHCP up up
Tw1/0/1 unassigned YES unset down down
Tw1/0/2 unassigned YES unset down down
Tw1/0/3 unassigned YES unset down down
Tw1/0/4 unassigned YES unset down down
Tw1/0/5 unassigned YES unset down down
Tw1/0/6 unassigned YES unset down down
Tw1/0/7 unassigned YES unset down down
Tw1/0/8 unassigned YES unset down down
Tw1/0/9 unassigned YES unset down down
Tw1/0/10 unassigned YES unset down down
Tw1/0/11 unassigned YES unset down down
However, type 0 passwords will soon be deprecated. Migrate to a supported password type
Line 2 SUCCESS: ip domain name domain
Would you like to enter the initial configuration dialog? [yes/no]: day0guestshell installed
successfully
Current state is: DEPLOYED
day0guestshell activated successfully
Current state is: ACTIVATED
day0guestshell started successfully
Current state is: RUNNING
Guestshell enabled successfully
...
The section shows how to configure the device for Day Zero provisioning:
Cisco IOS Software [Gibraltar], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 16.12.3a,
This software version supports only Smart Licensing as the software licensing mechanism.
Your use of the Software is subject to the Cisco End User License Agreement
(EULA) and any relevant supplemental terms (SEULA) found at
http://www.cisco.com/c/en/us/about/legal/cloud-and-software/software-terms.html.
You hereby acknowledge and agree that certain Software and/or features are
licensed for a particular term, that the license to such Software and/or
features is valid only for the applicable term and that such Software and/or
features may be shut down or otherwise terminated by Cisco after expiration
of the applicable license term (e.g., 90-day trial period). Cisco reserves
the right to terminate any such Software feature electronically or by any
other means available. While Cisco may provide alerts, it is your sole
responsibility to monitor your usage of any such term Software feature to
ensure that your systems and networks are prepared for a shutdown of the
Software feature.
FIPS: Flash Key Check : Key Not Found, FIPS Mode Not Enabled
Would you like to enter the initial configuration dialog? [yes/no]: day0guestshell installed
successfully
Current state is: DEPLOYED
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to
[email protected].
Technology Package License Information:
------------------------------------------------------------------------------
Technology-package Technology-package
Current Type Next reboot
------------------------------------------------------------------------------
network-advantage Smart License network-advantage
None Subscription Smart License None
AIR License Level: AIR DNA Advantage
Next reload AIR license Level: AIR DNA Advantage
Smart Licensing Status: UNREGISTERED/EVAL EXPIRED
cisco C9300-48UXM (X86) processor with 1343703K/6147K bytes of memory.
Processor board ID FCW2144L045
1 Virtual Ethernet interface
4 Gigabit Ethernet interfaces
36 2.5 Gigabit Ethernet interfaces
20 Ten Gigabit Ethernet interfaces
2 TwentyFive Gigabit Ethernet interfaces
2 Forty Gigabit Ethernet interfaces
2048K bytes of non-volatile configuration memory.
8388608K bytes of physical memory.
1638400K bytes of Crash Files at crashinfo:.
11264000K bytes of Flash at flash:.
0K bytes of WebUI ODM Files at webui:.
Base Ethernet MAC Address : ec:1d:8b:0a:68:00
Motherboard Assembly Number : 73-17959-06
Motherboard Serial Number : FOC21418FPQ
Model Revision Number : B0
Motherboard Revision Number : A0
Model Number : C9300-48UXM
System Serial Number : FCW2144L045
Switch Ports Model SW Version SW Image Mode
------ ----- ----- ---------- ---------- ----
* 1 65 C9300-48UXM 16.12.3a CAT9K_IOSXE BUNDLE
Configuration register is 0x102
However, type 0 passwords will soon be deprecated. Migrate to a supported password type
Line 2 SUCCESS: ip domain name domain
Line 3 SUCCESS: line vty 0 15
Line 4 SUCCESS: login local
Line 5 SUCCESS: transport input all
Line 6 SUCCESS: end
...
The section shows how to configure the device for Day Zero provisioning:
Cisco IOS Software [Amsterdam], Catalyst L3 Switch Software (CAT9K_IOSXE), Version 17.2.1,
RELEASE SOFTWARE (fc4)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2020 by Cisco Systems, Inc.
Compiled Thu 26-Mar-20 03:29 by mcpre
This software version supports only Smart Licensing as the software licensing mechanism.
Your use of the Software is subject to the Cisco End User License Agreement
(EULA) and any relevant supplemental terms (SEULA) found at
http://www.cisco.com/c/en/us/about/legal/cloud-and-software/software-terms.html.
You hereby acknowledge and agree that certain Software and/or features are
licensed for a particular term, that the license to such Software and/or
features is valid only for the applicable term and that such Software and/or
features may be shut down or otherwise terminated by Cisco after expiration
of the applicable license term (e.g., 90-day trial period). Cisco reserves
the right to terminate any such Software feature electronically or by any
other means available. While Cisco may provide alerts, it is your sole
responsibility to monitor your usage of any such term Software feature to
ensure that your systems and networks are prepared for a shutdown of the
Software feature.
FIPS: Flash Key Check : Key Not Found, FIPS Mode Not Enabled
However, type 0 passwords will soon be deprecated. Migrate to a supported password type
Line 2 SUCCESS: ip domain name domain
Line 3 SUCCESS: line vty 0 15
Line 4 SUCCESS: login local
Line 5 SUCCESS: transport input all
Line 6 SUCCESS: end
Zero-Touch Provisioning: Cisco IOS XE Fuji 16.8.1 Zero-Touch Provisioning supports HTTP and
HTTP Download TFTP file download.
Cisco IOS XE Fuji 16.8.1a
In Cisco IOS XE Everest 16.8.1, this feature
was implemented on the following platforms:
• Cisco 4000 Series Integrated Services
Routers
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9500 Series Switches
DHCPv6 Support for Cisco IOS XE Fuji 16.9.1 In Cisco IOS XE Fuji 16.9.1, this feature was
Zero-Touch Provisioning implemented on the following platforms:
Cisco IOS XE Amsterdam
17.3.2a • Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9500 Series Switches
Side-Effect Synchronization Cisco IOS XE Bengaluru During configuration changes in the DMI, a
of the Configuration Database 17.4.1 partial synchronization of the changes that are
triggered when a command or RPC is
configured happens. This is called the
side-effect synchronization, and it reduces the
synchronization time and NETCONF
downtime.
This feature was implemented on the
following platforms:
• Cisco ASR 1000 Aggregation Services
Routers
• Cisco Catalyst 8500 and 8500L Series
Edge Platforms
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
Zero-Touch Provisioning Cisco IOS XE Cupertino ZTP is enabled through YANG models when
Through YANG Models 17.7.1 NETCONF is enabled.
This feature is supported on all platforms that
support NETCONF-YANG.
Zero-Touch Provisioning Cisco IOS XE Cupertino ZTP is supported on data port for both IPv4
Support on Data Port 17.7.1 and IPv6.
This feature is implemented on the following
platform:
• Cisco Catalyst 9800-L Wireless
Controller
Netboot Requirements
The following are the primary requirements for netbooting:
• DHCP server with proper configuration.
• Boot image available on the FTP/HTTP/TFTP server.
• Device configured to boot from a network-based source.
iPXE Overview
Network bootloaders support booting from a network-based source. The bootloaders boot an image located
on an HTTP, FTP, or TFTP server. A network boot source is detected automatically by using an iPXE-like
solution.
iPXE enables network boot for a device that is offline. The following are the three types of boot modes:
• iPXE Timeout—Boots through iPXE network boot. Configures a timeout in seconds for iPXE network
boot by using the IPXE_TIMEOUT rommon variable. Use the boot ipxe timeout command to configure
iPXE timeout. When the timeout expires, device boot is activated.
• iPXE Forever—Boots through iPXE network boot. The device sends DHCP requests forever, when the
boot ipxe forever command is configured. This is an iPXE-only boot (which means that the bootloader
will not fall back to a device boot or a command prompt, because it will send DHCP requests forever
until it receives a valid DHCP response.)
• Device—Boots using the local device BOOT line configured on it. When device boot is configured, the
configured IPXE_TIMEOUT rommon variable is ignored. You can activate device boot as specified
below:
• If BOOTMODE=ipxe-forever, device boot is not activated without user intervention (this is possible
only if ENABLE_BREAK=yes).
• If BOOTMODE=ipxe-timeout, device boot is activated when the specified IPXE_TIMEOUT variable
(in seconds) has elapsed.
• If BOOTMODE=device, device boot is activated. This is the default active mode.
• Device boot can also be activated through the CLI.
Note Manual boot is another term used in this document. Manual boot is a flag that determines whether to do
a rommon reload or not. When the device is in rommon mode, you have to manually issue the boot
command.
If manual boot is set to YES, the rommon or device prompt is activated. If manual boot is set to NO,
the autoboot variable is executed; this means that the value set in the BOOT variable is followed.
1. Bootloader sends a DHCP discover message, and when the server replies, the Bootloader sends a DHCP
request.
2. The DHCP response includes the IP address and boot file name. The boot file name indicates that the boot
image is to be retrieved from a TFTP server (tftp://server/filename), FTP server
(ftp://userid:password@server/filename), or an HTTP server (http://server/filename).
3. Bootloader downloads and boots the image from the network source.
4. If no DHCP response is received, the bootloader keeps sending DHCP requests forever or for a specified
period of time, based on the boot mode configured. When a timeout occurs, the bootloader reverts to a
device-based boot. The device sends DHCP requests forever only if the configured boot mode is
ipxe-forever. If the ipxe-timeout boot mode command is configured, DHCP requests are sent for the
specified amount of time, and when the timeout expires, device boot mode is activated.
Note Because the current iPXE implementation works only via the management port (GigabitEthernet0/0),
DHCP requests sent through the front panel ports are not supported.
When using a static network configuration to network boot, ROMMON uses the following environment
variables (and all of them are required):
• BOOT—URLs separated by semicolon (;) to boot from.
• IP_ADDRESS—Statically assigned IP address of a device.
• DEFAULT_GATEWAY—Default gateway of the device.
• IP_SUBNET_MASK—IPv4 or IPv6 prefix information.
IPv4—Subnet mask of the device in the format WWW.XXX.YYY.ZZZ eg. 255.255.255.0.
IPv6—Subnet prefix length of the device in the format NNN eg. 64 or 112.
When manual boot is disabled, the bootloader determines whether to execute a device boot or a network boot
based on the configured value of the rommon iPXE variable. Irrespective of whether manual boot is enabled
or disabled, the bootloader uses the BOOTMODE variable to determine whether to do a device boot or a
network boot. Manual boot means that the user has configured the boot manual switch command. When
manual boot is disabled, and when the device reloads, the boot process starts automatically.
When iPXE is disabled, the contents of the existing BOOT variable are used to determine how to boot the
device. The BOOT variable may contain a network-based uniform resource identifier (URI) (for example,
http://, ftp://, tftp://), and a network boot is initiated; however DHCP is not used to get the network image
path. The static network configuration is taken from the IP_ADDRESS, DEFAULT_GATEWAY, and
IP_SUBNET_MASK variables. The BOOT variable may also contain a device filesystem-based path, in
which case, a device filesystem-based boot is initiated.
The DHCP server used for booting can identify a device through the Product ID (PID) (available in DHCP
Option 60), chassis serial number (available in DHCP option 61), or the MAC address of the device. The
show inventory and show switch commands also display these values on the device.
The following is sample output from the show inventory command:
Device# show inventory
Note In this illustration, the IPv6 booting device, the supporting device, and the
DHCP server are on the same subnet. However; if the supporting device
and the DHCP server are on different subnets, then there must be a relay
agent in the network.
3. The device sends a DHCPv6 solicit message to the multicast group address of ff02::1:2 for all DHCP
agents.
The following sample displays the fields in a DHCPv6 solicit packet during iPXE boot:
DHCPv6
Message type: Solicit (1)
Transaction ID: 0x36f5f1
Client Identifier
Vendor Class
Identity Association for Non-Temporary Address
Option Request
User Class
Vendor-specific Information
4. If the DHCPv6 server is configured, it responds with a DHCPv6 advertise packet that contains the 128
Bit IPv6 address, the boot file Uniform Resource Identifier (URI), the Domain Name System (DNS) server
and domain search list, and the client and server IDs. The client ID contains the DUID of the client (In
this illustration, the IPv6 Booting Device), and the Server ID contains the DUID of the DHCPv6 server.
5. The client then sends a DHCPv6 request packet to the multicast group address ff02::1:2, requesting for
advertised parameters.
6. The server responds with a unicast DHCPv6 reply to the Link Local (FE80::) IPv6 address of the client.
The following sample displays the fields in a DHCPv6 reply packet:
DHCPv6
Message type: Reply (7)
Transaction ID: 0x790950
Identity Association for Non-Temporary Address
Client Identifier
Server Identifier
DNS recursive name server
Boot File URL
Domain Search List
7. The device then sends an HTTP GET request to the web server.
8. If the requested image is available at the specified path, the web server responds with an OK for the HTTP
GET request.
9. The TCP image transfer copies the image, and the device boots up.
The device uses the DHCP server-assigned address to boot an image. If the DHCPv6 server fails to assign an
address, the device tries to use the SLAAC address. If both the DHCP server-assigned address and the SLAAC
address are not available, the device uses the link-local address. However, the remote FTP/HTTP/TFTP servers
must be on the same local subnet as that of the device for the image copy to succeed.
If the first three addresses are not available, the device uses the automatically generated site-local address.
Note Catalyst 9000 Series Switches support DHCP Option 60, Option 77, DHCPv6 Options 1, Option 15,
and Option 16. DHCP Option 61 is only supported on Catalyst 9300 and 9500 Series Switches.
• DHCP Option 60—Vendor Class Identifier. This option is populated with the value of the ROMMON
environment variable MODEL_NUM.
• DHCP Option 61—Client Identifier. This option is populated with the value of theROMMON environment
variable SYSTEM_SERIAL_NUM.
• DHCP Option 77—User Class Option. This option is added to a DHCP Discover packet, and contains
the value equal to the string iPXE. This option helps to isolate iPXE DHCP clients looking for an image
to boot from a DHCP server.
The following is sample DHCPv4 configuration from the ISC DHCP Server that displays the use of
Option 77. The if condition in this sample implies that if Option 77 exists, and is equal to the string iPXE,
then advertise the Boot File URI for the image.
host Switch2 {
fixed-address 192.168.1.20 ;
hardware ethernet CC:D8:C1:85:6F:11 ;
#user-class = length of string + ASCII code for iPXE
if exists user-class and option user-class = 04:68:50:58:45 {
filename "http://192.168.1.146/test-image.bin"
}
}
• DHCPv6 Option 1—Client Identifier Option. This option is populated with the value of the ROMMON
environment variable SYSTEM_SERIAL_NUM as specified in RFC 3315. The recommended format
for the ROMMON environment variable is MAC_ADDR.
• DHCPv6 Option 15—User Class Option. This option is the IPv6 User Class option in a DHCPv6 solicit
message, and is populated with the string, iPXE. The following sample shows Option 15 defined in the
ISC DHCP server:
The following is a sample DHCP Server configuration that uses the DHCPv6 Option 15:
#Client-specific parameters
host switch1 {
#assigning a fixed IPv6 address
fixed-address6 2001:DB8::CAFE ;
#Client DUID in hexadecimal format contains: DUID-type"2" + "EN=9" + "Chassis
serial number"
host-identifier option dhcp6.client-id 00:02:00:00:00:09:46:4F:43:31:38:33:
31:58:31:41:53;
#User class 00:04:69:50:58:45 is len 4 + "iPXE"
if option dhcp6.user-class = 00:04:69:50:58:45 {
option dhcp6.bootfile-url
"http://[2001:DB8::461/platform-pxe/edi46/test-image.bin";
}
}
• DHCPv6 Option 16—Vendor Class Option. Contains the device product ID (PID). The PID can be
determined from the output of the show inventory command or from the MODEL_NUM rommon
variable. Option 16 is not a default option in the ISC DHCP Server and can be defined as follows:
The following sample configuration illustrates the use of DHCPv6 Option 16:
# Source: dhcpd6ConfigPD
host host1-ipxe6-auto-host1 {
fixed-address6 2001:DB8::1234;
host-identifier option dhcp6.client-id 00:02:00:00:00:09:46:4F:
43:31:38:33:31:58:31:41:53;
if option dhcp6.vendor-class-data = 00:00:00:09:00:0E:57:53:2D:
43:33:38:35:30:2D:32:34:50:2D:4D {
option dhcp6.bootfile-url
"http://[2001:DB8::46]/platform-pxe/host1/17jan-polaris.bin";
The table below describes the significant fields shown in the display.
Field Description
Cisco devices that support this feature use the DUID-EN (DUID Type 2) to identify the DHCP client (that is
the device in the DHCPv6 Solicit packet). Catalyst 9000 Series Switches support not only DUID-EN, but also
DUID-LL (DUID Type 3). DUID-EN is the preferred type; however, if switches are unable to create it, then
DUID-LL is constructed and used.
DETAILED STEPS
Step 3 • boot ipxe forever [switch number] Configures the BOOTMODE rommon variable.
• boot ipxe timeout seconds [switch number] • The forever keyword configures the BOOTMODE
Example: rommon variable as IPXE-FOREVER.
Device(config)# boot ipxe forever switch 2 • The timeout keyword configures the BOOTMODE
Example: rommon variable as IPXE-TIMEOUT.
Device(config)# boot ipxe timeout 30 switch 2
Step 4 boot system {switch switch-number | all} {flash: | ftp: | Boots an image from the specified location.
http: | usbflash0 | tftp:}
• You can either use an IPv4 or an IPv6 address for the
Example: remote FTP/HTTP/TFTP servers.
Device(config)# boot system switch 1
http://192.0.2.42/image-filename
• You must enter the IPv6 address inside the square
brackets (as per RFC 2732); if not the device will not
or boot.
Device(config)# boot system switch 1
http://[2001:db8::1]/image-filename
SUMMARY STEPS
1. enable
2. configure terminal
3. • no boot ipxe
• default boot ipxe
4. end
DETAILED STEPS
Step 3 • no boot ipxe Configures device boot. The default bot mode is device
• default boot ipxe boot.
Example: Enables default configuration on the device.
Device(config)# no boot ipxe
Example:
Device(config)# default boot ipxe
The following example shows how to configure the boot mode to ipxe-timeout. The configured
timeout is 200 seconds. If an iPXE boot failure occurs after the configured timeout expires, the
configured device boot is activated. In this example, the configured device boot is
http://[2001:db8::1]/image-filename.
Device# configure terminal
Device(config)# boot ipxe timeout 200 switch 2
Device(config)# boot system http://[2001:db8::1]/image-filename
Device(config)# end
Default-least-time 600;
max-lease-time-7200;
log-facility local7;
#Global configuration
#domain search list
option dhcp6.domain-search "cisco.com" ;
#User-defined options:new-name code new-code = definition ;
option dhcp6.user-class code 15 = string ;
option dhcp6.vendor-class-data code 16 = string;
subnet6 2001:db8::/64 {
#subnet range for clients requiring an address
range6 2001:db8:0000:0000::/64;
}
#Client-specific parameters
host switch1 {
#assigning a fixed IPv6 address
fixed-address6 2001:DB8::CAFE ;
#Client DUID in hexadecimal that contains: DUID-type "2" + "EN=9" + "Chassis serial
number"
host-identifier option dhcp6.client-id 00:02:00:00:00:09:46:4F:43:31:38:33:
31:58:31:41:53;
option dhcp6.bootfile-url "http://[2001:DB8::461/platform-pxe/edi46/test-image.bin";
}
For more information on DHCP server commands, see the ISC DHCP Server website.
In this sample configuration, the dhcp6.client-id option identifies the switch, and it is followed by
the Enterprise Client DUID. The client DUID can be broken down for understanding as 00:02 +
00:00:00:09 + chassis serial number in hexadecimal format, where 2 refers to the Enterprise Client
DUID Type, 9 refers to the reserved code for Cisco’s Enterprise DUID, followed by the ASCII code
for the Chassis serial number in hexadecimal format. The chassis serial number for the switch in this
sample is FOC1831X1AS.
The Boot File URI is advertised to the switch only using the specified DUID.
The DHCPv6 Vendor Class Option 16 can also be used to identify the switch on the DHCP Server.
To define Option 16 as a user-defined option, configure the following:
The following is a sample DHCP server configuration that identifies the switch based on the DHCPv6
Vendor Class Option 16 that is formed by using the switch Product ID:
# Source: dhcp6ConfigPID
host edi-46-ipxe6-auto-edi46 {
fixed-address6 2001:DB8::1234;
host-identifier option dhcp6.client-id 00:02:00:00:00:09:
46:4F:43:31:38:33:31:58:31:58:31:41:53;
if option dhcp6.vendor-class-data = 00:00:00:09:00:0E:57:
53:2D:43:33:38:35:30:2D:32:34:50:2D:4C {
option dhcp6.bootfile-url "http://[2001:DB8::461/platform-pxe/edi46/17jan-dev.bin";
}
}
In this sample configuration, the dhcp6.vendor-class-data option refers to the DHCPv6 Option 16.
In the dhcp6.vendor-class-data, 00:00:00:09 is Cisco’s Enterprise DUID, 0E is the length of the PID,
and the rest is the PID in hexadecimal format. The PID can also be found from the output of the
show inventory command or from the CFG_MODEL_NUM rommon variable. The PID used in
this sample configuration is WS-C3850-24P-L.
DHCPv6 options and DUIDs in the server configuration must be specified in the hexadecimal format,
as per the ISC DHCP server guidelines.
Note We recommend the use of ISC DHCP server. This feature has not been
verified on IOS DHCP.
• To test the HTTP server connectivity, use HTTP copy to copy a small sample file from your HTTP server
to your device. For example, at the rommon prompt, enter copy http://192.168.1.1/test null: (the flash
is normally locked and you need to use the null device for testing) or http://[2001:db8::99]/test.
• When manual boot is enabled, and boot mode is ipxe-timeout, the device will not automatically boot on
power up. Issue the boot command in rommon mode. To automate the boot process on power up, disable
manual boot.
• Use the net6-show command to display the current IPv6 parameters, including IPv6 addresses and the
default router in rommon mode
Note On Catalyst 9000 Series Switches, use the net-show show command.
• Use the net-dhcp or the net6-dhcp commands based on your configuration, The net-dhcp command is
a test command for DHCPv4 and the net6-dhcp command is for DHCPv6.
Note On Catalyst 9000 Series Switches, use the net-dhcp -6 command for
DHCPv6.
Note On Catalyst 9000 Series Switches, use the dns-lookup commmand to resolve
names.
• Enable HTTP debug logs to view the HTTP response code from the web server.
• If Stateless Address Auto-Configuration (SLAAC) addresses are not generated, there is no router that is
providing IPv6 RA messages. iPXE boot for IPv6 can still work but only with link or site-local addresses.
Standard/RFC Title
RFC 3315 Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support.
To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
iPXE Cisco IOS XE Denali 16.5.1a Network Bootloaders support booting from an
IPv4/IPv6 device-based or network-based
source. A network boot source must be
detected automatically by using an iPXE-like
solution.
This feature was implemented on the following
platforms:
• Catalyst 3650 Series Switches
• Catalyst 3850 Series Switches
Cisco IOS XE Denali 16.6.1 In Cisco IOS XE Denali 16.6.1, this feature
was implemented on the following platforms:
• Catalyst 9300 Series Switches
• Catalyst 9500 Series Switches
Cisco IOS XE Everest 16.6.2 In Cisco IOS XE Everest 16.6.2, this feature
was implemented on Cisco Catalyst 9400
Series Switches.
Cisco IOS XE Fuji 16.9.2 In Cisco IOS XE Fuji 16.9.2, this feature was
implemented on the following platforms.
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300L SKUs
Cisco IOS XE Gibraltar 16.11.1 In Cisco IOS XE Gibraltar 16.11.1, this feature
was implemented on Cisco Catalyst 9600
Series Switches.
IPXE IPv6 Support Cisco IOS XE 16.8.1a IPXE supports the IPv6 protocol.
This feature was implemented on the following
platforms:
• Catalyst 9300 Series Switches
• Catalyst 9400 Series Switches
• Catalyst 9500 Series Switches
update, and operate third-party Linux applications. The Guest Shell is bundled with the system image and
can be installed using the guestshell enable Cisco IOS command.
The Guest Shell environment is intended for tools, Linux utilities, and manageability rather than networking.
Guest Shell shares the kernel with the host (Cisco switches and routers) system. Users can access the Linux
shell of Guest Shell and update scripts and software packages in the container root filesystem. However, users
within the Guest Shell cannot modify the host file system and processes.
Guest Shell container is managed using IOx. IOx is Cisco's Application Hosting Infrastructure for Cisco IOS
XE devices. IOx enables hosting of applications and services developed by Cisco, partners, and third-party
developers in network edge devices, seamlessly across diverse and disparate hardware platforms.
Cisco ISR 4000 Series Integrated Services Routers 8 GB DRAM (In Cisco IOS XE Fuji 16.8.1 and
previous releases.)
4GB DRAM (In Cisco IOS XE Fuji 16.8.1 and later
releases.)
All other platforms are shipped with sufficient resources to support Guest Shell.
Note Virtual-service installed applications and the Guest Shell container cannot co-exist.
Note A Guest Shell installed via bootflash does not allow you to do resource resizing using application hosting
configuration commands.
During Guest Shell installation, if enough hard disk space is not available, an error message is displayed.
The following is a sample error message on an Cisco ISR 4000 Series Integrated Services Router
Bootflash or hard disk space can be used to store additional data by Guest Shell. On Cisco 4000 Series
Integrated Services Routers, Guest Shell has 800 MB of storage space available. Because Guest Shell accesses
the bootflash, it can use the entire space available.
CPU 1% 1/100%
Note 1% is not standard; 800
CPU units/ total system
CPU units.
Note IOx must be configured before the guestshell enable command is used.
The guestshell run bash command opens the Guest Shell bash prompt. Guest Shell must already be enabled
for this command to work.
Note If the following message is displayed on the console, it means that IOx is not enabled; check the output
of the show iox-service command to view the status of IOx.
For more information on how to enable Guest Shell, see the "Configuring the AppGigabitEthernet Interface
for Guest Shell" and "Enabling Guest Shell on the Management Interface" sections.
Note For platforms without a management port, a VirtualPortGroup can be associated with Guest Shell in the
Cisco IOS configuration. For more information, see the Sample VirtualPortGroup Configuration section.
Cisco Catalyst 9200 Series Switches, Cisco Catalyst 9300 Series Switches, and Cisco Catalyst 9400 Series
Switches support the AppGigabitEthernet intterface and management interface (mgmt-if) to access Guest
Shell.
Cisco Catalyst 9500 and 9500 High-Performance Series Switches and Cisco Catalyst 9600 Series Switches
do not support AppGigabitEthernet interfaces.
Day Zero Guest Shell Provisioning Using Front-Panel Port or Fiber Uplink
On Day Zero, when the device has no management connectivity, and the only connectivity is either through
the front-panel port or fibre uplink port, Guest Shell is internally configured to use the available port. The
AppGigabitEthernet interface connects Guest Shell to the server.
When Guest Shell is connected to the server, the device downloads the configuration script, and configures
the device. This configuration also includes downloading, setting, and starting of the virtual machine (VM).
After the day zero configuration is complete, based on your configuration the system may reboot. Ensure that
the system boots with only the user-specific configuration.
IOXMAN Structure
Each guest application, a system LXC or a KVM instance is configured with its own syslogd and logfiles
stored within a visible file system and are not accessible to the host device. To support logging data to the
Cisco IOS syslog and tracing data to IOx tracelog on the host, two serial devices, /dev/ttyS2 and /dev/ttyS3,
are designated on the guest application for delivering data to the host as shown in the following figure.
Figure 2: IOXMAN Structure
IOXMAN is a process to establish the tracing infrastructure to provide logging or tracing services for the
guest application, except Libvirt that emulates serial devices. IOXMAN is based on the lifecycle of the guest
application to enable and disable tracing service, to send logging data to the Cisco IOS syslog, to save tracing
data to IOx tracelog, and to maintain IOx tracelog for each guest application.
The Guest Shell application will establish an SSH connection without a passwordless SSH connection to the
localhost and NETCONF port, by using guestshell as the username. This username does not correspond to
any actual users configured on the device. Even if the device does have a guestshell user configured, there is
no connection to this passwordless access. Only users with PRIV15 privilege level can access NETCONF
from within the Guest Shell.
Authentication and authorization is not bypassed; instead, authentication and authorization happens while
granting access to Guest Shell. Only users with the maximum privilege are granted this access.
Users can access the NETCONF service from Guest Shell without opening any external ports. Before connecting
to the NETCONF-YANG server on the device, you must run the initializing commands in Guest Shell. These
commands are:
iosp_client -f netconf_enable guestshell <port-number> and
iosp_client -f netconf_enable_passwordless guestshell <username>
The iosp_client -f netconf_enable guestshell port-number command configures the netconf-yang ssh
local-vrf guestshell command, and blocks connections until NETCONF-YANG is up and running.
The iosp_client -f netconf_enable_passwordless guestshell <username> command creates the SSH keys
required for Guest Shell access.
To remove the NETCONF-YANG access from Guest Shell, use the following commands:
iosp_client -f netconf_disable guestshell and
iosp_client -f netconf_disable_passwordless guestshell <username>
The iosp_client -f netconf_disable guestshell command disables access to NETCONF from within the Guest
Shell; however, the NETCONF-YANG configuration will still exist. To shut down NETCONF-YANG, use
the no netconf-yang command.
The iosp_client -f netconf_disable_passwordless guestshell username command removes the SSH keys for
the specified user. The user will not be able to access NETCONF without a password; however, the user
would still be able to connect by using a password.
The netconf_enable_guestshell python API runs a combination of the iosp_client functions, iosp_client -f
netconf_enable guestshell 830 and iosp_client -f netconf_enable_passwordless guestshell guestshell. This
API hides the unfamiliar-to-user iosp_client function. When this function is called, it does not return a response
until all commands are completed. Unless the function returns an error, you can be sure that NETCONF is
running, and the passwordless setup is complete; and you can start creating connections.
LXC Logging
1. Guest OS enables /dev/ttyS2 on the guest application.
2. Guest application writes data to /dev/ttyS2.
3. Libvirt emulates /dev/ttyS2 to /dev/pts/x on the host.
4. IOXMAN gets the emulated serial device, /dev/pts/x from the XML file.
5. IOXMAN listens and reads available data from /dev/pts/x, sets the severity for the message, filters, parses
and queues the message.
6. Start timer to send the message to /dev/log device on the host using errmsg.
7. Data is saved to the Cisco IOS syslog.
KVM Logging
1. Guest OS enables /dev/ttyS2 on the guest application.
2. Guest application writes data to /dev/ttyS2.
3. Libvirt emulates /dev/ttyS2 to /dev/pts/x on the host.
4. IOXMAN gets the emulated TCP path from the XML file.
5. IOXMAN opens an UNIX socket, and connects to the remote socket.
6. IOXMAN reads available data from the socket, sets the severity for the message, filters, parses, and queues
the message.
7. Starts the timer to send the message to /dev/log device on the host using errmsg.
8. Data is saved to the Cisco IOS syslog.
LXC Tracing
1. Guest OS enables /dev/ttyS3 on the guest application.
2. Configures syslogd to copy message to /dev/ttyS3.
3. Guest application writes data to /dev/ttyS3.
4. Libvirt emulates /dev/ttyS3 to /dev/pts/y on the host.
5. IOXMAN gets the emulated serial device, /dev/pts/y from the XML file.
6. IOXMAN listens and reads available data from /dev/pts/y, filters, parses, and saves the message to IOx
tracelog.
7. If IOx tracelog is full, IOXMAN rotates the tracelog file to /bootflash/tracelogs.
KVM Tracing
1. Guest OS enables /dev/ttyS3 on the guest application.
2. Configures syslog to copy the message to /dev/ttyS3.
3. Guest application writes data to /dev/ttyS3.
4. Libvirt emulates /dev/ttyS3 to TCP path on the host.
5. IOXMAN gets the emulated TCP path from the XML file.
6. IOXMAN opens an UNIX socket, and connects to the remote socket.
7. IOXMAN reads the available data from the socket, sets the severity level for the message, filters, parses,
and saves the message to IOx tracelog.
8. If IOx tracelog is full, IOXMAN rotates the tracelog file to /bootflash/tracelogs.
Perform the following steps to report logging data from a guest application to the Cisco IOS syslog:
1. If you are using C programming, use write() to send logging data to the host.
#define SYSLOG_TEST “syslog test”
int fd;
fd = open("/dev/ttyS2", O_WRONLY);
write(fd, SYSLOG_TEST, strlen(SYSLOG_TEST));
close(fd);
2. If you are using a Shell console, use echo to send logging data to the host.
echo “syslog test” > /dev/ttyS2
2. If you are using C programming, use syslog() to send tracing message to the host.
#define SYSLOG_TEST “tracelog test”
3. If you are using a Shell console, use echo to send tracing data to the host.
echo “tracelog test” > /dev/ttyS3
or
logger “tracelog test”
SUMMARY STEPS
1. enable
2. configure terminal
3. iox
4. exit
5. show iox-service
6. show app-hosting list
DETAILED STEPS
Step 6 show app-hosting list Displays the list of app-hosting services enabled on the
device.
Example:
Device# show app-hosting list
Example
The following is sample output from the show iox-service command:
The following is sample output from the show app-hosting list command:
App id State
------------------------------------------------------
guestshell RUNNING
An application or management interface must also be configured to enable and operate Guest Shell. See
"Configuring the AppGigabitEthernet Interface for Guest Shell" and "Enabling Guest Shell on the Management
Interface" sections for more information on enabling an interface for Guest Shell.
SUMMARY STEPS
1. enable
2. guestshell enable
3. guestshell run linux-executable
4. guestshell run bash
5. guestshell disable
6. guestshell destroy
DETAILED STEPS
Step 3 guestshell run linux-executable Executes or runs a Linux program in the Guest Shell.
Example: Note In Cisco IOS XE Amsterdam 17.3.1 and later
Device# guestshell run python releases, only Python version 3 is supported.
or
Device# guestshell run python3
Step 4 guestshell run bash Starts a Bash shell to access the Guest Shell.
Example:
Device# guestshell run bash
Note This section is applicable to Cisco routing platforms. VirtualPortGroups are not supported on Cisco
Catalyst Switching platforms.
IOx must be configured and running for Guest Shell access to work. If IOx is not configured, a message to
configure IOx is displayed. Removing IOx removes access to the Guest Shell, but the rootfs remains unaffected.
Note Use this procedure (Managing the Guest Shell Using Application Hosting) to enable the Guest Shell in
Cisco IOS XE Fuji 16.7.1 and later releases. For Cisco IOS XE Everest 16.6.x and previous releases,
use the procedure in Managing the Guest Shell, on page 100.
For front panel networking, you must configure the GigabitEthernet and VirtualPortGroup interfaces as shown
above. The Guest Shell uses a Virtualportgroup as the source interface to connect to the outside network
through NAT.
The following commands are used to configure inside NAT. They allow the Guest Shell to reach the internet;
for example, to obtain Linux software updates:
ip nat inside source list
ip access-list standard
permit
The guestshell run command in the example above, runs a python executable. You can also use the guestshell
run command to run other Linux executables; for example, see the example guestshell run bash command,
which starts a Bash shell or the guestshell disable command which shuts down and disables the Guest Shell.
If the system is later reloaded, the Guest Shell remains disabled.
Note The following task is applicable only to Catalyst switches that have the AppGigabitEthernet interface.
All other Catalyst switches use the management port.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface AppGigabitEthernet interface-number
4. switchport mode trunk
5. exit
6. app-hosting appid name
7. app-vnic AppGigabitEthernet trunk
8. vlan vlan-ID guest-interface guest-interface-number
9. guest-ipaddress ip-address netmask netmask
10. exit
11. exit
12. app-default-gateway ip-address guest-interface network-interface
13. nameserver# ip-address
14. end
15. guestshell enable
DETAILED STEPS
Step 3 interface AppGigabitEthernet interface-number Configures the AppGigabitEthernet interface and enters
interface configuration mode.
Example:
Device(config)# interface AppGigabitEthernet 1/0/1
Step 4 switchport mode trunk Sets the interface into permanent trunking mode and
negotiates to convert the neighboring link into a trunk link.
Example:
Device(config-if)# switchport mode trunk
Step 8 vlan vlan-ID guest-interface guest-interface-number Configures a VLAN guest interface and enters
application-hosting VLAN-access IP configuration mode.
Example:
Device(config-config-app-hosting-trunk)# vlan 4094
guest-interface 0
Step 13 nameserver# ip-address Configures the Domain Name System (DNS) server.
Example:
Device(config-app-hosting)# name-server0
172.16.0.1
Note This task is applicable to Cisco Catalyst 9200 Series Switches, Cisco Catalyst 9300 Series Switches,
Cisco Catalyst 9400 Series Switches, Cisco Catalyst 9500 Series Switches, and Cisco Catalyst 9600
Series Switches.
SUMMARY STEPS
1. enable
2. configure terminal
3. app-hosting appid name
4. app-vnic management guest-interface interface-number
5. end
6. show app-hosting list
7. guestshell enable
DETAILED STEPS
Step 4 app-vnic management guest-interface interface-number Configures the management gateway of the virtual network
interface and guest interface, and enters application-hosting
Example:
management-gateway configuration mode.
Device(config-app-hosting)# app-vnic management
guest-interface 0
Step 6 show app-hosting list Displays the current status of the installed applications.
Example: Note Guest Shell is displayed in the list of
Device# show app-hosting list applications, only if it is installed.
SUMMARY STEPS
1. iosp_client -f netconf_enable guestshell port-number
2. iosp_client -f netconf_enable_passwordless guestshell username
3. iosp_client -f netconf_disable guestshell
4. iosp_client -f netconf_disable_passwordless guestshell username
DETAILED STEPS
Step 2 iosp_client -f netconf_enable_passwordless guestshell Creates the SSH keys required for Guest Shell access.
username
Example:
Guest Shell: iosp_client -f netconf_enable
guestshell guestshell
Step 3 iosp_client -f netconf_disable guestshell Removes access to NETCONF from within the Guest Shell.
Example: • NETCONF-YANG configuration will still exist. To
GuestShell: iosp_client -f netconf_disable shut down NETCONF-YANG use the no
guestshell netconf-yang command.
Step 4 iosp_client -f netconf_disable_passwordless guestshell Removes the access keys for the specified user.
username
• NETCONF access is still enabled for the user; however
Example: the user will have to use a password to connect to
Guest Shell: iosp_client -f NETCONF.
netconf_disable_passwordless guestshell guestshell
Example
Note In releases prior to Cisco IOS XE Amsterdam 17.3.1, Python V2 is the default. Python V3 is supported
in Cisco IOS XE Amsterdam 17.1.1, and Cisco IOS XE Amsterdam 17.2.1. In Cisco IOS XE Amsterdam
17.3.1 and later releases, Python V3 is the default.
The following example shows how to enable Python on a Cisco Catalyst 3650 Series Switch or a Cisco Catalyst
3850 Series Switch:
The following example shows how to enable Python on a Cisco ISR 4000 Series Integrated Services Router:
Device> enable
Device# guestshell enable
[guestshell@guestshell ~]$
Device> enable
Device# guestshell enable
>>>>>
[guestshell@guestshell ~]$
When using the VirtualPortGroup interface for Guest Shell networking, the VirtualPortGroup interface
must have a static IP address configured. The front port interface must be connected to the Internet
and Network Address Translation (NAT) must be configured between the VirtualPortGroup and the
front panel port.
The following is a sample VirtualPortGroup configuration:
Device> enable
Device# configure terminal
Device(config)# interface VirtualPortGroup 0
Device(config-if)# ip address 192.168.35.1 255.255.255.0
Device(config-if)# ip nat inside
Device(config-if)# no mop enabled
Device(config-if)# no mop sysid
Device(config-if)# exit
Device(config)# interface GigabitEthernet 0/0/3
Device(config-if)# ip address 10.0.12.19 255.255.0.0
Device(config-if)# ip nat outside
Device(config-if)# negotiation auto
Device(config-if)# exit
Device(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.1
Device(config)# ip route 10.0.0.0 255.0.0.0 10.0.0.1
!Port forwarding to use ports for SSH and so on.
Device(config)# ip nat inside source static tcp 192.168.35.2 7023 10.0.12.19 7023 extendable
Device(config)# ip nat outside source list NAT_ACL interface GigabitEthernet 0/0/3 overload
Device(config)# ip access-list standard NAT_ACL
Device(config-std-nacl)# permit 192.168.0.0 0.0.255.255
Device(config-std-nacl)# exit
! App-hosting configuration
Device(config)# app-hosting appid guestshell
Device(config-app-hosting)# app-vnic gateway1 virtualportgroup 0 guest-interface 0
guest-ipaddress 192.168.35.2
netmask 255.255.255.0 gateway 192.168.35.1 name-server 8.8.8.8 default
Device(config-app-hosting)# app-resource profile custom cpu 1500 memory 512
Device(config-app-hosting)# end
Note The following task is applicable only to Catalyst switches that have the AppGigabitEthernet interface.
All other Catalyst switches use the management port.
The following example shows how to configure an AppGigabitEthernet interface for Guest Shell.
Here, VLAN 4094 creates a Network Address Translation (NAT) this is used for Guest Shell. VLAN
1 is an external interface.
Device> enable
Device# configure terminal
Device(config)# ip nat inside source list NAT_ACL interface vlan 1 overload
Device(config)# ip access-list standard NAT_ACL
Device(config-std-nacl)# permit 192.168.0.0 0.0.255.255
Device(config-std-nacl)# exit
Device(config)# vlan 4094
Device(config-vlan)# exit
Device(config)# interface vlan 4094
Device(config-if)# ip address 192.168.2.1 255.255.255.0
Device(config-if)# ip nat inside
Device(config-if)# exit
Device(config)# interface vlan 1
Device(config-if)# ip nat outside
Device(config-if)# exit
Device(config)# ip routing
Device(config)# ip route 0.0.0.0 0.0.0.0 209.165.201.1
Device(config)# interface AppGigabitEthernet 1/0/1
Device(config-if)# switchport mode trunk
Device(config-if)# exit
Device(config)# app-hosting appid guestshell
Device(config-app-hosting)# app-vnic AppGigEthernet trunk
Device(config-config-app-hosting-trunk)# vlan 4094 guest-interface 0
Device(config-config-app-hosting-vlan-access-ip)# guest-ipaddress 192.168.2.2 netmask
255.255.255.0
Device(config-config-app-hosting-vlan-access-ip)# exit
Device(config-config-app-hosting-trunk)# exit
Device(config-app-hosting)# app-default-gateway 192.168.2.1 guest-interface 0
Device(config-app-hosting)# name-server0 172.16.0.1
Device(config-app-hosting)# name-server1 198.51.100.1
Device(config-app-hosting)# end
Device# guestshell enable
From the Guest Shell prompt, you can run Linux commands. The following example shows the usage
of some Linux commands.
[guestshell@guestshell~]$ pwd
/home/guestshell
[guestshell@guestshell~]$ whoami
guestshell
[guestshell@guestshell~]$ uname -a
Linux guestshell 5.4.85 #1 SMP Tue Dec 22 10:50:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Cisco 4000 Series Integrated Services Routers use the dohost provided by CentOS Linux release
7.1.1503.
Note The dohost command requires the ip http server command to be configured on the device.
Other Options:
[guestshell@guestshell ~]$ cat/etc/resolv.conf
domain cisco.com
search cisco.com
nameserver 192.0.2.1
search cisco.com
nameserver 198.51.100.1
nameserver 172.16.0.6
domain cisco.com
nameserver 192.0.2.1
nameserver 172.16.0.6
nameserver 192.168.255.254
If your network is behind a proxy, configure proxy variables in Linux. If required, add these variables
to your environment.
The following example shows how to configure your proxy variables:
The following example shows how to use Yum for setting proxy environment variables:
PIP install picks up environment variable used for proxy settings. Use sudo with -E option for PIP
installation. If the environment variables are not set, define them explicitly in PIP commands as
shown in following example:
The following example shows how to use PIP install for Python:
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Guest Shell Cisco IOS XE Everest 16.5.1a Guest Shell is a secure container
that is an embedded Linux
Cisco IOS XE Everest 16.5.1b
environment that allows customers
to develop and run Linux and
custom Python applications for
automated control and management
of Cisco switches. It also includes
the automated provisioning of
systems. This container shell
provides a secure environment,
decoupled from the host device, in
which users can install scripts or
software packages and run them.
In Cisco IOS XE Everest 16.5.1a,
this feature was implemented on
the following platforms:
• Cisco Catalyst 3650 Series
Switches
• Cisco Catalyst 3850 Series
Switches
• Cisco Catalyst 9300 Series
Switches
• Cisco Catalyst 9500 Series
Switches
NETCONF Access from Guest Cisco IOS XE Bengaluru 17.6.1 NETCONF can be accessed from
Shell within the Guest Shell, so that users
can run Python scripts and invoke
Cisco-custom package CLIs using
the NETCONF protocol.
In 17.6.1, this feature was
implemented on the following
platforms:
• Cisco Catalyst 9200 Series
Switches
• Cisco Catalyst 9300 and
9300L Series Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 and
9500-High Performance Series
Switches
• Cisco Catalyst 9600 Series
Switches
Python 3 Support in Guest Shell Cisco IOS XE Amsterdam 17.1.1 Python Version 3.6 is supported in
Guest Shell. Python Version 3.6 is
available on all supported
platforms.
About Python
The Cisco IOS XE devices support Python Version 2.7 in both interactive and non-interactive (script) modes
within the Guest Shell. The Python scripting capability gives programmatic access to a device's CLI to perform
various tasks and Zero Touch Provisioning or Embedded Event Manager (EEM) actions.
configure(configuration)
Apply a configuration (set of Cisco IOS CLI config-mode commands) to the device
and return a list of results.
except CLIConfigurationError as e:
print "Failed configurations:"
for failure in e.failed:
print failure
Args:
configuration (str or iterable): Configuration commands, separated by newlines.
Returns:
list(ConfigResult): A list of results, one for each line.
Raises:
CLISyntaxError: If there is a syntax error in the configuration.
>>> help(configurep)
Help on function configurep in module cli:
configurep(configuration)
Apply a configuration (set of Cisco IOS CLI config-mode commands) to the device
and prints the result.
Args:
configuration (str or iterable): Configuration commands, separated by newlines.
>>> help(execute)
Help on function execute in module cli:
execute(command)
Execute Cisco IOS CLI exec-mode command and return the result.
Args:
command (str): The exec-mode command to run.
Returns:
str: The output of the command.
Raises:
CLISyntaxError: If there is a syntax error in the command.
>>> help(executep)
Help on function executep in module cli:
executep(command)
Execute Cisco IOS CLI exec-mode command and print the result.
executep("show version")
Args:
command (str): The exec-mode command to run.
>>> help(cli)
Help on function cli in module cli:
cli(command)
Execute Cisco IOS CLI command(s) and return the result.
Args:
command (str): The exec or config CLI command(s) to be run.
Returns:
string: CLI output for show commands and an empty string for
configuration commands.
Raises:
errors.cli_syntax_error: if the command is not valid.
errors.cli_exec_error: if the execution of command is not successful.
>>> help(clip)
Help on function clip in module cli:
clip(command)
Execute Cisco IOS CLI command(s) and print the result.
clip("show version")
clip("show version ; show ip interface brief")
clip("configure terminal ; interface gigabitEthernet 0/0 ; no shutdown")
Args:
command (str): The exec or config CLI command(s) to be run.
Note Guest Shell must be enabled for Python to run. For more information, see the Guest Shell chapter.
The Python programming language uses six functions that can execute CLI commands. These functions are
available from the Python CLI module. To use these functions, execute the import cli command. The ip http
server command must be enabled for these functions to work.
Arguments for these functions are strings of CLI commands. To execute a CLI command through the Python
interpreter, enter the CLI command as an argument string of one of the following six functions:
• cli.cli(command)—This function takes an IOS command as an argument, runs the command through
the IOS parser, and returns the resulting text. If this command is malformed, a Python exception is raised.
The following is sample output from the cli.cli(command) function:
10.10.10.10 255.255.255.255')
*Mar 13 18:39:48.518: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback10, changed
state to up
>>> cli.clip('show clock')
'\n*18:11:53.989 UTC Mon Mar 13 2017\n'
>>> output=cli.cli('show clock')
>>> print(output)
*18:12:04.705 UTC Mon Mar 13 2017
• cli.clip(command)—This function works exactly the same as the cli.cli(command) function, except
that it prints the resulting text to stdout rather than returning it. The following is sample output from the
cli.clip(command) function:
>>>cli
>>>cli.clip('configure terminal; interface loopback 11; ip address
10.11.11.11 255.255.255.255')
*Mar 13 18:42:35.954: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback11, changed
state to up
*Mar 13 18:42:35.954: %LINK-3-UPDOWN: Interface Loopback11, changed state to up
>>> cli.clip('show clock')
*18:13:35.313 UTC Mon Mar 13 2017
>>> output=cli.clip('show clock')
*18:19:26.824 UTC Mon Mar 13 2017
>>> print (output)
None
• cli.execute(command)—This function executes a single EXEC command and returns the output; however,
does not print the resulting text No semicolons or newlines are allowed as part of this command. Use a
Python list with a for-loop to execute this function more than once. The following is sample output from
the cli.execute(command)
function:
• cli.executep(command)—This function executes a single command and prints the resulting text to stdout
rather than returning it. The following is sample output from the cli.executep(command) function:
The command parameters can be in multiple lines and in the same format that is displayed in the output
of the show running-config command. The following is sample output from the cli.configure(command)
function:
Device#
Python Script
Python scripts can run in non-interactive mode by providing the Python script name as an argument in the
Python command. Python scripts must be accessible from within the Guest Shell. To access Python scripts
from the Guest Shell, save the scripts in bootflash/flash that is mounted within the Guest Shell.
Note The ip http server command must be configured for the import cli in Python to work.
The following sample Python script uses different CLI functions to configure and print show commands:
Device# more flash:sample_script.py
import sys
import cli
intf= sys.argv[1:]
intf = ''.join(intf[0])
print "\n\n *** Configuring interface %s with 'configurep' function *** \n\n" %intf
cli.configurep(["interface loopback55","ip address 10.55.55.55 255.255.255.0","no
shut","end"])
print "\n\n *** Configuring interface %s with 'configure' function *** \n\n"
cmd='interface %s,logging event link-status ,end' % intf
cli.configure(cmd.split(','))
print "\n\n *** Printing show cmd with 'executep' function *** \n\n"
cli.executep('show ip interface brief')
print "\n\n *** Printing show cmd with 'execute' function *** \n\n"
output= cli.execute('show run interface %s' %intf)
print (output)
print "\n\n *** Configuring interface %s with 'cli' function *** \n\n"
cli.cli('config terminal; interface %s; spanning-tree portfast edge default' %intf)
print "\n\n *** Printing show cmd with 'clip' function *** \n\n"
cli.clip('show run interface %s' %intf)
To run a Python script from the Guest Shell, execute the guestshell run python
/flash/script.py command
at the device prompt.
The following example shows how to run a Python script from the Guest Shell:
The following example shows how to run a Python script from the Guest Shell:
Building configuration...
Current configuration : 93 bytes
!
interface Loopback55
ip address 10.55.55.55 255.255.255.0
logging event link-status
end
Building configuration...
Current configuration : 93 bytes
!
interface Loopback55
ip address 10.55.55.55 255.255.255.0
logging event link-status
end
Python Version 2.7.5 All supported platforms except for Cisco Catalyst
3650 Series Switches and Cisco Catalyst 3850 Series
Switches.
Platforms with CentOS 7 support the installation of Redhat Package Manager (RPM) from the open source
repository.
Note When you update to Python Version 3 on a device that already has Python Version 2, both versions of
Python exist on the device. Use one of the following IOS commands to run Python:
• The guestshell run python2 command enables Python Version 2.
• The guestshell run python3 command enables Python Version 3.
• The guestshell run python command enables Python Version 2.
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
CLI Python Module Cisco IOS XE Everest Python programmabilty provides a Python
16.5.1a module that allows users to interact with IOS
using CLIs.
In Cisco IOS XE Everest 16.5.1a, this feature
was implemented on the following platforms:
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9500 Series Switches
Cisco IOS XE Fuji 16.8.1 In Cisco IOS XE Fuji 16.8.1, this feature was
implemented on following platforms:
Cisco IOS XE Fuji 16.8.1a
• Cisco ASR 1004 Router
• Cisco ASR 1006 Router
• Cisco ASR 1006-X Router
• Cisco ASR 1009-X Router
• Cisco ASR 1013 Router
• Cisco 4000 Series Integrated Services
Router models with a minimum of 4 GB
RAM.
Note The EEM Python package is available only within the EEM Python script (The package can be registered
with EEM, and has the EEM event specification in the first line of the script.) and not in the standard
Python script (which is run using the Python script name).
The Python package includes the following application programming interfaces (APIs):
• Action APIs—Perform EEM actions and have default parameters.
• CLI-execution APIs—Run IOS commands, and return the output. The following are the list of
CLI-execution APIs:
• eem_cli_open()
• eem_cli_exec()
• eem_cli_read()
• eem_cli_read_line()
• eem_cli_run()
• eem_cli_run_interactive()
• eem_cli_read_pattern()
• eem_cli_write()
• eem_cli_close()
• Environment variables-accessing APIs—Get the list of built-in or user-defined variables. The following
are the environment variables-accessing APIs:
• eem_event_reqinfo ()-Returns the built-in variables list.
• eem_user_variables()-Returns the current value of an argument.
The EEM Python package exposes the interfaces for executing EEM actions. You can use the Python script
to call these actions, and they are forwarded from the Python package via Cisco Plug N Play (PnP) to the
action handler.
EEM Variables
An EEM policy can have the following types of variables:
• Event-specific built-in variables—A set of predefinied variables that are populated with details about
the event that triggered the policy. The eem_event_reqinfo () API returns the builtin variables list. These
variables can be stored in the local machine and used as local variables. Changes to local variables do
not reflect in builtin variables.
• User-defined variables—Variables that can be defined and used in policies. The value of these variables
can be referred in the Python script. While executing the script, ensure that the latest value of the variable
is available. The eem_user_variables() API returns the current value of the argument that is provided in
the API.
DETAILED STEPS
Step 3 event manager directory user policy path Specifies a directory to use for storing user library files or
user-defined EEM policies.
Example:
Device(config)# event manager directory user policy Note You must have a policy in the specified path.
flash:/user_library For example, in this step, the eem_script.py
policy is available in the flash:/user_library
folder or path.
Step 6 show event manager policy registered Displays the registered EEM policies.
Example:
Device# show event manager policy registered
Step 7 show event manager history events Displays EEM events that have been triggered.
Example:
Device# show event manager history events
Example
The following is sample output from the show event manager policy registered command:
Device# show event manager policy registered
not available in the standard Python script. The standard Python script in IOS has a package named
from cli import cli,clip and this package can be used to execute IOS commands.
import sys
from cli import cli,clip,execute,executep,configure,configurep
intf= sys.argv[1:]
intf = ''.join(intf[0])
print ('This script is going to unshut interface %s and then print show ip interface
brief'%intf)
if intf == 'loopback55':
configurep(["interface loopback55","no shutdown","end"])
else :
cmd='int %s,no shut ,end' % intf
configurep(cmd.split(','))
This following is sample output from the guestshell run python command.
Device# guestshell run python /flash/eem_script.py loop55
This script is going to unshut interface loop55 and then print show ip interface brief
Line 1 SUCCESS: int loop55
Line 2 SUCCESS: no shut
Line 3 SUCCESS: end
Interface IP-Address OK? Method Status Protocol
Vlan1 unassigned YES NVRAM administratively down down
GigabitEthernet0/0 5.30.15.37 YES NVRAM up up
GigabitEthernet1/0/1 unassigned YES unset down down
GigabitEthernet1/0/2 unassigned YES unset down down
GigabitEthernet1/0/3 unassigned YES unset down down
GigabitEthernet1/0/4 unassigned YES unset up up
GigabitEthernet1/0/5 unassigned YES unset down down
GigabitEthernet1/0/6 unassigned YES unset down down
GigabitEthernet1/0/7 unassigned YES unset down down
GigabitEthernet1/0/8 unassigned YES unset down down
GigabitEthernet1/0/9 unassigned YES unset down down
GigabitEthernet1/0/10 unassigned YES unset down down
GigabitEthernet1/0/11 unassigned YES unset down down
GigabitEthernet1/0/12 unassigned YES unset down down
GigabitEthernet1/0/13 unassigned YES unset down down
GigabitEthernet1/0/14 unassigned YES unset down down
GigabitEthernet1/0/15 unassigned YES unset down down
GigabitEthernet1/0/16 unassigned YES unset down down
GigabitEthernet1/0/17 unassigned YES unset down down
GigabitEthernet1/0/18 unassigned YES unset down down
GigabitEthernet1/0/19 unassigned YES unset down down
GigabitEthernet1/0/20 unassigned YES unset down down
GigabitEthernet1/0/21 unassigned YES unset down down
GigabitEthernet1/0/22 unassigned YES unset down down
GigabitEthernet1/0/23 unassigned YES unset up up
GigabitEthernet1/0/24 unassigned YES unset down down
GigabitEthernet1/1/1 unassigned YES unset down down
GigabitEthernet1/1/2 unassigned YES unset down down
GigabitEthernet1/1/3 unassigned YES unset down down
GigabitEthernet1/1/4 unassigned YES unset down down
Te1/1/1 unassigned YES unset down down
Te1/1/2 unassigned YES unset down down
Te1/1/3 unassigned YES unset down down
Device#
Jun 7 12:51:20.549: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback55,
changed state to up
Jun 7 12:51:20.549: %LINK-3-UPDOWN: Interface Loopback55, changed state to up
The following is a sample script for printing messages to the syslog. This script must be stored in a
file, copied to the file system on the device, and registered using the event manager policy file.
import eem
import time
The following is sample script to print EEM environment variables. This script must be stored in a
file, copied to the file system on the device, and registered using the event manager policy file.
import eem
import time
c = eem.env_reqinfo()
DETAILED STEPS
Step 3 event manager applet applet-name Registers an applet with the Embedded Event Manager
(EEM) and enters applet configuration mode.
Example:
Device(config)# event manager applet
interface_Shutdown
Step 4 event [tag event-tag] syslog pattern regular-expression Specifies a regular expression to perform the syslog message
pattern match.
Example:
Device(config-applet)# event syslog pattern
"Interface Loopback55,
changed state to administratively down"
Step 5 action label cli command cli-string Specifies the IOS command to be executed when an EEM
applet is triggered.
Example:
Device(config-applet)# action 0.0 cli command "en"
Step 6 action label cli command cli-string [ pattern pattern-string Specifies the action to be specified with the pattern
] keyword.
Example: • Specify a regular expression pattern string that will
Device(config-applet)# action 1.0 cli command match the next solicited prompt.
"guestshell run python3 /bootflash/eem_script.py
loop55"
Step 8 show event manager policy active Displays EEM policies that are executing.
Example:
Device# show event manager policy active
Step 9 show event manager history events Displays the EEM events that have been triggered.
Example:
Device# show event manager history events
What to do next
The following example shows how to trigger the Python script configured in the task:
Device(config)# interface loopback 55
Device(config-if)# shutdown
Device(config-if)# end
Device#
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
EEM Python Module Cisco IOS XE Everest This feature supports Python scripts as EEM
16.5.1a policies.
Cisco IOS XE Everest No new commands were introduced.
16.5.1b
In Cisco IOS XE Everest 16.5.1a, this feature
was implemented on the following platforms:
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
•
In Cisco IOS XE Everest 16.5.1b, this feature
was implemented on the following platforms:
• Cisco ISR 4000 Series Integrated Service
Routers
Cisco IOS XE Everest 16.6.2 In Cisco IOS XE Everest 16.6.2, this feature
was implemented on Cisco Catalyst 9400
Series Switches.
Cisco IOS XE Fuji 16.8.1a In Cisco IOS XE Fuji 16.8.1a, this feature was
implemented on Cisco Catalyst 9500-High
Performance Series Switches
Note To access Cisco YANG models in a developer-friendly way, clone the GitHub repository, and navigate
to the vendor/cisco subdirectory. Models for various releases of IOS-XE, IOS-XR, and NX-OS platforms
are available here.
NETCONF
NETCONF provides a mechanism to install, manipulate, and delete the configuration of network devices.
It uses an Extensible Markup Language (XML)-based data encoding for the configuration data as well as the
protocol messages.
NETCONF uses a simple Remote Procedure Call (RPC) based mechanism to facilitate communication between
a client and a server. The client can be a script or application running as part of a network manager. The server
is typically a network device (switch or router). It uses Secure Shell (SSH) as the transport layer across network
devices. It uses SSH port number 830 as the default port. The port number is a configurable option.
NETCONF also supports capability discovery and model downloads. Supported models are discovered using
the ietf-netconf-monitoring model. Revision dates for each model are shown in the capabilities response.
Data models are available for optional download from a device using the get-schema RPC. You can use these
YANG models to understand or export the data model. For more details on NETCONF, see RFC 6241.
In releases prior to Cisco IOS XE Fuji 16.8.1, an operational data manager (based on polling) was enabled
separately. In Cisco IOS XE Fuji 16.8.1 and later releases, operational data works on platforms running
NETCONF (similar to how configuration data works), and is enabled by default. For more information on
the components that are enabled for operational data queries or streaming, see the GitHub respository, to view
*-oper in the naming convention.
<filter>
<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"/>
</filter>
</get>
</rpc>
The output of the RPC reply contains a list of all the YANG modules regardless of the YANG version each
module uses.
Cisco IOS XE Cupertino 17.7.1 uses the YANG Version 1.0; however, you can still download the YANG
Version 1.1 from GitHub at https://github.com/YangModels/yang/tree/master/vendor/cisco/xe.
Alternatively, you can also download the YANG models from the device using the NETCONF get-schema
operation, and migrate the downloaded models to this version using the migrate_yang_version.py script.
The following example shows how to migrate from YANG Version 1.0 to YANG Version 1.1 using the script:
Use the help command to view the options available with the script:
positional arguments:
path Path to the YANG files
optional arguments:
-h, --help show this help message and exit
--out OUT Path to the output YANG file
The following example shows how to use the out argument to move a file from its original location to another
folder:
In the above example, testdir/outdir is the directory in which the YANG model Version 1.1 resides or where
the output of the script is placed. This directory will be created, if it is not available.
The testdir/indir directory is where the YANG model Version 1.0 resides; the input for the script.
After the YANG model Version 1.1 is created, either by downloading it from GitHub or by using the
migrate_yang_version.py script and compiled on the client application, end-to-end YANG model tests can
be executed and validated against Cisco IOS XE devices.
Note The YANG models on the device is still YANG Version 1.0. However; there is no need to change the
RPC payload of the client test cases.
For inquiries related to the migrate_yang_version.py script or the Cisco IOS XE YANG migration process,
send an email to [email protected].
Cisco IOS XE Cupertino 17.8.1 uses YANG Version 1.1. The difference between YANG Version 1.1 and
Version 1.0 is documented at https://tools.ietf.org/html/rfc7950#page-10.
<config xmlns="http://tail-f.com/ns/config/1.0">
<native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<version>17.8</version>
<boot-start-marker/>
<boot>
<system>
<flash>
<flash-list-ordered-by-user>
<flash-leaf>bootflash:c8000v-universalk9.BLD_POLARIS_DEV_LATEST_20211020_005209.SSA.bin</
flash-leaf>
</flash-list-ordered-by-user>
</flash>
</system>
</boot>
<boot-end-marker/>
<memory>
<free>
<low-watermark>
<processor>64219</processor>
</low-watermark>
</free>
</memory>
<call-home>
<contact-email-addr xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-call-home">
[email protected]</contact-email-addr>
<tac-profile xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-call-home">
<profile>
<CiscoTAC-1>
<active>true</active>
<destination>
<transport-method>http</transport-method>
</destination>
</CiscoTAC-1>
</profile>
</tac-profile>
</call-home>
<service>
<timestamps>
<debug-config>
<datetime>
<msec/>
<localtime/>
<show-timezone/>
</datetime>
</debug-config>
<log-config>
<datetime>
<msec/>
<localtime/>
<show-timezone/>
</datetime>
</log-config>
</timestamps>
<call-home/>
</service>
<platform>
<console xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-platform">
<output>serial</output>
</console>
<qfp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-platform">
<utilization>
<monitor>
<load>80</load>
</monitor>
</utilization>
</qfp>
<punt-keepalive xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-platform">
<disable-kernel-core>true</disable-kernel-core>
</punt-keepalive>
</platform>
<hostname>pi-prog-csr1</hostname>
<enable>
<password>
<secret>lab</secret>
</password>
</enable>
<username>
<name>admin</name>
<privilege>15</privilege>
<password>
<encryption>0</encryption>
<password>lab</password>
</password>
</username>
<vrf>
<definition>
<name>Mgmt-intf</name>
<address-family>
<ipv4>
</ipv4>
<ipv6>
</ipv6>
</address-family>
</definition>
</vrf>
<ip>
<domain>
<name>cisco</name>
</domain>
<forward-protocol>
<protocol>nd</protocol>
</forward-protocol>
<route>
<ip-route-interface-forwarding-list>
<prefix>10.0.0.0</prefix>
<mask>255.255.0.0</mask>
<fwd-list>
<fwd>10.45.0.1</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
<vrf>
<name>Mgmt-intf</name>
<ip-route-interface-forwarding-list>
<prefix>0.0.0.0</prefix>
<mask>0.0.0.0</mask>
<fwd-list>
<fwd>10.104.54.129</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
</vrf>
</route>
<ssh>
<ssh-version>2</ssh-version>
</ssh>
<tftp>
<source-interface>
<GigabitEthernet>1</GigabitEthernet>
</source-interface>
<blocksize>8192</blocksize>
</tftp>
<http xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-http">
<authentication>
<local/>
</authentication>
<server>true</server>
<secure-server>true</secure-server>
</http>
</ip>
<ipv6>
<unicast-routing/>
</ipv6>
<interface>
<GigabitEthernet>
<name>1</name>
<vrf>
<forwarding>Mgmt-intf</forwarding>
</vrf>
<ip>
<address>
<primary>
<address>10.104.54.222</address>
<mask>255.255.255.128</mask>
</primary>
</address>
</ip>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>2</name>
<ip>
<address>
<primary>
<address>9.45.21.231</address>
<mask>255.255.0.0</mask>
</primary>
</address>
</ip>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>3</name>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>4</name>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>5</name>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
</interface>
<control-plane>
</control-plane>
<clock>
<timezone>
<zone>IST</zone>
<hours>5</hours>
<minutes>30</minutes>
</timezone>
</clock>
<logging>
<console-config>
<console>false</console>
</console-config>
</logging>
<aaa>
<new-model xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa"/>
<authentication xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">
<login>
<name>default</name>
<a1>
<local/>
</a1>
</login>
</authentication>
<authorization xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">
<exec>
<name>default</name>
<a1>
<local/>
</a1>
</exec>
</authorization>
<common-criteria xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">
<policy>enable_secret_policy</policy>
<char-changes>4</char-changes>
<lower-case>1</lower-case>
<max-length>127</max-length>
<min-length>10</min-length>
<numeric-count>1</numeric-count>
<upper-case>1</upper-case>
</common-criteria>
<session-id xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">common</session-id>
</aaa>
<login>
<on-success>
<log>
</log>
</on-success>
</login>
<multilink>
<bundle-name
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ppp">authenticated</bundle-name>
</multilink>
<redundancy>
</redundancy>
<spanning-tree>
<extend xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-spanning-tree">
<system-id/>
</extend>
</spanning-tree>
<subscriber>
<templating/>
</subscriber>
<crypto>
<pki xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-crypto">
<certificate>
<chain>
<name>SLA-TrustPoint</name>
<certificate>
<serial>01</serial>
<certtype>ca</certtype>
</certificate>
</chain>
<chain>
<name>TP-self-signed-2685563505</name>
<certificate>
<serial>01</serial>
<certtype>self-signed</certtype>
</certificate>
</chain>
</certificate>
<trustpoint>
<id>SLA-TrustPoint</id>
<enrollment>
<pkcs12/>
</enrollment>
<revocation-check>crl</revocation-check>
</trustpoint>
<trustpoint>
<id>TP-self-signed-2685563505</id>
<enrollment>
<selfsigned/>
</enrollment>
<revocation-check>none</revocation-check>
<rsakeypair>
<key-label>TP-self-signed-2685563505</key-label>
</rsakeypair>
<subject-name>cn=IOS-Self-Signed-Certificate-2685563505</subject-name>
</trustpoint>
</pki>
</crypto>
<license>
<udi>
<pid>C8000V</pid>
<sn>93SHKMJKOC6</sn>
</udi>
<boot>
<level>
<network-advantage>
<addon>dna-advantage</addon>
</network-advantage>
</level>
</boot>
</license>
<line>
<aux>
<first>0</first>
</aux>
<console>
<first>0</first>
<exec-timeout>
<minutes>0</minutes>
<seconds>0</seconds>
</exec-timeout>
<stopbits>1</stopbits>
</console>
<vty>
<first>0</first>
<last>4</last>
<exec-timeout>
<minutes>0</minutes>
<seconds>0</seconds>
</exec-timeout>
<password>
<secret>lab</secret>
</password>
<transport>
<input>
<all/>
</input>
<output>
<all/>
</output>
</transport>
</vty>
<vty>
<first>5</first>
<last>31</last>
<transport>
<input>
<all/>
</input>
<output>
<all/>
</output>
</transport>
</vty>
</line>
<diagnostic xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-diagnostics">
<bootup>
<level>minimal</level>
</bootup>
</diagnostic>
</native>
</config>
pi-prog-csr1#
pi-prog-csr1#
pi-prog-csr1#show running-config | format restconf-json
{
"data": {
"Cisco-IOS-XE-native:native": {
"version": "17.8",
"boot-start-marker": [null],
"boot": {
"system": {
"flash": {
"flash-list-ordered-by-user": [
{
"flash-leaf":
"bootflash:c8000v-universalk9.BLD_POLARIS_DEV_LATEST_20211020_005209.SSA.bin"
}
]
}
}
},
"boot-end-marker": [null],
"memory": {
"free": {
"low-watermark": {
"processor": 64219
}
}
},
"call-home": {
"Cisco-IOS-XE-call-home:contact-email-addr": "[email protected]",
"Cisco-IOS-XE-call-home:tac-profile": {
"profile": {
"CiscoTAC-1": {
"active": true,
"destination": {
"transport-method": "http"
}
}
}
}
},
"service": {
"timestamps": {
"debug-config": {
"datetime": {
"msec": [null],
"localtime": [null],
"show-timezone": [null]
}
},
"log-config": {
"datetime": {
"msec": [null],
"localtime": [null],
"show-timezone": [null]
}
}
},
"call-home": [null]
},
"platform": {
"Cisco-IOS-XE-platform:console": {
"output": "serial"
},
"Cisco-IOS-XE-platform:qfp": {
"utilization": {
"monitor": {
"load": 80
}
}
},
"Cisco-IOS-XE-platform:punt-keepalive": {
"disable-kernel-core": true
}
},
"hostname": "pi-prog-csr1",
"enable": {
"password": {
"secret": "lab"
}
},
"username": [
{
"name": "admin",
"privilege": 15,
"password": {
"encryption": "0",
"password": "lab"
}
}
],
"vrf": {
"definition": [
{
"name": "Mgmt-intf",
"address-family": {
"ipv4": {
},
"ipv6": {
}
}
}
]
},
"ip": {
"domain": {
"name": "cisco"
},
"forward-protocol": {
"protocol": "nd"
},
"route": {
"ip-route-interface-forwarding-list": [
{
"prefix": "10].0.0.0",
"mask": "255.255.0.0",
"fwd-list": [
{
"fwd": "9.45.0.1"
}
]
}
],
"vrf": [
{
"name": "Mgmt-intf",
"ip-route-interface-forwarding-list": [
{
"prefix": "0.0.0.0",
"mask": "0.0.0.0",
"fwd-list": [
{
"fwd": "10.104.54.129"
}
]
}
]
}
]
},
"ssh": {
"ssh-version": "2"
},
"tftp": {
"source-interface": {
"GigabitEthernet": "1"
},
"blocksize": 8192
},
"Cisco-IOS-XE-http:http": {
"authentication": {
"local": [null]
},
"server": true,
"secure-server": true
}
},
"ipv6": {
"unicast-routing": [null]
},
"interface": {
"GigabitEthernet": [
{
"name": "1",
"vrf": {
"forwarding": "Mgmt-intf"
},
"ip": {
"address": {
"primary": {
"address": "10.104.54.222",
"mask": "255.255.255.128"
}
}
},
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "2",
"ip": {
"address": {
"primary": {
"address": "10.45.21.231",
"mask": "255.255.0.0"
}
}
},
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "3",
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "4",
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "5",
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
}
]
},
"control-plane": {
},
"clock": {
"timezone": {
"zone": "IST",
"hours": 5,
"minutes": 30
}
},
"logging": {
"console-config": {
"console": false
}
},
"aaa": {
"Cisco-IOS-XE-aaa:new-model": [null],
"Cisco-IOS-XE-aaa:authentication": {
"login": [
{
"name": "default",
"a1": {
"local": [null]
}
}
]
},
"Cisco-IOS-XE-aaa:authorization": {
"exec": [
{
"name": "default",
"a1": {
"local": [null]
}
}
]
},
"Cisco-IOS-XE-aaa:common-criteria": [
{
"policy": "enable_secret_policy",
"char-changes": 4,
"lower-case": 1,
"max-length": 127,
"min-length": 10,
"numeric-count": 1,
"upper-case": 1
}
],
"Cisco-IOS-XE-aaa:session-id": "common"
},
"login": {
"on-success": {
"log": {
}
}
},
"multilink": {
"Cisco-IOS-XE-ppp:bundle-name": "authenticated"
},
"redundancy": {
},
"spanning-tree": {
"Cisco-IOS-XE-spanning-tree:extend": {
"system-id": [null]
}
},
"subscriber": {
"templating": [null]
},
"crypto": {
"Cisco-IOS-XE-crypto:pki": {
"certificate": {
"chain": [
{
"name": "SLA-TrustPoint",
"certificate": [
{
"serial": "01",
"certtype": "ca"
}
]
},
{
"name": "TP-self-signed-2685563505",
"certificate": [
{
"serial": "01",
"certtype": "self-signed"
}
]
}
]
},
"trustpoint": [
{
"id": "SLA-TrustPoint",
"enrollment": {
"pkcs12": [null]
},
"revocation-check": ["crl"]
},
{
"id": "TP-self-signed-2685563505",
"enrollment": {
"selfsigned": [null]
},
"revocation-check": ["none"],
"rsakeypair": {
"key-label": "TP-self-signed-2685563505"
},
"subject-name": "cn=IOS-Self-Signed-Certificate-2685563505"
}
]
}
},
"license": {
"udi": {
"pid": "C8000V",
"sn": "93SHKMJKOC6"
},
"boot": {
"level": {
"network-advantage": {
"addon": "dna-advantage"
}
}
}
},
"line": {
"aux": [
{
"first": "0"
}
],
"console": [
{
"first": "0",
"exec-timeout": {
"minutes": 0,
"seconds": 0
},
"stopbits": "1"
}
],
"vty": [
{
"first": 0,
"last": 4,
"exec-timeout": {
"minutes": 0,
"seconds": 0
},
"password": {
"secret": "lab"
},
"transport": {
"input": {
"all": [null]
},
"output": {
"all": [null]
}
}
},
{
"first": 5,
"last": 31,
"transport": {
"input": {
"all": [null]
},
"output": {
"all": [null]
}
}
}
]
},
"Cisco-IOS-XE-diagnostics:diagnostic": {
"bootup": {
"level": "minimal"
}
}
}
}
}
<rpc message-id="101"
xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<lock>
<target>
<running/>
</target>
</lock>
</rpc>
is enabled, the running data store is not writable through NETCONF sessions, and all configurations get
committed only through the candidate. In other words, the writable-running NETCONF capability is not
enabled with the candidate configuration.
Note It must be kept in mind that candidate datastore is a shared data store. Multiple NETCONF sessions can
modify it contents simultaneously. Therefore, it is important to lock the datastore before modifying its
contents, to prevent conflicting commits that can eventually lead to the loss of any configuration changes.
Note The information in this section has been referenced from section 8.3.4 of RFC 6241. Please refer to the
RFC for more details and the exact RPCs.
Lock
A <lock> RPC is used to lock the target data store. This prevents others users from modifying the configuration
in the locked data store. Both candidate and running data can be locked through the lock operation.
Note Locking the candidate datastore does not affect the Cisco IOS config lock or the running configuration
lock and vice versa.
Commit
A <commit> RPC, copies the candidate configuration to the device’s running configuration. A commit operation
must be performed after you have updated the candidate configuration to push the configuration to the device.
If either the running or the candidate datastore is locked by another NETCONF session, the <commit> RPC
will fail with an RPC error reply. The <error-tag> should be <in-use> and <error-info> should have the session
ID of the NETCONF session holding the lock. You can also lock the running configuration by using the global
lock by entering the conf t lock mode, but, the commit operation will fail with an RPC error reply, with
error-tag value <in-use> and the session-id will be “0”.
Edit-config
The candidate configuration can be used as a target for the edit-config operation to modify a configuration.
You can change the candidate configuration without affecting the running configuration on the device.
Discard
To remove the changes made to the candidate configuration, perform a discard operation to revert the candidate
configuration to running configuration.
If contents of the candidate datastore are modified by NETCONF session A, and session B tries to lock the
candidate datastore, the lock fails. NETCONF session B must perform a <discard> operation to remove any
outstanding configuration changes on the candidate datastore from other NETCONF sessions before locking
a candidate.
Unlock
After working on candidate configuration, such as, lock, edit-config, or commit operations, you can unlock
the datastore, by specifying candidate as target in the unlock RPC. The candidate datastore is now available
for all operations in other sessions.
If a failure occurs with outstanding changes to the candidate datastore, it can be challenging to recover the
configuration, and may create problems for other sessions. To avoid any issues, outstanding changes must be
discarded when the lock is released—either implicitly on “NETCONF session failure” or explicitly by using
the unlock operation.
When you commit the candidate configuration, you can require an explicit confirmation for the commit to
become permanent. The confirmed commit operation is useful for verifying that a configuration change works
correctly and does not prevent management access to the device. If the change prevents access or causes other
errors, the automatic rollback to the previous configuration restores access after the rollback deadline passes.
If the commit is not confirmed within the specified amount of time,by default, the device automatically
retrieves and commits (rolls back to) the previously committed configuration.
In a NETCONF session, to commit the candidate configuration and to explicitly confirm the commit to become
permanent, a client application encloses the empty <confirmed/> tag in the <commit> and <rpc> tag elements:
<rpc>
<commit>
<confirmed/>
</commit>
</rpc>
The following sample RPC shows how to change the default rollback timer:
<rpc>
<commit>
<confirmed/>
<confirm-timeout>nnn</confirm-timeout> !nnn is the rollback-delay in seconds.
</commit>
</rpc>
The following sample RPC shows that the NETCONF server confirms that the candidate configuration is
committed temporarily:
If the NETCONF server cannot commit the candidate configuration, the <rpc-reply> element will enclose an
<rpc-error> element explaining the reason for the failure. The most common causes are semantic or syntactic
errors in the candidate configuration.
To delay the rollback to a time later than the current rollback timer, the client application sends a <confirmed/>
tag inside a <commit> tag element again before the deadline passes. Optionally, it includes the
<confirm-timeout> element to specify how long to delay the next rollback. The client application can delay
the rollback indefinitely by sending the <confirmed/> tag repeatedly.
To commit the configuration permanently, the client application sends the <commit/> tag enclosed in an <rpc>
tag element before the rollback deadline passes. The rollback is canceled and the candidate configuration is
committed immediately. If the candidate configuration is the same as the temporarily committed configuration,
the temporarily committed configuration is recommitted.
If another application uses the <kill-session/> tag element to terminate this application’s session while a
confirmed commit is pending (this application has committed changes but not yet confirmed them), the
NETCONF server that is using this session restores the configuration to its state before the confirmed commit
instruction was issued.
The candidate datastore is disabled by using the no netconf-yang feature candidate-datastore command.
Because the candidate datastore confirmed commit is enabled when the candidate datastore is enabled, the
confirmed commit is disabled when the candidate datastore is disabled. All sessions in progress are terminated,
and the confd program is restarted.
netconf-yang initialization in progress - datastore transition not allowed, please try again
after 30 seconds
If the selection of the candidate or running datastore is made after the NETCONF-YANG or RESTCONF
confd process starts, the following apply:
• If the netconf-yang feature candidate-datastore command is configured, the command enables the
candidate datastore and prints the following warning:
“netconf-yang and/or restconf is transitioning from running to candidate netconf-yang
and/or restconf will now be restarted,
and any sessions in progress will be terminated”.
• If the netconf-yang feature candidate-datastore command is removed, the command disables the
candidate datastore, enables the running datastore and prints the following warning:
netconf-yang and/or restconf is transitioning from candidate to running netconf-yang
and/or restconf will now be restarted,
and any sessions in progress will be terminated”.
The following is the configuration on the device after the NETCONF edit-config RPC is configured:
hostname Switch
Here, the side-effect of the NETCONF edit-config RPC is a change to the running configuration that is not
directly intended by the RPC. The edit-config request is supposed to delete the host name, but instead the
hostname is changed back to Switch. The side-effect synchronization does a synchronization of this
configuration change to the NETCONF database without synchronizing the entire configuration, thereby
improving performance.
The side-effect synchronization is based on the CLI-mode tree concept, where the commands are maintained
with modes and submodes structure. This CLI-mode tree data structure consists of three main nodes:
• Same-Level Node: This node points to the list of CLI nodes that belongs to the same parent and on the
same level.
• Parent Node: This node points to the CLI nodes parent, its mode, and submode node.
• Child Node: This node points to the child CLI; the CLI under the current mode or submode. If the node
has multiple child nodes then those child nodes are linked as part of the same-level node pointers.
SUMMARY STEPS
1. enable
2. configure terminal
3. username name privilege level password password
4. aaa new-model
5. aaa authentication login default local
6. aaa authorization exec default local
7. end
DETAILED STEPS
Step 3 username name privilege level password password Establishes a user name-based authentication system.
Configure the following keywords:
Example:
Device(config)# username example-name privilege 15 • privilege level: Sets the privilege level for the user.
password example_password For the NETCONF protocol, it must be 15.
• password password: Sets a password to access the
CLI view.
Step 5 aaa authentication login default local Sets the login authentication to use the local username
database.
Example:
Device(config)# aaa authentication login default Note Only the default AAA authentication login
local method is supported for the NETCONF protocol.
Step 6 aaa authorization exec default local Configures user AAA authorization, check the local
database, and allows the user to run an EXEC shell.
Example:
Device(config)# aaa authorization exec default • For a remote AAA server, replace local with your
local AAA server.
• The default keyword applies the local user database
authentication to all ports.
Configuring NETCONF-YANG
If the legacy NETCONF protocol is enabled on your device, the RFC-compliant NETCONF protocol does
not work. Disable the legacy NETCONF protocol by using the no netconf legacy command.
SUMMARY STEPS
1. enable
2. configure terminal
3. netconf-yang
4. netconf-yang feature candidate-datastore
5. exit
DETAILED STEPS
SUMMARY STEPS
1. Enable SNMP features in IOS.
2. After NETCONF-YANG starts, enable SNMP Trap support by sending the following RPC <edit-config>
message to the NETCONF-YANG port.
3. Send the following RPC message to the NETCONF-YANG port to save the running configuration to the
startup configuration.
DETAILED STEPS
Step 2 After NETCONF-YANG starts, enable SNMP Trap support by sending the following RPC <edit-config> message to the
NETCONF-YANG port.
Example:
<?xml version="1.0" encoding="utf-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="">
<edit-config>
<target>
<running/>
</target>
<config>
<netconf-yang xmlns="http://cisco.com/yang/cisco-self-mgmt">
<cisco-ia xmlns="http://cisco.com/yang/cisco-ia">
<snmp-trap-control>
<trap-list>
<trap-oid>1.3.6.1.4.1.9.9.41.2.0.1</trap-oid>
</trap-list>
<trap-list>
<trap-oid>1.3.6.1.6.3.1.1.5.3</trap-oid>
</trap-list>
<trap-list>
<trap-oid>1.3.6.1.6.3.1.1.5.4</trap-oid>
</trap-list>
</snmp-trap-control>
</cisco-ia>
</netconf-yang>
</config>
</edit-config>
</rpc>
Step 3 Send the following RPC message to the NETCONF-YANG port to save the running configuration to the startup
configuration.
Example:
<?xml version="1.0" encoding="utf-8"?>
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="">
<cisco-ia:save-config xmlns:cisco-ia="http://cisco.com/yang/cisco-ia"/>
</rpc>
SUMMARY STEPS
1. enable
2. configure terminal
3. ip ssh pubkey-chain
4. username username
5. key-string
6. end
DETAILED STEPS
Step 3 ip ssh pubkey-chain Configures SSH-RSA keys for user and server
authentication on the SSH server and enters public-key
Example:
configuration mode.
Device(config)# ip ssh pubkey-chain
• The user authentication is successful if the RSA public
key stored on the server is verified with the public or
the private key pair stored on the client.
Step 4 username username Configures the SSH username and enters public-key user
configuration mode.
Example:
Device(conf-ssh-pubkey)# username user1
SUMMARY STEPS
1. show netconf-yang datastores
2. show netconf-yang sessions
3. show netconf-yang sessions detail
4. show netconf-yang diagnostics summary
5. show netconf-yang statistics
6. show platform software yang-management process
DETAILED STEPS
Number of sessions : 1
session-id : 19
transport : netconf-ssh
username : admin
source-host : 2001:db8::1
login-time : 2018-10-26T12:37:22+00:00
in-rpcs : 0
in-bad-rpcs : 0
out-rpc-errors : 0
out-notifications : 0
global-lock : None
Diagnostic Debugging is ON
Diagnostic Debugging Level: Maximum
Total Log Size (bytes): 20097
Total Transactions: 1
message username session-id transaction-id start-time end-time log size
----------------------------------------------------------------------------------------
1 admin 35 53 03/12/21 14:31:03 03/12/21 14:31:04 20097
netconf-start-time : 2018-01-15T12:51:14-05:00
in-rpcs : 0
in-bad-rpcs : 0
out-rpc-errors : 0
out-notifications : 0
in-sessions : 10
dropped-sessions : 0
in-bad-hellos : 0
confd : Running
nesd : Running
syncfd : Running
ncsshd : Running
dmiauthd : Running
vtyserverutild : Running
opdatamgrd : Running
nginx : Running
ndbmand : Running
Note The process nginx runs if ip http secure-server or ip http server is configured on the device. This process is
not required to be in the running state for NETCONF to function properly. However, the nginx process is
required for RESTCONF.
Field Description
#308
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:b0f45ac0-3fe2-4e1d-a3a1-f57985965be6">
<enable-netconf-diag xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-netconf-diag-rpc">
<diag-level>diag-maximum</diag-level>
</enable-netconf-diag>
</nc:rpc>
##
The following is a sample RPC that shows the current status and the RPC response received from the host:
#294
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:c6c986ac-fc44-45e2-9390-f8a5968dc8d4">
<nc:get>
<nc:filter>
<netconf-diag-oper-data
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-netconf-diag-oper"/>
</nc:filter>
</nc:get>
</nc:rpc>
<diag-summary>
<level>diag-maximum</level>
<log-size>0</log-size>
<trans-count>0</trans-count>
</diag-summary>
</netconf-diag-oper-data>
</data>
</rpc-reply>
The following is a sample RPC to change the host name and the RPC response received from the host:
#
#364
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:f3005ee6-8a11-4146-b616-dd95a92b97d1">
<nc:edit-config>
<nc:target>
<nc:running/>
</nc:target>
<nc:config>
<native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<hostname>new-ott-c9300-35</hostname>
</native>
</nc:config>
</nc:edit-config>
</nc:rpc>
##
The following is a sample RPC to display the current status and the RPC response received from the host:
#294
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:9bffb8d5-3866-48ef-b59d-0486e508fbc4">
<nc:get>
<nc:filter>
<netconf-diag-oper-data
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-netconf-diag-oper"/>
</nc:filter>
</nc:get>
</nc:rpc>
##
<diag-summary>
<level>diag-maximum</level>
<log-size>20775</log-size>
<trans-count>1</trans-count>
</diag-summary>
<diag-trans>
<message>1</message>
<username>lab</username>
<session-id>31</session-id>
<trans-id>50</trans-id>
<start-time>2021-03-12T14:08:26.830334+00:00</start-time>
<end-time>2021-03-12T14:08:28.279414+00:00</end-time>
<log-size>20775</log-size>
</diag-trans>
</netconf-diag-oper-data>
</data>
</rpc-reply>
The following is a sample RPC to archive the collected system error messages, and the RPC response from
the host:
#
#256
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:1dbc795c-f594-4194-a89b-fd4d88446b69">
<archive-netconf-diag-logs xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-netconf-diag-rpc"/>
</nc:rpc>
##
</rpc-reply>
The following is a sample RPC that disables NETCONF-YANG diagnostics, and the RPC response received
from the host:
#309
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:d253a313-4aec-42bc-80a2-672e9bb9ad56">
<enable-netconf-diag xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-netconf-diag-rpc">
<diag-level>diag-disabled</diag-level>
</enable-netconf-diag>
</nc:rpc>
##
Standard/RFC Title
RFC 6020 YANG - A Data Modeling Language for the Network Configuration
Protocol (NETCONF)
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, http://www.cisco.com/support
including documentation and tools for troubleshooting and resolving
technical issues with Cisco products and technologies.
To receive security and technical information about your products,
you can subscribe to various services, such as the Product Alert Tool
(accessed from Field Notices), the Cisco Technical Services
Newsletter, and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a
Cisco.com user ID and password.
NETCONF Protocol Cisco IOS XE Denali 16.3.1 The NETCONF Protocol feature facilitates a
programmatic and standards-based way of
writing configurations and reading operational
data from network devices.
The following command was introduced:
netconf-yang.
This feature was implemented on the
following platforms:
• Cisco 4000 Series Integrated Services
Routers
• Cisco ASR 1000 Series Aggregation
Services Routers
• Cisco Cloud Services Router 1000V
Series
NETCONF and RESTCONF Cisco IOS XE Fuji 16.8.1a IPv6 support for the NETCONF and
IPv6 Support RESTCONF protocols. This feature was
implemented on the following platforms:
• Cisco 4000 Series Integrated Services
Routers
• Cisco ASR 1000 Series Aggregation
Services Routers
• Cisco ASR 900 Series Aggregation
Services Routers
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco CBR-8 Series Routers
• Cisco Cloud Services Router 1000V
Series
NETCONF Global Lock and Cisco IOS XE Fuji 16.8.1a The NETCONF protocol supports a global
Kill Session lock, and the ability to kill non-responsive
sessions. This feature is implemented on the
following platforms:
• Cisco 1100 Series Integrated Services
Routers
• Cisco 4000 Series Integrated Services
Routers
• Cisco ASR 1000 Series Aggregation
Services Routers
• Cisco ASR 900 Series Aggregation
Services Routers
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco CBR-8 Series Routers
• Cisco Cloud Services Router 1000v
Series
NETCONF: Candidate Cisco IOS XE Fuji 16.9.1 The Candidate Config Support feature enables
Configuration Support support for candidate capability by
implementing RFC 6241 with a simple commit
option.
This feature was implemented on the
following platforms:
• Cisco 4000 Series Integrated Services
Routers
• Cisco ASR 1000 Series Aggregation
Services Routers
• Cisco ASR 900 Series Aggregation
Services Routers
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco CBR-8 Series Routers
• Cisco Cloud Services Router 1000V
Series
NETCONF: Candidate Cisco IOS XE Amsterdam The candidate configuration supports the
Configuration Commit 17.1.1 confirmed commit capability.
Confirm
This feature was implemented on the
following platforms:
• Cisco 1000 Series Integrated Services
Routers
• Cisco 4000 Series Integrated Services
Routers
• Cisco ASR 1000 Series Aggregation
Services Routers
• Cisco ASR 900 Series Aggregation
Services Routers
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco cBR-8 Converged Broadband
Router
• Cisco Cloud Services Router 1000V
Series
• Cisco Network Convergence System 520
Series
• Cisco Network Convergence System
4200 Series
NETCONF-YANG SSH Cisco IOS XE Gibraltar This feature was implemented on the
Server Support 16.12.1 following platforms:
• Cisco 1000 Series Integrated Services
Routers
• Cisco 4000 Series Integrated Services
Routers
• Cisco ASR 900 Series Aggregation
Services Routers
• Cisco ASR 920 Series Aggregation
Services Routers
• Cisco ASR 1000 Aggregation Services
Routers
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
• Cisco Catalyst 9800 Series Wireless
Controllers
• Cisco cBR-8 Converged Broadband
Router
• Cisco Cloud Services Router 1000V
Series
• Cisco Network Convergence System 520
Series
• Cisco Network Convergence System
4200 Series
Side-Effect Synchronization Cisco IOS XE Bengaluru During configuration changes in the DMI, a
of the Configuration Database 17.4.1 partial synchronization of the changes that are
triggered when a command or RPC is
configured happens. This is called the
side-effect synchronization, and it reduces the
synchronization time and NETCONF
downtime.
This feature was implemented on the
following platforms:
• Cisco ASR 1000 Aggregation Services
Routers
• Cisco Catalyst 8500 and 8500L Series
Edge Platforms
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
YANG Model Version 1.1 Cisco IOS XE Cupertino Cisco IOS XE Cupertino 17.7.1 uses the
17.7.1 YANG Version 1.0; however, you can also
use YANG Version 1.1. Download the YANG
Version 1.1 from GitHub at
https://github.com/YangModels/yang/tree/master/vendor/cisco/xefolder.
This feature was implemented on the
following platforms:
• Cisco 1000 Series Integrated Services
Routers
• Cisco 4000 Series Integrated Services
Routers
• Cisco ASR 900 Aggregation Services
Routers
• Cisco ASR 920 Aggregation Services
Routers
• Cisco ASR 1000 Aggregation Services
Routers
• Cisco Catalyst 9200 and 9200L Series
Switches
• Cisco Catalyst 9300 and 9300L Series
Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 and 9500-High
Performance Series Switches
• Cisco Catalyst 9600 Series Switches
• Cisco Catalyst 9800-40 Wireless
Controllers
• Cisco Catalyst 9800-80 Wireless
Controllers
• Cisco cBR-8 Converged Broadband
Router
• Cisco Cloud Services Router 1000V
Series
• Cisco Network Convergence System 520
Series
• Cisco Network Convergence System
4200 Series
Converting IOS Commands Cisco IOS XE Cupertino This feature helps to automatically translate
to XML 17.7.1 IOS commands into relevant
NETCONF-YANG XML or
RESTCONF-JSON request messages.
This feature is supported on all platforms that
support NETCONF-YANG.
In releases prior to Cisco IOS XE Fuji 16.8.1, an operational data manager (based on polling) was enabled
separately. In Cisco IOS XE Fuji 16.8.1 and later releases, operational data works on platforms running
NETCONF (similar to how configuration data works), and is enabled by default. For more information on
the components that are enabled for operational data queries or streaming, see the GitHub respository, and
view *-oper in the naming convention.
HTTPs Methods
The HTTPS-based RESTCONF protocol (RFC 8040), is a stateless protocol that uses secure HTTP methods
to provide CREATE, READ, UPDATE, and DELETE (CRUD) operations on a conceptual datastore containing
YANG-defined data, which is compatible with a server that implements NETCONF datastores.
The following table shows how the RESTCONF operations relate to NETCONF protocol operations:
GET Read
PATCH Update
Example:
Example returning /restconf:
HTTP/1.1 200 OK
Content-Type: application/xrd+xml
Content-Length: nnn
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
<Link rel='restconf' href='/restconf'/>
</XRD>
Example of URIs:
• GigabitEthernet0/0/2 -
https://10.104.50.97/restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0%2F0%2F2
• fields=name –
https://10.104.50.97/restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=0%2F0%2F2?fields=name
• depth=1 -
https://10.85.116.59/restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet?depth=1
• Name and IP -
https://10.85.116.59/restconf/data/Cisco-IOS-XE-native:native/interface?fields=GigabitEthernet/ip/address/primary;name
• MTU (fields) -
https://10.104.50.97/restconf/data/Cisco-IOS-XE-native:native/interface?fields=GigabitEthernet(mtu)
• MTU -
https://10.85.116.59/restconf/data/Cisco-IOS-XE-native:native/interface/GigabitEthernet=3/mtu
• Port-Channel -
https://10.85.116.59/restconf/data/Cisco-IOS-XE-native:native/interface/Port-channel
• “Char” to “Hex” conversion chart: http://www.columbia.edu/kermit/ascii.html
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:7d0908d8-0d5f-4521-9d7b-380b81304776">
<nc:get>
<nc:filter>
<install-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-install-oper">
<install-location-information>
<install-version-info>
<version/>
<version-extension/>
<current/>
<src-filename/>
</install-version-info>
</install-location-information>
</install-oper-data>
</nc:filter>
</nc:get>
</nc:rpc>
##
Received message from host
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
message-id="urn:uuid:7d0908d8-0d5f-4521-9d7b-380b81304776">
<data>
<install-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-install-oper">
<install-location-information>
<install-version-info>
<version>17.06.04.0.3870</version>
<version-extension>1651661105</version-extension>
<current>install-version-state-present</current>
<src-filename/>
</install-version-info>
<install-version-info>
<version>17.09.01.0.158212</version>
<version-extension>1651125381</version-extension>
<current>install-version-state-present</current>
<src-filename/>
</install-version-info>
<install-version-info>
<version>17.10.01.0.158658</version>
<version-extension>1651754624</version-extension>
<current>install-version-state-present</current>
<src-filename>/bootflash/c8000v-universalk9nic.2022-05-05_18.13.SSA.bin</src-filename>
</install-version-info>
<install-version-info>
<version>17.10.01.0.160585</version>
<version-extension>1656581638</version-extension>
<current>install-version-state-provisioned-committed</current>
<src-filename>/bootflash/c8000v-universalk9.2022-06-30_15.03.SSA.bin</src-filename>
</install-version-info>
<install-version-info>
<version>17.10.01.0.162616</version>
<version-extension>1657120419</version-extension>
<current>install-version-state-present</current>
<src-filename>/bootflash/c8000v-universalk9.BLD_POLARIS_DEV_LATEST_20220706_
143733.SSA.bin</src-filename>
</install-version-info>
</install-location-information>
</install-oper-data>
</data>
</rpc-reply>
When using the protocol, gNMI, NETCONF, or RESTCONF, the Cisco-IOS-XE-native:version module only
displays the major release version.
Note Media is the type of YANG formated RPC that is sent to the RESCONF server (XML or JSON).
• Application/YANG-Data+XML OR Application/YANG-Data+JSON
• The API resource contains the RESTCONF root resource for the RESTCONF DATASTORE and
OPERATION resources. For example:
The client may then retrieve the top-level API resource, using the
root resource "/restconf".
HTTP/1.1 200 OK
Date: Thu, 26 Jan 2017 20:56:30 GMT
Server: example-server
Content-Type: application/yang-data+json
{
"ietf-restconf:restconf" : {
"data" : {},
"operations" : {},
"yang-library-version" : "2016-06-21"
}
}
Methods
Methods are HTTPS operations (GET/PATCH/POST/DELETE/OPTIONS/PUT) performed on a target
resource. A YANG-formated RPC invokes a particular method on a given resource that pertains to a target
YANG model residing in the RESTCONF server. The uniform resource identifier (URI) acts as a location
identification for a given resource, so that the client RESTCONF method can locate that particular resource
to take an action specified by an HTTPS method or property.
For more information, see RFC 8040 - RESTCONF Protocol
A YANG-Patch is identified by a unique patch-id. A patch is an ordered collection of edits and each edit is
identified by an edit-id. It has an edit operation ("create", "delete", "insert", "merge", "move", "replace", or
"remove") that is applied to the target resource.
To verify if the RESTCONF YANG-Patch is supported issue the following RESTCONF Get request:
$ curl -k -s -u admin:DMIdmi1! --location-trusted
"https://10.1.1.1/restconf/data/ietf-restconf-monitoring:restconf-state/capabilities" -X
GET
<capabilities xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring"
xmlns:rcmon="urn:ietf:params:xml:ns:yang:ietf-restconf-monitoring">
<capability>urn:ietf:params:restconf:capability:defaults:1.0?basic-mode=explicit</capability>
<capability>urn:ietf:params:restconf:capability:depth:1.0</capability>
<capability>urn:ietf:params:restconf:capability:fields:1.0</capability>
<capability>urn:ietf:params:restconf:capability:with-defaults:1.0</capability>
<capability>urn:ietf:params:restconf:capability:filter:1.0</capability>
<capability>urn:ietf:params:restconf:capability:replay:1.0</capability>
<capability>urn:ietf:params:restconf:capability:yang-patch:1.0</capability>
<capability>http://tail-f.com/ns/restconf/collection/1.0</capability>
<capability>http://tail-f.com/ns/restconf/query-api/1.0</capability>
</capabilities>
The following examples shows a JSON response from the RESTCONF server:
The following example shows an XML response from the RESTCONF server:
Device:/nobackup/folder1/confd_6313/bin $ curl -k -s -u admin:DMIdmi1! --location-trusted
"https://10.1.1.1/restconf/data/Cisco-IOS-XE-native:native" -X PATCH -H "Accept:
application/yang-data+xml" -d
'@yang_patch_create_hostname' -H "Content-type: application/yang-patch+xml"
<yang-patch-status xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-patch">
<patch-id>add-hostname-patch</patch-id>
<edit-status>
<edit>
<edit-id>edit1</edit-id>
<errors>
<error>
<error-type>application</error-type>
<error-tag>data-exists</error-tag>
<error-path
xmlns:ios="http://cisco.com/ns/yang/Cisco-IOS-XE-native">/ios:native/ios:hostname</error-path>
<value>
<Loopback xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<name>1</name>
</Loopback
</value>
</edit>
</yang-patch>
The following example shows that the insert list request is successful:
Device:/nobackup/folder1/confd_6313/bin $ curl -k -s -u admin:DMIdmi1! --location-trusted
"https://10.1.1.1/restconf/data/Cisco-IOS-XE-native:native/interface" -X PATCH -H "Accept:
application/yang-data+json" -d
'@yang_patch_create_Loopback_interface' -H "Content-type: application/yang-patch+xml"
Device:/nobackup/folder1/confd_6313/bin
{
"ietf-yang-patch:yang-patch-status": {
"patch-id": "insert-Loopback-patch",
“ok" : [null]
}
}
<edit>
<edit-id>edit1</edit-id>
<operation>move</operation>
<target>/Loopback=1</target>
<point>/Loopback=0</point>
<where>before</where>
<value>
<Loopback xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<name>1</name>
</Loopback>
</value>
</edit>
</yang-patch>
The translation of IOS commands into a structured format is disabled by default. You must initially configure
NETCONF-YANG, and once the data model interfaces (DMIs) are initialized, use the appropriate format
option to translate the commands.
The following is sample output from the show running-config | format netconf-xml command:
Device# show running-config | format netconf-xml
<config xmlns="http://tail-f.com/ns/config/1.0">
<native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
<version>17.8</version>
<boot-start-marker/>
<boot>
<system>
<flash>
<flash-list-ordered-by-user>
<flash-leaf>bootflash:c8000v-universalk9.BLD_POLARIS_DEV_LATEST_20211020_005209.SSA.bin</
flash-leaf>
</flash-list-ordered-by-user>
</flash>
</system>
</boot>
<boot-end-marker/>
<memory>
<free>
<low-watermark>
<processor>64219</processor>
</low-watermark>
</free>
</memory>
<call-home>
<contact-email-addr xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-call-home">
[email protected]</contact-email-addr>
<tac-profile xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-call-home">
<profile>
<CiscoTAC-1>
<active>true</active>
<destination>
<transport-method>http</transport-method>
</destination>
</CiscoTAC-1>
</profile>
</tac-profile>
</call-home>
<service>
<timestamps>
<debug-config>
<datetime>
<msec/>
<localtime/>
<show-timezone/>
</datetime>
</debug-config>
<log-config>
<datetime>
<msec/>
<localtime/>
<show-timezone/>
</datetime>
</log-config>
</timestamps>
<call-home/>
</service>
<platform>
<console xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-platform">
<output>serial</output>
</console>
<qfp xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-platform">
<utilization>
<monitor>
<load>80</load>
</monitor>
</utilization>
</qfp>
<punt-keepalive xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-platform">
<disable-kernel-core>true</disable-kernel-core>
</punt-keepalive>
</platform>
<hostname>pi-prog-csr1</hostname>
<enable>
<password>
<secret>lab</secret>
</password>
</enable>
<username>
<name>admin</name>
<privilege>15</privilege>
<password>
<encryption>0</encryption>
<password>lab</password>
</password>
</username>
<vrf>
<definition>
<name>Mgmt-intf</name>
<address-family>
<ipv4>
</ipv4>
<ipv6>
</ipv6>
</address-family>
</definition>
</vrf>
<ip>
<domain>
<name>cisco</name>
</domain>
<forward-protocol>
<protocol>nd</protocol>
</forward-protocol>
<route>
<ip-route-interface-forwarding-list>
<prefix>10.0.0.0</prefix>
<mask>255.255.0.0</mask>
<fwd-list>
<fwd>10.45.0.1</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
<vrf>
<name>Mgmt-intf</name>
<ip-route-interface-forwarding-list>
<prefix>0.0.0.0</prefix>
<mask>0.0.0.0</mask>
<fwd-list>
<fwd>10.104.54.129</fwd>
</fwd-list>
</ip-route-interface-forwarding-list>
</vrf>
</route>
<ssh>
<ssh-version>2</ssh-version>
</ssh>
<tftp>
<source-interface>
<GigabitEthernet>1</GigabitEthernet>
</source-interface>
<blocksize>8192</blocksize>
</tftp>
<http xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-http">
<authentication>
<local/>
</authentication>
<server>true</server>
<secure-server>true</secure-server>
</http>
</ip>
<ipv6>
<unicast-routing/>
</ipv6>
<interface>
<GigabitEthernet>
<name>1</name>
<vrf>
<forwarding>Mgmt-intf</forwarding>
</vrf>
<ip>
<address>
<primary>
<address>10.104.54.222</address>
<mask>255.255.255.128</mask>
</primary>
</address>
</ip>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>2</name>
<ip>
<address>
<primary>
<address>9.45.21.231</address>
<mask>255.255.0.0</mask>
</primary>
</address>
</ip>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>3</name>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>4</name>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
<GigabitEthernet>
<name>5</name>
<mop>
<enabled>false</enabled>
<sysid>false</sysid>
</mop>
<negotiation xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ethernet">
<auto>true</auto>
</negotiation>
</GigabitEthernet>
</interface>
<control-plane>
</control-plane>
<clock>
<timezone>
<zone>IST</zone>
<hours>5</hours>
<minutes>30</minutes>
</timezone>
</clock>
<logging>
<console-config>
<console>false</console>
</console-config>
</logging>
<aaa>
<new-model xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa"/>
<authentication xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">
<login>
<name>default</name>
<a1>
<local/>
</a1>
</login>
</authentication>
<authorization xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">
<exec>
<name>default</name>
<a1>
<local/>
</a1>
</exec>
</authorization>
<common-criteria xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">
<policy>enable_secret_policy</policy>
<char-changes>4</char-changes>
<lower-case>1</lower-case>
<max-length>127</max-length>
<min-length>10</min-length>
<numeric-count>1</numeric-count>
<upper-case>1</upper-case>
</common-criteria>
<session-id xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-aaa">common</session-id>
</aaa>
<login>
<on-success>
<log>
</log>
</on-success>
</login>
<multilink>
<bundle-name
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-ppp">authenticated</bundle-name>
</multilink>
<redundancy>
</redundancy>
<spanning-tree>
<extend xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-spanning-tree">
<system-id/>
</extend>
</spanning-tree>
<subscriber>
<templating/>
</subscriber>
<crypto>
<pki xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-crypto">
<certificate>
<chain>
<name>SLA-TrustPoint</name>
<certificate>
<serial>01</serial>
<certtype>ca</certtype>
</certificate>
</chain>
<chain>
<name>TP-self-signed-2685563505</name>
<certificate>
<serial>01</serial>
<certtype>self-signed</certtype>
</certificate>
</chain>
</certificate>
<trustpoint>
<id>SLA-TrustPoint</id>
<enrollment>
<pkcs12/>
</enrollment>
<revocation-check>crl</revocation-check>
</trustpoint>
<trustpoint>
<id>TP-self-signed-2685563505</id>
<enrollment>
<selfsigned/>
</enrollment>
<revocation-check>none</revocation-check>
<rsakeypair>
<key-label>TP-self-signed-2685563505</key-label>
</rsakeypair>
<subject-name>cn=IOS-Self-Signed-Certificate-2685563505</subject-name>
</trustpoint>
</pki>
</crypto>
<license>
<udi>
<pid>C8000V</pid>
<sn>93SHKMJKOC6</sn>
</udi>
<boot>
<level>
<network-advantage>
<addon>dna-advantage</addon>
</network-advantage>
</level>
</boot>
</license>
<line>
<aux>
<first>0</first>
</aux>
<console>
<first>0</first>
<exec-timeout>
<minutes>0</minutes>
<seconds>0</seconds>
</exec-timeout>
<stopbits>1</stopbits>
</console>
<vty>
<first>0</first>
<last>4</last>
<exec-timeout>
<minutes>0</minutes>
<seconds>0</seconds>
</exec-timeout>
<password>
<secret>lab</secret>
</password>
<transport>
<input>
<all/>
</input>
<output>
<all/>
</output>
</transport>
</vty>
<vty>
<first>5</first>
<last>31</last>
<transport>
<input>
<all/>
</input>
<output>
<all/>
</output>
</transport>
</vty>
</line>
<diagnostic xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-diagnostics">
<bootup>
<level>minimal</level>
</bootup>
</diagnostic>
</native>
</config>
pi-prog-csr1#
pi-prog-csr1#
pi-prog-csr1#show running-config | format restconf-json
{
"data": {
"Cisco-IOS-XE-native:native": {
"version": "17.8",
"boot-start-marker": [null],
"boot": {
"system": {
"flash": {
"flash-list-ordered-by-user": [
{
"flash-leaf":
"bootflash:c8000v-universalk9.BLD_POLARIS_DEV_LATEST_20211020_005209.SSA.bin"
}
]
}
}
},
"boot-end-marker": [null],
"memory": {
"free": {
"low-watermark": {
"processor": 64219
}
}
},
"call-home": {
"Cisco-IOS-XE-call-home:contact-email-addr": "[email protected]",
"Cisco-IOS-XE-call-home:tac-profile": {
"profile": {
"CiscoTAC-1": {
"active": true,
"destination": {
"transport-method": "http"
}
}
}
}
},
"service": {
"timestamps": {
"debug-config": {
"datetime": {
"msec": [null],
"localtime": [null],
"show-timezone": [null]
}
},
"log-config": {
"datetime": {
"msec": [null],
"localtime": [null],
"show-timezone": [null]
}
}
},
"call-home": [null]
},
"platform": {
"Cisco-IOS-XE-platform:console": {
"output": "serial"
},
"Cisco-IOS-XE-platform:qfp": {
"utilization": {
"monitor": {
"load": 80
}
}
},
"Cisco-IOS-XE-platform:punt-keepalive": {
"disable-kernel-core": true
}
},
"hostname": "pi-prog-csr1",
"enable": {
"password": {
"secret": "lab"
}
},
"username": [
{
"name": "admin",
"privilege": 15,
"password": {
"encryption": "0",
"password": "lab"
}
}
],
"vrf": {
"definition": [
{
"name": "Mgmt-intf",
"address-family": {
"ipv4": {
},
"ipv6": {
}
}
}
]
},
"ip": {
"domain": {
"name": "cisco"
},
"forward-protocol": {
"protocol": "nd"
},
"route": {
"ip-route-interface-forwarding-list": [
{
"prefix": "10].0.0.0",
"mask": "255.255.0.0",
"fwd-list": [
{
"fwd": "9.45.0.1"
}
]
}
],
"vrf": [
{
"name": "Mgmt-intf",
"ip-route-interface-forwarding-list": [
{
"prefix": "0.0.0.0",
"mask": "0.0.0.0",
"fwd-list": [
{
"fwd": "10.104.54.129"
}
]
}
]
}
]
},
"ssh": {
"ssh-version": "2"
},
"tftp": {
"source-interface": {
"GigabitEthernet": "1"
},
"blocksize": 8192
},
"Cisco-IOS-XE-http:http": {
"authentication": {
"local": [null]
},
"server": true,
"secure-server": true
}
},
"ipv6": {
"unicast-routing": [null]
},
"interface": {
"GigabitEthernet": [
{
"name": "1",
"vrf": {
"forwarding": "Mgmt-intf"
},
"ip": {
"address": {
"primary": {
"address": "10.104.54.222",
"mask": "255.255.255.128"
}
}
},
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "2",
"ip": {
"address": {
"primary": {
"address": "10.45.21.231",
"mask": "255.255.0.0"
}
}
},
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "3",
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "4",
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
},
{
"name": "5",
"mop": {
"enabled": false,
"sysid": false
},
"Cisco-IOS-XE-ethernet:negotiation": {
"auto": true
}
}
]
},
"control-plane": {
},
"clock": {
"timezone": {
"zone": "IST",
"hours": 5,
"minutes": 30
}
},
"logging": {
"console-config": {
"console": false
}
},
"aaa": {
"Cisco-IOS-XE-aaa:new-model": [null],
"Cisco-IOS-XE-aaa:authentication": {
"login": [
{
"name": "default",
"a1": {
"local": [null]
}
}
]
},
"Cisco-IOS-XE-aaa:authorization": {
"exec": [
{
"name": "default",
"a1": {
"local": [null]
}
}
]
},
"Cisco-IOS-XE-aaa:common-criteria": [
{
"policy": "enable_secret_policy",
"char-changes": 4,
"lower-case": 1,
"max-length": 127,
"min-length": 10,
"numeric-count": 1,
"upper-case": 1
}
],
"Cisco-IOS-XE-aaa:session-id": "common"
},
"login": {
"on-success": {
"log": {
}
}
},
"multilink": {
"Cisco-IOS-XE-ppp:bundle-name": "authenticated"
},
"redundancy": {
},
"spanning-tree": {
"Cisco-IOS-XE-spanning-tree:extend": {
"system-id": [null]
}
},
"subscriber": {
"templating": [null]
},
"crypto": {
"Cisco-IOS-XE-crypto:pki": {
"certificate": {
"chain": [
{
"name": "SLA-TrustPoint",
"certificate": [
{
"serial": "01",
"certtype": "ca"
}
]
},
{
"name": "TP-self-signed-2685563505",
"certificate": [
{
"serial": "01",
"certtype": "self-signed"
}
]
}
]
},
"trustpoint": [
{
"id": "SLA-TrustPoint",
"enrollment": {
"pkcs12": [null]
},
"revocation-check": ["crl"]
},
{
"id": "TP-self-signed-2685563505",
"enrollment": {
"selfsigned": [null]
},
"revocation-check": ["none"],
"rsakeypair": {
"key-label": "TP-self-signed-2685563505"
},
"subject-name": "cn=IOS-Self-Signed-Certificate-2685563505"
}
]
}
},
"license": {
"udi": {
"pid": "C8000V",
"sn": "93SHKMJKOC6"
},
"boot": {
"level": {
"network-advantage": {
"addon": "dna-advantage"
}
}
}
},
"line": {
"aux": [
{
"first": "0"
}
],
"console": [
{
"first": "0",
"exec-timeout": {
"minutes": 0,
"seconds": 0
},
"stopbits": "1"
}
],
"vty": [
{
"first": 0,
"last": 4,
"exec-timeout": {
"minutes": 0,
"seconds": 0
},
"password": {
"secret": "lab"
},
"transport": {
"input": {
"all": [null]
},
"output": {
"all": [null]
}
}
},
{
"first": 5,
"last": 31,
"transport": {
"input": {
"all": [null]
},
"output": {
"all": [null]
}
}
}
]
},
"Cisco-IOS-XE-diagnostics:diagnostic": {
"bootup": {
"level": "minimal"
}
}
}
}
}
SUMMARY STEPS
1. enable
2. configure terminal
3. aaa new-model
4. aaa group server radius server-name
5. server-private ip-address key key-name
6. ip vrf forwarding vrf-name
7. exit
8. aaa authentication login default group group-name local
9. aaa authentication login list-name none
10. aaa authorization exec default group group-name local
11. aaa session-id common
12. line console number
13. login authentication authentication-list
14. end
DETAILED STEPS
Step 4 aaa group server radius server-name Adds the RADIUS server and enters server group RADIUS
configuration mode.
Example:
Device(config)# aaa group server radius ISE • The server-name argument specifies the RADIUS
server group name.
Step 5 server-private ip-address key key-name Configures a IP address and encryption key for a private
RADIUS server.
Example:
Device(config-sg-radius)# server-private
172.25.73.76 key Cisco123
Step 6 ip vrf forwarding vrf-name Configures the virtual routing and forwarding (VRF)
reference of a AAA RADIUS or TACACS+ server group.
Example:
Device(config-sg-radius)# ip vrf forwarding
Mgmt-intf
Step 8 aaa authentication login default group group-name local Sets the specified group name as the default local AAA
authentication during login.
Example:
Step 9 aaa authentication login list-name none Specifies that no authentication is required while logging
into a system.
Example:
Device(config)# aaa authentication login NOAUTH
none
Step 10 aaa authorization exec default group group-name local Runs authorization to determine if an user is allowed to
run an EXEC shell.
Example:
Device(config)# aaa authorization exec default
group ISE local
Step 11 aaa session-id common Ensures that session identification (ID) information that
is sent out for a given call will be made identical.
Example:
Device(config)# aaa session-id common
Step 12 line console number Identifies a specific line for configuration and enter line
configuration mode.
Example:
Device(config)# line console 0
SUMMARY STEPS
1. enable
2. configure terminal
3. restconf
4. ip http secure-server
5. end
DETAILED STEPS
Step 5 end Exits global configuration mode and enters privileged EXEC
mode
Example:
Device(config)# end
NGINX is an internal webserver that acts as a proxy webserver. It provides Transport Layer Security
(TLS)-based HTTPS. RESTCONF request sent via HTTPS is first received by the NGINX proxy web serve,r
and the request is transferred to the confd web server for further syntax/semantics check.
The following sample output from the show platform software yang-management process command shows
the status of the all processes when a device is booted with the startup-configuration:
The nginx process gets restrated and DMI process are started, when the restconf command is configured.
The following sample output from the show platform software yang-management process command shows
that the nginx process and DMI processes are up and running:
Device# show platform software yang-management process
confd : Running
nesd : Running
syncfd : Running
ncsshd : Not Running ! NETCONF-YANG is not configured, hence ncsshd process is
in not running.
dmiauthd : Running
vtyserverutild : Running
opdatamgrd : Running
nginx : Running ! nginx process is up due to the HTTP configuration, and it is
restarted when RESTCONF is enabled.
ndbmand : Running
The following sample output from the show platform software yang-management process monitor command
displays detailed information about all processes:
Device#show platform software yang-management process monitor
COMMAND PID S VSZ RSS %CPU %MEM ELAPSED
confd 28728 S 860396 168496 42.2 4.2 00:12
confd-startup.s 28448 S 19664 4496 0.2 0.1 00:12
dmiauthd 29499 S 275356 23340 0.2 0.5 00:10
ndbmand 29321 S 567232 65564 2.1 1.6 00:11
nesd 29029 S 189952 14224 0.1 0.3 00:11
nginx 29711 S 332288 18420 0.6 0.4 00:09
nginx 29717 S 337636 12216 0.0 0.3 00:09
pubd 28237 S 631848 68624 2.1 1.7 00:13
syncfd 28776 S 189656 16744 0.2 0.4 00:12
After AAA and the RESTCONF interface is configured, and nginx process and relevant DMI processes are
running; the device is ready to receive RESTCONF requests.
Use the show netconf-yang sessions command to view the status of NETCONF/RESTCONF sessions:
Device# show netconf-yang sessions
Number of sessions : 1
Use the show netconf-yang sessions detail command to view detailed information about
NETCONF/RESTCONF sessions:
Device# show netconf-yang sessions detail
Number of sessions : 1
session-id : 19
transport : netconf-ssh
username : admin
source-host : 2001:db8::1
login-time : 2018-10-26T12:37:22+00:00
in-rpcs : 0
in-bad-rpcs : 0
out-rpc-errors : 0
out-notifications : 0
global-lock : None
root:~#
The POST operation creates a configuration which is not present in the targeted device.
Note Ensure that the logging monitor command is not availabel in the running configuration.
The following sample POST request uses the logging monitor alerts command.
Device:~#
If the specified command is not present on the device, the POST request creates it ; however, if it is
already present in the running configuration, the command will be replaced by this request.
The following sample PUT request uses the logging monitor warnings command.
Device:~# curl -i -k -X "PUT"
"https://10.85.116.30:443/restconf/data/Cisco-IOS-XE-native:native/logging/monitor/severity"
\
> -H 'Content-Type: application/yang-data+json' \
> -H 'Accept: application/yang-data+json' \
> -u 'admin:admin' \
> -d $'{
> "severity": "warnings"
> }'
HTTP/1.1 204 No Content
Server: nginx
Date: Mon, 23 Apr 2018 14:58:36 GMT
Content-Type: text/html
Content-Length: 0
Connection: keep-alive
Last-Modified: Mon, 23 Apr 2018 14:57:46 GMT
Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
Etag: 1524-495466-326956
Pragma: no-cache
Device:~#
The following sample PATCH request uses the logging monitor informational command.
Device:~# curl -i -k -X "PATCH"
"https://10.85.116.30:443/restconf/data/Cisco-IOS-XE-native:native" \
> -H 'Content-Type: application/yang-data+json' \
> -H 'Accept: application/yang-data+json' \
> -u 'admin:admin' \
> -d $'{
> "native": {
> "logging": {
> "monitor": {
> "severity": "informational"
> }
> }
> }
> }'
HTTP/1.1 204 No Content
Server: nginx
Date: Mon, 23 Apr 2018 15:07:56 GMT
Content-Type: text/html
Content-Length: 0
Connection: keep-alive
Last-Modified: Mon, 23 Apr 2018 15:07:56 GMT
Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
Etag: 1524-496076-273016
Pragma: no-cache
Device:~#
The following sample GET request uses the logging monitor informational command.
Device:~# curl -i -k -X "GET"
"https://10.85.116.30:443/restconf/data/Cisco-IOS-XE-native:native/logging/monitor/severity"
\
> -H 'Accept: application/yang-data+json' \
> -u 'admin:admin'
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 23 Apr 2018 15:10:59 GMT
Content-Type: application/yang-data+json
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
Pragma: no-cache
{
"Cisco-IOS-XE-native:severity": "informational"
}
Device:~#
Connection: keep-alive
Last-Modified: Mon, 23 Apr 2018 15:26:05 GMT
Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
Etag: 1524-497165-473206
Pragma: no-cache
linux_host:~#
YANG data models for various releases To access Cisco YANG models in a developer-friendly way, please
of IOS XE, IOS XR, and NX-OS clone the GitHub repository, and navigate to the
platforms vendor/ciscosubdirectory. Models for various releases of IOS-XE,
IOS-XR, and NX-OS platforms are available here.
Standard/RFC Title
RFC 6020 YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)
Technical Assistance
Description Link
Cisco IOS XE Fuji In Cisco IOS XE Fuji 16.8.1a, this feature was implemented on the
16.8.1a following platforms:
• Cisco 1000 Series Integrated Services Routers
• Cisco ASR 900 Series Aggregation Services Routers
• Cisco ASR 920 Series Aggregation Services Router
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 and 9500-High Performance Series Switches
• Cisco cBR-8 Converged Broadband Router
• Cisco Network Convergence System 4200 Series
Cisco IOS XE Fuji In Cisco IOS XE Fuji 16.9.2, this feature was implemented on the
16.9.2 following platforms:
• Cisco Catalyst 9200 and 9200L Series Switches
• Cisco Catalyst 9300L SKUs
Cisco IOS XE
Gibraltar 16.11.1
Cisco IOS XE In Cisco IOS XE Gibraltar 16.12.1, this feature was implemented on
Gibraltar 16.12.1 Cisco Catalyst 9800-L Wireless Controllers.
Cisco IOS XE In Cisco IOS XE Amsterdam 17.3.1, this feature was implemented on
Amsterdam 17.3.1 the following platforms:
• Cisco Catalyst 8200 Series Edge Platforms
• Cisco Catalyst 8300 Series Edge Platforms
• Cisco Catalyst 8500 and 8500L Series Edge Platforms
Cisco IOS XE In Cisco IOS XE Bengaluru 17.4.1, this feature was implemented on
Bengaluru 17.4.1 Cisco Catalyst 8000V Edge Software.
RESTCONF Cisco IOS XE RESTCONF supports YANG-Patch media type as specified by RFC
YANG-Patch Amsterdam 17.1.1 8072.
Support
This feature was implemented on the following platforms:
• Cisco 1000 Series Integrated Services Routers
• Cisco 4000 Series Integrated Services Routers
• Cisco ASR 900 Series Aggregation Services Routers
• Cisco ASR 1000 Aggregation Services Routers (ASR1000-RP2,
ASR1000-RP3, ASR1001-HX, ASR1001-X, ASR1002-HX,
ASR1002-X)
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco cBR-8 Converged Broadband Router
• Cisco Cloud Services Router 1000V Series
• Cisco Network Convergence System 520 Series
• Cisco Network Convergence System 4200 Series
NETCONF Cisco IOS XE Fuji • Cisco 4000 Series Integrated Services Routers
and 16.8.1a
RESTCONF • Cisco ASR 1000 Series Aggregation Services Routers
IPv6 • Cisco ASR 900 Series Aggregation Services Routers
Support
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco CBR-8 Series Routers
• Cisco Cloud Services Router 1000V Series
Cisco IOS XE In Cisco IOS XE Gibraltar 16.11.1, this feature was implemented on
Gibraltar 16.11.1 Cisco Catalyst 9500-High Performance Series Switches.
Converting Cisco IOS XE This feature helps to automatically translate IOS commands into relevant
IOS Cupertino 17.7.1 NETCONF-XML or RESTCONF/JSON request messages.
Commands
This feature is supported on all platforms that support RESTCONF.
to XML
Note Only named ACLs are supported; numbered ACLs are not supported.
SUMMARY STEPS
1. enable
2. configure terminal
3. • ip access-list {standard | extended} access-list-name
• ipv6 access-list access-list-name
4. permit {host-address | host-name | any} [wildcard]
5. deny {host-address | host-name | any} [wildcard]
6. exit
7. netconf-yang ssh {{ipv4 | ipv6 }access-list name access-list-name} | port port-number}
8. end
DETAILED STEPS
Step 3 • ip access-list {standard | extended} access-list-name • Specifies a standard IP access list and enters standard
• ipv6 access-list access-list-name access-list configuration mode.
Example: • Specifies an IPv6 access list and enters IPv6 access-list
Device(config)# ip access-list standard acl1_permit configuration mode.
Step 4 permit {host-address | host-name | any} [wildcard] Sets conditions in an IP/IPv6 access list that will permit
packets.
Example:
Device(config-std-nacl)# permit 192.168.255.0
0.0.0.255
Step 5 deny {host-address | host-name | any} [wildcard] Sets conditions in an IP or IPv6 access list that will deny
packets.
Example:
Device(config-std-nacl)# deny any
Step 7 netconf-yang ssh {{ipv4 | ipv6 }access-list name Configures an ACL for the NETCONF-YANG session.
access-list-name} | port port-number}
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. • ip access-list {standard | extended} access-list-name
• ipv6 access-list access-list-name
4. permit {protocol-number | ipv6-source-address | ipv6-source-prefix | protocol}any
5. deny {protocol-number | ipv6-source-address | ipv6-source-prefix | protocol}any any
6. exit
7. restconf {ipv4 | ipv6 }access-list name access-list-name
8. end
DETAILED STEPS
Step 3 • ip access-list {standard | extended} access-list-name • Specifies a standard IP access list and enters standard
• ipv6 access-list access-list-name access-list configuration mode.
Example: • Specifes an IPv6 access list and enters IPv6 access list
Device(config)# ip access-list standard acl1_permit configuration mode.
Step 4 permit {protocol-number | ipv6-source-address | Sets conditions in an IPv6 access list that will permit
ipv6-source-prefix | protocol}any packets.
Example:
Step 5 deny {protocol-number | ipv6-source-address | Sets conditions in an IPv6 access list that will deny packets.
ipv6-source-prefix | protocol}any any
Example:
Device(config-ipv6-acl)# deny ipv6 any any
Step 6 exit Exits IPv6 access list configuration mode and returns to
global configuration mode.
Example:
Device(config-ipv6-acl)# exit
Step 7 restconf {ipv4 | ipv6 }access-list name access-list-name Configures an ACL for the RESTCONF session.
Example:
Device(config)# restconf ipv6 access-list name
ipv6-acl1_permit
Device# enable
Device# configure terminal
Device(config)# ip access-list standard acl1_permit
Device(config-std-nacl)# permit 192.168.255.0 0.0.0.255
Device(config-std-nacl)# deny any
Device(config-std-nacl)# exit
Device(config)# netconf-yang ssh ipv4 access-list name acl1_permit
Device(config)# end
Device# enable
Device# configure terminal
Device(config)# ipv6 access-list ipv6-acl1_permit
Device(config-ipv6-acl)# permit ipv6 2001:db8::1/32 any
Device(config-ipv6-acl)# deny ipv6 any any
Device(config-ipv6-acl)# exit
Device(config)# restconf ipv6 access-list name ipv6-acl1_permit
Device(config)# end
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Table 15: Feature Information for NETCONF and RESTCONF Service-Level ACLs
NETCONF and Cisco IOS XE You can configure an access control list (ACL) for NETCONF and
RESTCONF Everest RESTCONF sessions. Clients that do not conform to the configured ACL
Service-Level 16.11.1 are not allowed to access the NETCONF or RESTCONF subsystems.
ACLs
The following commands were introduced or modified: netconf-yang
ssh access-list and restconf access-list
• Cisco ASR 900 Series Aggregation Services Routers
• Cisco ASR 920 Series Aggregated Services Routers (RSP2)
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst IE 3200, 3300, 3400 Rugged Series
• Cisco Embedded Services 3300 Series Switches
• Cisco IR1101 Integrated Services Router Rugged
• Cisco Network Convergence System 4200 Series
• Cisco Network Convergence System 520 Series
• GetResponse:
• Alias is not supported. It is a string that provides an alias for a prefix specified within the notification
message.
• Delete is not supported. It is a set of paths that are to be removed from a data tree.
GetResponse
encoding: JSON_IETF
++++++++ Received get response: ++++++++
notification {
timestamp: 1521699434792345469
update {
path {
elem {
name: "interfaces"
}
elem {
name: "interface"
key {
key: "name"
value: "\"Loopback111\""
}
}
}
val {
json_ietf_val: "{\n\t\"openconfig-interfaces:name\":\t\
"Loopback111\",\n\t\
"openconfig-interfaces:config\":\t{\n\t\t\
"openconfig-interfaces:type\":\t\"ianaift:
softwareLoopback\",\n\t\t\
"openconfig-interfaces:name\":\t\"Loopback111\",\n\t\t\
"openconfig-interfaces:enabled\":\t\"true\"\n\t},\n\t\
"openconfig-interfaces:state\":\t{\n\t\t\
"openconfig-interfaces:type\":\t\"ianaift:
softwareLoopback\",\n\t\t\
"openconfig-interfaces:name\":\t\"Loopback111\",\n\t\t\
"openconfig-interfaces:enabled\":\t\"true\",\n\t\t\
"openconfig-interfaces:ifindex\":\t52,\n\t\t\
"openconfig-interfaces:admin-status\":\t\"UP\",\n\t\t\
"openconfig-interfaces:oper-status\":\t\"UP\",\n\t\t\
"openconfig-interfaces:last-change\":\t2018,\n\t\t\
"openconfig-interfaces:counters\":\t{\n\t\t\t\
"openconfig-interfaces:in-octets\":\t0,\n\t\t\t\
"openconfig-interfaces:in-unicast-pkts\":\t0,\n\t\t\t\
"openconfig-interfaces:in-broadcast-pkts\":\t0,\n\t\t\t\
"openconfig-interfaces:in-multicast-pkts\":\t0,\n\t\t\t\
"openconfig-interfaces:in-discards\":\t0,\n\t\t\t\
"openconfig-interfaces:in-errors\":\t0,\n\t\t\t\
"openconfig-interfaces:in-unknown-protos\":\t0,\n\t\t\t\
"openconfig-interfaces:out-octets\":\t0,\n\t\t\t\
"openconfig-interfaces:out-unicast-pkts\":\t0,\n\t\t\t\
"openconfig-interfaces:out-broadcast-pkts\":\t0,\n\t\t\t\
"openconfig-interfaces:out-multicast-pkts\":\t0,\n\t\t\t\
"openconfig-interfaces:out-discards\":\t0,\n\t\t\t\
"openconfig-interfaces:out-errors\":\t0,\n\t\t\t\
"openconfig-interfaces:last-clear\":\t2018\n\t\t},\n\t\t\
"openconfig-platform:hardware-port\":\t\
"Loopback111\"\n\t},\n\t\
"openconfig-interfaces:subinterfaces\":\t{\n\t\t\
"openconfig-interfaces:index\":\t0,\n\t\t\
"openconfig-interfaces:config\":\t{\n\t\t\t\
"openconfig-interfaces:index\":\t0,\n\t\t\t\
"openconfig-interfaces:name\":\t\"Loopback111\",\n\t\t\t\
"openconfig-interfaces:enabled\":\t\"true\"\n\t\t},\n\t\t\
"openconfig-interfaces:state\":\t{\n\t\t\t\
"openconfig-interfaces:index\":\t0,\n\t\t\t\
"openconfig-interfaces:name\":\t\"Loopback111.0\",\n\t\t\t\
"openconfig-interfaces:enabled\":\t\"true\",\n\t\t\t\
"openconfig-interfaces:admin-status\":\t\"UP\",\n\t\t\t\
"openconfig-interfaces:oper-status\":\t\"UP\",\n\t\t\t\
"openconfig-interfaces:last-change\":\t2018,\n\t\t\t\
"openconfig-interfaces:counters\":\t{\n\t\t\t\t\
"openconfig-interfaces:in-octets\":\t0,\n\t\t\t\t\
"openconfig-interfaces:in-unicast-pkts\":\t0,\n\t\t\t\t\
"openconfig-interfaces:in-broadcast-pkts\":\t0,\n\t\t\t\t\
"openconfig-interfaces:in-multicast-pkts\":\t0,\n\t\t\t\t\
"openconfig-interfaces:in-discards\":\t0,\n\t\t\t\t\
"openconfig-interfaces:in-errors\":\t0,\n\t\t\t\t\
"openconfig-interfaces:out-octets\":\t0,\n\t\t\t\t\
"openconfig-interfaces:out-unicast-pkts\":\t0,\n\t\t\t\t\
"openconfig-interfaces:out-broadcast-pkts\":\t0,\n\t\t\t\t\
"openconfig-interfaces:out-multicast-pkts\":\t0,\n\t\t\t\t\
"openconfig-interfaces:out-discards\":\t0,\n\t\t\t\t\
"openconfig-interfaces:out-errors\":\t0,\n\t\t\t\t\
"openconfig-interfaces:last-clear\":\
t2018\n\t\t\t}\n\t\t},\n\t\t\
"openconfig-if-ip:ipv6\":\t{\n\t\t\t\
"openconfig-if-ip:config\":\t\"false\",\n\t\t\t\
"openconfig-if-ip:state\":\t\"false\"\n\t\t}\n\t}\n}"
}
}
}
GetResponse
encoding: JSON_IETF
++++++++ Received get response: ++++++++
notification {
timestamp: 1521699326012374332
update {
path {
elem {
name: "interfaces"
}
elem {
name: "interface"
key {
key: "name"
value: "\"Loopback111\""
}
}
elem {
name: "state"
}
elem {
name: "oper-status"
}
}
val {
json_ietf_val: "\"UP\""
}
}
}
gNMI SetRequest
The Set RPC specifies how to set one or more configurable attributes associated with a supported model. A
SetRequest is sent from a client to a target to update the values in the data tree.
SetRequests also support JSON keys, and must contain a YANG-prefix, in which the namespace of the element
differs from parent.
For example, the routed-vlan element derived from augmentation in openconfig-vlan.yang must be entered
as oc-vlan:routed-vlan, because it is different from the namespace of the parent node (The parent node prefix
is oc-if.).
The total set of deletes, replace, and updates contained in any one SetRequest is treated as a single transaction.
If any subordinate element of the transaction fails; the entire transaction is disallowed and rolled back. A
SetResponse is sent back for a SetRequest.
SetRequest SetResponse
++++++++ Sending set request: ++++++++ ++++++++ Received set response: ++++++++
update { response {
path { path {
elem { elem {
name: "interfaces" name: "interfaces"
} }
elem { elem {
name: "interface" name: "interface"
key { key {
key: "name" key: "name"
value: "Loopback111" value: "Loopback111"
} }
} }
elem { elem {
name: "config" name: "config"
} }
} }
val { op: UPDATE
json_ietf_val: }
"{\"openconfig-interfaces:enabled\":\"false\"}" timestamp: 1521699342123890045
}
}
SetRequest SetResponse
++++++++ Sending set request: ++++++++ ++++++++ Received set response: ++++++++
update { response {
path { path {
elem { elem {
name: "interfaces" name: "interfaces"
} }
elem { elem {
name: "interface" name: "interface"
key { key {
key: "name" key: "name"
value: "Loopback111" value: "Loopback111"
} }
} }
elem { elem {
name: "config" name: "config"
} }
elem { elem {
name: "description" name: "description"
} }
} }
val { op: UPDATE
json_ietf_val: "\"UPDATE DESCRIPTION\"" }
} timestamp: 1521699342123890045
}
gNMI Namespace
A namespace specifies the path prefixing to be used in the origin field of a message.
This section describes the namespaces used in Cisco IOS XE Gibraltar 16.10.1 and later releases:
• RFC 7951-specified namespaces: Path prefixes use the YANG module name as defined in RFC 7951.
The RFC 7951-specified value prefixing uses the YANG module name.
Value prefixing is not affected by the selected path prefix namespace. The following example shows an
RFC 7951-specified value prefix:
val {
json_ietf_val:"{
"openconfig-interfaces:config": {
“openconfig-interfaces:description":
“DESCRIPTION”
}
}"
}
An RFC 7951-specified namespace prefixing also uses the YANG module name. For example, the
openconfig path to a loopback interface will be
/openconfig-interfaces:interfaces/interface[name=Loopback111]/
name: "openconfig-interface:interfaces"
}
elem {
name: "interface"
key {
key: "name"
value: "Loopback111"
}
}
}
• Openconfig: No path prefixes are used. These can only be used with a path to an openconfig model.
The behavior of the Openconfig namespace prefixing is the same when no origin or namespace is provided.
For example, the openconfig path to a loopback interface will be
/interfaces/interface[name=Loopback111]/
This section describes the path prefixing used in releases prior to Cisco IOS XE Gibraltar 16.10.1.
Here, path prefixing uses the YANG module prefix as defined in the YANG module definition. For example,
the openconfig path to a loopback interface will be
/oc-if:interfaces/interface[name=Loopback111]/
The following example shows a gNMI Path with with legacy namespacing:
path {
origin: “legacy"
elem {
name: "oc-if:interfaces"
}
elem {
name: "interface"
key {
key: "name"
value: "Loopback111"
}
}
}
gNMI Wildcards
The gNMI protocol supports wildcards for Get paths. This is the ability to use a wildcards in a path to match
multiple elements. These wildcards indicate all elements in a given subtree in the schema.
An elem is an element, and it is a value between / characters in an xPath. An elem is also available in a gNMI
path. For example, the position of a wildcard relative to elem names implies that the wildcard stands for an
interface, and is interpreted as all interfaces.
There are two types of wildcards; implicit and explicit, and both are supported. Get paths support all types
and combinations of path wildcards.
• Implicit wildcards: These expand a list of elements in an element tree. Implicit wildcard occurs when a
key value is not provided for elements of a list.
The following is a sample path implicit wildcard. This wildcard will return the descriptions of all interfaces
on a device:
path {
elem {
name: "interfaces"
}
elem {
name: "interface"
}
elem {
name: "config"
}
elem {
name: "description"
}
}
}
elem {
name: "description"
}
}
The following sample shows a path asterisk wildcard as the path name. This wildcard will return
the description for all elements that are available in the Loopback111 interface.
path {
elem {
name: "interfaces"
}
elem {
name: "interface"
key {
key: "name"
value: "Loopback111"
}
}
elem {
name: "*"
}
elem {
name: "description"
}
}
• Specifying an ellipsis (...) or a blank entry as element names. These wildcards can expand to multiple
elements in a path.
The following sample shows a path ellipsis wildcard. This wildcard returns all description fields
available under /interfaces.
path {
elem {
name: "interfaces"
}
elem {
name: "..."
}
elem {
name: "description"
}
}
The following is a sample GetRequest with an implicit wildcard. This GetRequest will return the oper-status
of all interfaces on a device.
path {
elem {
name: "interfaces"
}
elem {
name: "interface"
}
elem {
name: "state"
}
elem {
name: "oper-status"
}
},
type: 0,
encoding: 4
notification {
timestamp: 1520627877608777450
update {
path {
elem {
name: "interfaces"
}
elem {
name: "interface"
key {
key: "name"
value: "\"FortyGigabitEthernet1/1/1\""
}
}
elem {
name: "state"
}
elem {
name: "oper-status"
}
}
val {
json_ietf_val: "\"LOWER_LAYER_DOWN\""
}
},
<snip>
…
</snip>
update {
path {
elem {
name: "interfaces"
}
elem {
name: "interface"
key {
key: "name"
value: "\"Vlan1\""
}
}
elem {
name: "state"
}
elem {
name: "oper-status"
}
}
val {
json_ietf_val: "\"DOWN\""
}
}
}
The following sample error message is displayed when the data element is empty:
1. Create a set of certs for the gNMI client and device signed by a Certificate Authority (CA).
a. Create Certs with OpenSSL on Linux.
b. Install Certs on a device.
c. Configure gNMI on the device.
d. Verify whether gNMI is enabled and running.
2. Connect the gNMI client using client and root certificates configured in previous steps.
# Send:
Device# configure terminal
Device(config)# crypto pki import trustpoint1 pem terminal password password1
# Receive:
% Enter PEM-formatted CA certificate.
% End with a blank line or "quit" on a line by itself.
# Send:
# Contents of rootCA.pem, followed by newline + 'quit' + newline:
-----BEGIN CERTIFICATE-----
<snip>
-----END CERTIFICATE-----
quit
# Receive:
# Send:
# Contents of device.des3.key, followed by newline + 'quit' + newline:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,D954FF9E43F1BA20
<snip>
-----END RSA PRIVATE KEY-----
quit
# Receive:
% Enter PEM-formatted General Purpose certificate.
% End with a blank line or "quit" on a line by itself.
# Send:
# Contents of device.crt, followed by newline + 'quit' + newline:
-----BEGIN CERTIFICATE-----
<snip>
-----END CERTIFICATE-----
quit
# Receive:
% PEM files import succeeded.
Device(config)#
# Send:
Device(config)# crypto pki trustpoint trustpoint1
Device(ca-trustpoint)# revocation-check none
Device(ca-trustpoint)# end
Device#
Note This task is applicable in Cisco IOS XE Amsterdam 17.3.1 and later releases.
In a Day Zero setup, first enable the device in insecure mode, then disable it, and enable the secure mode. To
stop gNxI in insecure mode, use the no gnxi server command.
Note gNxI insecure and secure servers can run simultaneously on a device.
Note The gnxi commands apply to both gNMI and gRPC Network Operations Interface (gNOI) services.
gNxI tools are a collection of tools for Network Management that use the gNMI and gNOI protocols.
SUMMARY STEPS
1. enable
2. configure terminal
3. gnxi
4. gnxi server
5. gnxi port port-number
6. end
7. show gnxi state
DETAILED STEPS
Step 5 gnxi port port-number Sets the gNxI port to listen to.
Example: • The default insecure gNxI port is 50052.
(Optional) Device(config)# gnxi port 50000
Note This task is applicable in Cisco IOS XE Amsterdam 17.3.1 and later releases.
Note gNxI insecure and secure servers can simultaneously run on a device.
Note The gnxi commands apply to both gNMI and gRPC Network Operations Interface (gNOI) services.
gNxI tools are a collection of tools for Network Management that use the gNMI and gNOI protocols.
SUMMARY STEPS
1. enable
2. configure terminal
3. gnxi
4. gnxi secure-server
5. gnxi secure-trustpoint trustpoint-name
6. gnxi secure-client-auth
7. gnxi secure-port
8. end
9. show gnxi state
DETAILED STEPS
Step 5 gnxi secure-trustpoint trustpoint-name Specifies the trustpoint and cert set that gNxI uses for
authentication.
Example:
Device(config)# gnxi secure-trustpoint trustpoint1
Step 6 gnxi secure-client-auth (Optional) The gNxI process authenticates the client
certificate against the root certificate.
Example:
Step 7 gnxi secure-port (Optional) Sets the gNxI port to listen to.
Example: • The default secure gNxI port is 9339.
Device(config)# gnxi secure-port
Example
The following is sample output from the show gnxi state command:
State Status
--------------------------------
Enabled Up
# Default port is 9339, can be changed on ios device with 'gnxi secure-port ####'
>>> port = 9339
>>> host = <HOSTNAME FQDN>
>>> secure_channel = grpc.secure_channel("%s:%d" % (host, port), credentials)
Note This example is applicable in Cisco IOS XE Amsterdam 17.3.1 and later releases.
The following example shows how to enable the gNxI server in insecure mode:
Device> enable
Device# configure terminal
Device(config)# gnxi
Device(config)# gnxi server
Device(config)# gnxi port 50000 <The default port is 50052.>
Device(config)# end
Device#
Note This example is applicable in Cisco IOS XE Amsterdam 17.3.1 and later releases.
The following example shows how to enable the gNxI server in secure mode:
Device> enable
Device# configure terminal
Device(config)# gnxi
Device(config)# gnxi server
Device(config)# gnxi secure-server
Device(config)# gnxi secure-trustpoint trustpoint1
Device(config)# gnxi secure-client-auth
Device(config)# gnxi secure-port 50001 <The default port is 9339.>
Device(config)# end
Device#
gNMI https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md
Standard/RFC Title
RFC 7951 JSON Encoding of Data Modeled with YANG
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
gNMI Protocol Cisco IOS XE Fuji 16.8.1a This feature describes the model-driven
configuration and retrieval of operational data
using the gNMI capabilities, GET and SET
RPCs.
This feature was implemented on the
following platforms:
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
gNMI IPv6 Support Cisco IOS XE Dublin 17.10.1 gNMI IPv6 Support is enabled in Cisco IOS
XE Dublin 17.10.1.
• Cisco Catalyst 9200 and 9200L Series
Switches
• Cisco Catalyst 9300, 9300L, and 9300X
Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 and 9500
High-Performance Series Switches
• Cisco Catalyst 9600 Series Switches
gNMI Username and Cisco IOS XE Gibraltar The Username and Password Authentication
Password Authentication 16.12.1 feature was added to the gNMI protocol. This
feature is supported on all IOS XE platforms
that support gNMI.
gNMI Configuration Cisco IOS XE Amsterdam All successful configuration changes made
Persistence 17.3.1 through the gNMI SetRequest RPC persists
across device restarts. This feature was
implemented on the following platforms:
• Cisco 1000 Series Integrated Services
Routers
• Cisco 4000 Series Integrated Services
Routers
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
gNOI Certificate Management Cisco IOS XE Amsterdam The gNOI Certificate Management Service
17.3.1 provides RPCs to install, rotate, get certificate,
revoke certificate, and generate certificate
signing request. This feature was implemented
on the following platforms:
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
gNOI Bootstrapping with Cisco IOS XE Amsterdam After installing gNOI certificates,
Certificate Service 17.3.1 bootstrapping is used to configure or operate
a target device. gNMI bootstrapping is enabled
by using the gnxi-secure-int command and
disabled by using the
secure-allow-self-signed-trustpoint
command.
This feature was implemented on the
following platforms:
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
• Install: Installs a certificate. All certificates are uniquely identified by a certificate ID. The certificate ID
is a string.
• Rotate: Rotates an existing certificate.
• RevokeCertificates: Revokes one or more certificates.
• GetCertificates: Queries all certificates.
• CanGenerateCSR: Queries whether the device can generate a Certificate Signing Request (CSR).
Trustpoints and certificates created through the RPCs mentioned above persist across switchovers and device
reboots.
The following is a sample Certificate Management Service definition:
service CertificateManagement {
rpc Install(stream InstallCertificateRequest)
returns (stream InstallCertificateResponse);
rpc RevokeCertificates(RevokeCertificateRequest)
returns (RevokeCertificateResponse);
rpc GetCertificates(GetCertificateRequest)
returns (GetCertificateResponse);
rpc CanGenerateCSR(CanGenerateCSRRequest)
returns (CanGenerateCSRResponse);
}
Install RPC
The Install RPC adds a new certificate to a device by creating a new CSR request. The new certificate is
associated with a new certificate ID on the device. If the device has a pre-existing certificate with the given
certificate ID, the operation fails.
The Install RPC is a bidirectional streaming RPC. It has an input (InstallCertificateRequest) and an output
(IntsallCertificateResponse) both of which are streaming. If the stream is broken, or any steps in the process
fail, the device rolls back the changes.
The following is an example of the Install RPC definition and messages:
CSRParams csr_params = 1;
// The certificate id with which this CSR will be associated. The target
// configuration should bind an entity which wants to use a certificate to
// the certificate_id it should use.
string certificate_id = 2;
}
// Parameters to be used when generating a Certificate Signing Request.
message CSRParams {
// The type of certificate which will be associated for this CSR.
CertificateType type = 1;
// If provided, the target must use the provided key type. If the target
// cannot use the algorithm specified in the key_type, it should cancel the
// stream with an Unimplemented error.
KeyType key_type = 3;
// --- common set of parameters applicable for any type of certificate --- //
string common_name = 4; // e.g "device.corp.google.com"
string country = 5; // e.g "US"
string state = 6; // e.g "CA"
string city = 7; // e.g "Mountain View"
string organization = 8; // e.g "Google"
string organizational_unit = 9; // e.g "Security"
string ip_address = 10;
string email_id = 11;
}
// A certificate.
message Certificate {
// Type of certificate.
CertificateType type = 1;
// Actual certificate.
// The exact encoding depends upon the type of certificate.
// for X509, this should be a PEM encoded Certificate.
bytes certificate = 2;
}
message LoadCertificateRequest {
// The certificate to be Loaded on the target.
Certificate certificate = 1;
// The key pair to be used with the certificate. This is provided in the event
// that the target cannot generate a CSR (and the corresponding public/private
// keys).
KeyPair key_pair = 2;
After the target device is up and gNOI is in default state, the controller (a third-party implementation) uses
the Install RPC to install a certificate that is signed by a Certificate Authority (CA). The certificate is uniquely
identified by a certificate ID. This ID is used as the trustpoint name in the Public Key Infrastructure (PKI)
configuration. The installation will fail, if you try to install a certificate that has an existing certificate ID.
The following section describes how a CSR is generated by a device:
1. The device generates a self-signed certificate through the Install RPC. The controller does not require a
copy of this certificate because in encrypted mode (or gNMI default state) the controller does not validate
the certificate presented by the target device. This is the default state.
2. The controller requests the device to generate a CSR, sends the CSR to the CA, and gets the signed
certificate back from the CA.
3. The signed certificate is installed into the device along with the CA certificates used to sign the certificate.
The CA certificate is present in the ca_certificates bundle, and is required by the PKI to install the device
certificate.
4. The gNMI or the gNOI service restarts using the newly installed certificate that is now in the provisioned
state.
Rotate RPC
The Rotate RPC renews an existing certificate; a certificate that is already installed. If a certificate is not
already installed, the Rotate RPC fails. A certificate that is not in use can be rotated, but the client cannot test
it.
The following is a sample Rotate RPC definition:
message RotateCertificateResponse {
// Response messages.
oneof rotate_response {
GenerateCSRResponse generated_csr = 1;
LoadCertificateResponse load_certificate = 2;
}
}
The Rotate RPC differs from the Install RPC in the following ways:
• PKI has to save or cache the old certificate and the CA certificate when installing a new certificate (for
the purpose of rollback).
• The controller creates a new connection to test whether the renewed certificate works, and in case of
success, finalizes the certificate rotation.
Revoke RPC
This RPC is used to revoke one or more certificates, each uniquely identified by a certificate ID. Revocation
of a certificate results in the corresponding trustpoint to be removed from the Cisco IOS XE configuration.
If the corresponding trustpoints are currently in use, or if the trustpoints do not exist, revocation of the
certificates may fail.
A RevokeCertificate RPC may have certificates revoked successfully or unsuccessfully. On the target device,
revocation is a simple delete operation; the actual revocation with the CA is done by the client. If the client
revokes a certificate that is in use, new connections fail, but the existing connections are unaffected.
The following is a sample RevokeCertificate RPC:
message RevokeCertificatesRequest {
// Certificates to revoke.
message RevokeCertificatesResponse {
// List of certificates successfully revoked.
repeated string revoked_certificate_id = 1;
GetCertificate RPC
This RPC queries all certificate IDs.
The response to the query contains the following information:
• Certificate information for all the certificates that are identified by a certificate ID.
• The list of endpoints, for example, tunnels, daemons, and so on, that use this certificate.
// Response from the target about the certificates that exist on the target what
// what is using them.
message GetCertificatesResponse {
repeated CertificateInfo certificate_info = 1;
}
message CertificateInfo {
string certificate_id = 1;
Certificate certificate = 2;
CanGenerateCSR RPC
This RPC queries whether a device can generate a CSR for a specific key type, certificate type, and key size.
The supported key type is Rivest, Shamir, and Adelman (RSA), and the supported certificate type is X.509.
When this RPC request is made for installing a completely new certificate as part of the Install RPC, the device
must ensure that the certificate ID is new and no entities on the device are bound to this certificate ID. If any
existing certificate matches the certificate ID, this request fails.
When this RPC request is made for rotating an existing certificate as part of the Rotate RPC, the device must
ensure that the certificate ID is already available. If certificate rotation proceeds to load the certificate, it must
associate the new certificate with the previously created certificate ID.
The following is a sample CanGenerateCSR RPC:
// Types of certificates.
enum CertificateType {
// 1 - 500 for public use.
// 501 onwards for private use.
CT_UNKNOWN = 0;
CT_X509 = 1;
}
// Response from the target about whether it can generate a CSR with the given
// parameters.
message CanGenerateCSRResponse {
bool can_generate = 4;
}
Mutual Authentication
Mutual authentication is a two-way authentication; two parties authenticate each other at the same time. To
enable mutual-authentication, use the gnmi-yang secure-peer-verify-trustpoint command. If this command
is not enabled, the authentication service validates the gNMI client against all the existing trustpoints and the
contents of the trustpool.
Rotation of the CA certificates for mutual authentication requires the client to present a new bundle to the
target device, and the old bundle to be removed. However, the CA certificates reside in a trustpool, and cannot
be selectively deleted from the trustpool.
Note The gNOI Certificate Management Service must be installed before bootstapping.
The gNOI Certificate Management Service has two states. These states are supported by both the gNOI service
and the gNMI service.
• Default/Encrypted: gNOI and gNMI on the device use a self-signed (default) certificate that the client
does not verify; the certificate does not require authentication. In this state, only the gNOI certificate
service is enabled on the target device.
• Provisioned: gNOI and gNMI on the device use an installed certificate that is verified by the client, and
the client presents its certificate, which the device verifies against its certificate store. The device verifies
the client certificate only if mutual authentication is enabled.
OS Installation Service
The OS installation service defines a gNOI API that is used for installation. The OS installation service is
supported in the gNOI protocol.
This service provides an interface for the installation of an OS on a device. It supports the following three
RPCs:
• Install: This RPC transfers an image to a device. These images are uniquely identified by a version string.
This RPC is the similar to the install add command; the main difference is that the image is transferred
as part of the RPC.
• Activate: This RPC sets the requested OS version, which is part of the input to the RPC, as the version
to be used at the next reboot, and reboots the device. This RPC is the same as the install activate and
the install commit commands.
• Verify: This RPC verifies the current OS version.
Cisco IOS XE devices support both install mode and bundle mode to boot software images.
In install mode, you can bring up your device by booting the software package provisioning file that resides
in the flash: file system. The ISO file system in each installed package is mounted to the root file system
(rootfs) directly from the flash.
In bundle mode, you can boot your device by using the bundle (.bin) file. Packages are extracted from the
bundle, and copied to the RAM. The ISO file system in each package is mounted to the rootfs. Unlike install
boot mode, additional memory that is equivalent to the size of the bundle is used when booting in bundle
mode.
In the following scenarios, an error message is generated when a device starts in bundle mode:
• The device starts with the current image running in bundle mode.
• The install RPC is initiated on the device to install a new image.
Even though an error message is generated, the install RPC returns a success to the client. The error message
can be safely ignored; the subsequent activate RPC is not affected. After rebooting with the new image, the
device is in install mode.
Note This error message is not displayed if the device was initially running in install mode. It is applicable
only when the device starts in bundle mode.
To view all the error messages, see https://github.com/openconfig/gnoi/blob/master/os/os.proto#L218.
For more information about installation modes, see the "Performing Device Setup Configuration" chapter of
the System Management Configuration Guide for all the Cisco Catalyst 9000 Series Switches.
the device supports a single RP, the gNOI OS installation service uses a regular non-ISSU image install
workflow to process the gRPC activate request.
In bundle mode, the upgrade is done through the install add file filename activate commit command. This
upgrade is the same for devices with a single RP. No ISSU support means that both the RPs are reloaded at
the same time, and the device is down until one RP comes up.
In install mode without ISSU, both the RPs are reloaded at the same time and the device is down until one
RP comes up. In install mode with ISSU, the reload of the RPs is simultaneous, and the device downtime is
shorter.
OS Install RPC
The Install RPC transfers an image to a device. The RPC consists of the input InstallRequest RPC, and the
output InstallResponse RPC, both of which are bidirectional streaming RPCs.
This RPC does not support Software Maintenance Update (SMU).
The following is a high-level message sequence for an Install RPC on a device with a single RP that is running
the operating system Version 1:
1. A client initiates an Install RPC to the device.
2. The client sends a TransferRequest message to the device, with version set to Version 2.
3. The device responds with a TransferReady message to the client. This is required for the client to start
transferring the image.
4. The client transfers the image by sending multiple transfer_content messages to the device.
5. Optionally, the device sends TransferProgress messages to the client.
6. The client sends a TransferEnd message to the device, indicating that the image transfer is complete.
7. In install mode, the device does an operation equivalent of the install add command programmatically.
The contents of the package are extracted.
8. The device sends a Validated message, which contains the version extracted from the image, to the client,
indicating that the image transfer is valid.
Note If the Install RPC is stopped prematurely by the client, or if any part of the operation fails, the local
image file is removed, and the install remove inactive command is invoked automatically. An appropriate
status code is returned to the client.
OS Activate RPC
The Activate RPC sets the requested operating system version as the version to be used at the next reboot,
and reboots the target device. The RPC activates an installed operating system version. If the version is not
already installed, the Activate RPC fails.
The client must provide a version that has been received in the Validated message of the Install RPC.
The following is the message sequence for an Activate RPC on a device with a single RP running operating
system Version 1:
1. The client initiates an Activate RPC to a device.
Note Only one inactive image version is supported. Because of this, if a client installs Version 2 and then
Version 3, the Version 2 files get deleted.
The following images display the image activation workflow.
OS Verify RPC
The Verify RPC verifies the running OS version. The response to the RPC contains information about the
support and presence of a standby RP.
If there was an error in the last activate RPC, that error is returned in the response as a string. The gNOI OS
installation service uses the install operational model and platform model to populate this information. Currently,
the install operational model does not support different versions running on two RPs.
When the factory_os field is requested, the GNMIB In the ResetError message, the client will also receive
returns a gRPC error code of the factory_os_unsupported field set to TRUE. The
INVALID_ARGUMENT along with the message, other fields in the message will have default values.
“Factory OS rollback is not supported.”
This device does not support the requested zero-fill The StartRequest message has an optional field,
option. zero_fill that instructs the target device to zero fill the
persistent storage state data.
When a client requests a zero-fill, and if the device
cannot perform a zero fill, then the gRPC error code
of INVALID_ARGUMENT is sent back to the client
along with the message, “This device does not support
the requested zero-fill option.”
In the ResetError message, the zero_fill_unsupported
field is set to TRUE.
This device does not support the requested zero-fill When the device can perform a zero-fill, but the client
option. has not made a request for a zero-fill, then the gRPC
error code of INVALID_ARGUMENT is sent back
to the client with the message, “This device does not
support the requested zero-fill option.”
In the ResetError message, the zero_fill_unsupported
field is set to FALSE.
Factory reset capability is not present. When the gNOI factory-reset script is run on an
unsupported platform, the factory-reset services
returns the gRPC error code of UNIMPLEMENTED
with the message, “Factory reset capability is not
present.”
Factory reset interface is not ready. When the gNOI factory-reset management interface
is down or busy, the factory-reset services returns the
gRPC error code of UNAVAILABLE with the
message, “Factory reset interface is not ready.”
Without using a cert.proto provisioning operation, or configuring gNOI with a signed certificate (not
self-signed), the gNOI factory-reset service will always return the FAILED_PRECONDITION error code.
gNOI https://github.com/openconfig/gnoi
OS Service https://github.com/openconfig/gnoi/blob/master/os/os.proto
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Table 20: Feature Information for the gRPC Network Operations Interface
gNOI Certificate Management Cisco IOS XE Amsterdam The gNOI Certificate Management Service
17.3.1 provides RPCs to install, rotate, get certificate,
revoke certificate, and generate certificate
signing request.
In Cisco IOS XE Amsterdam 17.3.1, this
feature was implemented on the following
platforms:
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
gNOI Bootstrapping with Cisco IOS XE Amsterdam After installing gNOI certificates,
Certificate Service 17.3.1 bootstrapping is used to configure or operate
a target device. gNMI bootstrapping can be
enabled by using the gnxi secure-int
command.
In Cisco IOS XE Amsterdam 17.3.1, this
feature was implemented on the following
platforms:
• Cisco Catalyst 9200 Series Switches
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 Series Switches
• Cisco Catalyst 9600 Series Switches
gNOI OS Installation Service Cisco IOS XE Bengaluru The gNOI OS installation service defines a
17.5.1 gNOI API that is used for installation.
In Cisco IOS XE Bengaluru 17.5.1, this
feature was implemented on the following
platforms:
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 and 9500-High
Performance Series Switches
• Cisco Catalyst 9600 Series Switches
gNOI Factory Reset Services Cisco IOS XE Cupertino The gNOI factory reset service provides an
17.7.1 interface that instructs target devices to clean
the existing state, and boot the devices in same
condition as it was shipped from the factory.
In Cisco IOS XE Cupertino 17.7.1, this feature
was implemented on the following platforms:
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9400 Series Switches
• Cisco Catalyst 9500 and 9500-High
Performance Series Switches
• Cisco Catalyst 9800-40 Wireless
Controllers
• Cisco Catalyst 9800-80 Wireless
Controllers
Initial Operation
Upon enabling the NETCONF and/or RESTCONF services, a device that has no prior configuration of the
/nacm subtree will deny read, write, and execute access to all operations and data other than the users of
privilege level 15. This is described in the following configuration of the /nacm subtree:
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
<enable-nacm>true</enable-nacm>
<read-default>deny</read-default>
<write-default>deny</write-default>
<exec-default>deny</exec-default>
<enable-external-groups>true</enable-external-groups>
<rule-list>
<name>admin</name>
<group>PRIV15</group>
<rule>
<name>permit-all</name>
<module-name>*</module-name>
<access-operations>*</access-operations>
<action>permit</action>
</rule>
</rule-list>
</nacm>
Group Membership
The group membership of a user can come from two sources- first, from the privilege level of the user as
configured on the AAA server used for authorization, and second, from those configured in the /nacm/groups
subtree. The names of the groups that correspond to each privilege level are as follows:
0 PRIV00
1 PRIV01
2 PRIV02
3 PRIV03
4 PRIV04
5 PRIV05
6 PRIV06
7 PRIV07
8 PRIV08
9 PRIV09
10 PRIV10
11 PRIV11
12 PRIV12
13 PRIV13
14 PRIV14
15 PRIV15
Note Traditional IOS command authorization, such as those based on privilege level, does not apply to
NETCONF or RESTCONF.
Note Access granted to a NACM group based on a privilege level do not inherently apply to NACM groups
with higher privilege level. For example, rules that apply to PRIV10 do not automatically apply to
PRIV11, PRIV12, PRIV13, PRIV14, and PRIV15 as well.
Note The NACM rules that apply to a NETCONF session are those that are configured in the /nacm subtree
at the time of session establishment. Modifying the /nacm subtree has no effect on NETCONF sessions
as they are already established. The <kill-session> RPC or the clear netconf-yang session EXEC
command can be used to forcibly end an unwanted NETCONF session. See NETCONF Kill Session,
on page 160.
Note Care should be taken when crafting rules to deny access to certain data as the same data may be exposed
through multiple YANG modules and data node paths. For example, interface configuration is exposed
through both Cisco-IOS-XE-native and ietf-interface. Rules that may apply to one representation of
the same underlying data may not apply to other representations of that data.
Note The examples in this section are for illustrative purposes only.
<user-name>admin</user-name>
<user-name>root</user-name>
</group>
<group>
<name>limited-permission</name>
<user-name>alice</user-name>
<user-name>bob</user-name>
</group>
</groups>
</nacm>
Parameter Description
Table 22: Description of the Configuration Paramenters for Creating Module Rules
Parameter Description
<action>deny</action> Permit/deny
<rule>
<name>deny-edit-config</name>
<module-name>ietf-netconf</module-name>
<rpc-name>edit-config</rpc-name>
<access-operations>exec</access-operations>
<action>deny</action>
</rule>
<rule>
<name>allow-get</name>
<module-name>ietf-netconf</module-name>
<rpc-name>get</rpc-name>
<access-operations>exec</access-operations>
<action>permit</action>
</rule>
</rule-list>
</nacm>
Table 23: Description of the Configuration Paramenters for Creating Protocol Operation Rules
Parameter Description
<action>deny</action> Permit/deny
<rule>
<name>deny-enable-passwords</name>
<path xmlns:ios="http://cisco.com/ns/yang/Cisco-IOS-XE-native>/ios:native/enable
</path>
<access-operations>*</access-operations>
<action>deny</action>
</rule>
</rule-list>
</nacm>
Table 24: Description of the Configuration Paramenters for Creating Data Node Rules
Parameter Description
<action>deny</action> Permit/deny
The following is an example NACM configuration that permits all groups to use the standard NETCONF
RPCs <get> and <get-config>, the schema download RPC <get-schema>, and read-only access to the data in
the module ietf-interfaces:
<nacm xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-acm">
<rule-list>
<name>readonly-protocol</name>
<group>*</group>
<rule>
<name>get-permit</name>
<module-name>ietf-netconf</module-name>
<rpc-name>get</rpc-name>
<access-operations>exec</access-operations>
<action>permit</action>
</rule>
<rule>
<name>get-config-permit</name>
<module-name>ietf-netconf</module-name>
<rpc-name>get-config</rpc-name>
<access-operations>exec</access-operations>
<action>permit</action>
</rule>
<rule>
<name>get-schema-permit</name>
<module-name>ietf-netconf-monitoring</module-name>
<rpc-name>get-schema</rpc-name>
<access-operations>exec</access-operations>
<action>permit</action>
</rule>
</rule-list>
<rule-list>
<name>readonly-data</name>
<group>*</group>
<rule>
<name>ietf-interfaces-permit</name>
<module-name>ietf-interfaces</module-name>
<access-operations>read</access-operations>
<action>permit</action>
</rule>
</rule-list>
</nacm>
Standard/RFC Title
RFC 6020 YANG - A Data Modeling Language for the Network Configuration
Protocol (NETCONF)
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, http://www.cisco.com/support
including documentation and tools for troubleshooting and resolving
technical issues with Cisco products and technologies.
To receive security and technical information about your products,
you can subscribe to various services, such as the Product Alert Tool
(accessed from Field Notices), the Cisco Technical Services
Newsletter, and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a
Cisco.com user ID and password.
Model-Based AAA Cisco IOS XE Fuji 16.8.1 This feature was implemented on the
following platforms:
• Cisco ASR 900 Series Aggregated
Services Routers
• Cisco ASR 920 Series Aggregated
Services Routers
• Cisco ASR 1000 Series Aggregated
Services Routers
• Cisco CSR 1000v Switches
• Cisco ISR 1100 Series Integrated
Services Routers
• Cisco ISR 4000 Series Integrated
Services Routers
• Cisco NCS 4200 Series
Model-Driven Telemetry
Model-driven telemetry provides a mechanism to stream YANG-modelled data to a data collector. This module
describes model-driven telemetry and provides sample telemetry remote procedure calls (RPCs).
Verify that the following processes are running, by using the show platform software yang-management
process command:
confd : Running
nesd : Running
syncfd : Running
ncsshd : Running
dmiauthd : Running
nginx : Running
ndbmand : Running
pubd : Running
gnmib : Running
Note The process pubd is the model-driven telemetry process, and if it is not
running, model-driven telemetry will not work.
The following table provides details about each of the Device Management Interface (DMI) processes.
NETCONF-Specific Prerequisites
• Knowledge of NETCONF and how to use it, including:
• Establishing a NETCONF session.
• Sending and receiving hello and capabilities messages.
• Sending and receiving YANG XML RPCs over the established NETCONF session. For more
information, see the Configure NETCONF/YANG and Validate Example for Cisco IOS XE 16.x
Platforms document.
NETCONF is ready to use, when a successful reply is received in response to your hello message.
RESTCONF-Specific Prerequisites
• Knowledge of RESTCONF and how to use it (when creating a subscription using RESTCONF).
• RESTCONF must be configured on the device.
• RESTCONF must send correctly-formed Uniform Resource Identifiers (URIs) that adhere to RESTCONF
RFC 8040.
"revision": "1998-10-19",
"schema": "https://10.85.116.28:443/restconf/tailf/
..
<snip>
..
}
RESTCONF is validated successfully when you receive the above reply with all device capabilities.
gRPC-Specific Prerequisites
• Set up a gRPC collector that understands key-value Google Protocol Buffers (GPB) encoding.
gRPC-Specific Restrictions
• Transport Layer Security-based (TLS-based) authentication between a device and receiver is not supported.
TLS-based authentication is supported in Cisco IOS XE Amsterdam 17.1.1 and later releases.
yang-push-Specific Restriction
• Subscription quality of service (QoS) is not supported.
Telemetry Roles
In systems that use telemetry, different roles are involved. In this document the following telemetry roles are
described:
• Publisher: Network element that sends the telemetry data.
• Receiver: Receives the telemetry data. This is also called the collector.
• Controller: Network element that creates subscriptions but does not receive the telemetry data. The
telemetry data associated with the subscriptions, it creates goes to receivers. This is also called the
management agent or management entity.
• Subscriber: Network element that creates subscriptions. Technically, while this does not have to be the
receiver too, in this document, both are the same.
Subscription Overview
Subscriptions are items that create associations between telemetry roles, and define the data that is sent between
them.
Specifically, a subscription is used to define the set of data that is requested as part of the telemetry data; when
the data is required, how the data is to be formatted, and, when not implicit, who (which receivers) should
receive the data.
Even though the maximum number of supported subscriptions is platform-dependent, currently 100
subscriptions are supported. The subscriptions can be either configured or dynamic, and use any combination
of transport protocols. If too many subscriptions are operating at the same time to allow all the valid configured
subscriptions to be active, the removal of an active subscription will cause one of the inactive but valid
configured subscriptions to be attempted. Periodic triggered subscriptions (100 centiseconds is the default
minimum) and on-change triggered subscriptions are supported.
NETCONF and other northbound programmable interfaces (such as RESTCONF or gNMI) are supported to
configure subscriptions.
Two types of subscriptions are used in telemetry on Cisco IOS XE systems: dynamic and configured
subscriptions.
Because dynamic subscriptions are created by clients (the subscriber) that connect into the publisher, they are
considered dial-in. Configured subscriptions cause the publisher to initiate connections to receivers, and as a
result, they are considered dial-out.
Telemetry updates are sent to the initiator or Telemetry updates are sent to the specified receiver
subscriber. or collector.
Life of the subscription is tied to the connection Subscription is created as part of the running
(session) that created it, and over which telemetry configuration; it remains as the device configuration
updates are sent. No change is observed in the running till the configuration is removed.
configuration.
Dial-in subscriptions need to be reinitiated after a Dial-out subscriptions are created as part of the device
reload, because established connections or sessions configuration, and they automatically reconnect to the
are killed during stateful switchover. receiver after a stateful switchover.
Subscription ID is dynamically generated upon Subscription ID is fixed and configured on the device
successful establishment of a subscription. as part of the configuration.
Update Notifications
As part of a subscription, you can specify when data is required. However this is stream-dependent. Some
streams support making data available only when there a change happens, or after an event within the stream.
Other streams make data available when there is a change or at a defined time period.
The result of the when specification is a series of update notifications that carry the telemetry data of interest.
How the data is sent is dependent on the protocol used for the connection between the publisher and the
receiver.
Subscription Identifiers
Subscriptions are identified by a 32-bit positive integer value. The IDs for configured subscriptions is set by
the controller, and for dynamic subscriptions is set by the publisher.
Controllers must limit the values they use for configured subscriptions in the range 0 to 2147483647 to avoid
collisions with the dynamic subscriptions created on the publisher. The dynamic subscription ID space is
global, meaning that the subscription IDs for independently-created dynamic subscriptions do not overlap.
Subscription Management
Any form of management operation can be used to create, delete, and modify configured subscriptions. This
includes both CLIs and network protocol management operations.
All subscriptions, both configured and dynamic, can be displayed using show commands and network protocol
management operations.
The following table describes the supported streams and encodings along with the combinations that are
supported. While streams-as-inputs is intended to be independent of the protocols-as-outputs, not all
combinations are supported.
Stream
ok <establish-subscription> Success
<delete-subscription>
Service gNMI
The gNMI specification identifies a single top-level service named gNMI that contains high-level RPCs. The
following is a service definition that contains the subscribe service RPC:
service gNMI{
.
.
.
rpc Subscribe(stream SubscribeRequest)
returns (stream SubscribeResponse);
The <subscribe RPC> is used by a management agent to request a dynamic subscription. This RPC contains
a set of messages. The following section describes the messages supported by the <subscribe RPC>
SubscribeRequest Message
This message is sent by a client to request updates from the target for a specified set of paths. The following
is a message definition:
message SubscribeRequest {
oneof request {
SubscriptionList subscribe = 1;
PollRequest poll = 3;
AliasList aliases = 4;
}
Repeated gNMI_ext.Extensions = 5;
}
SubscribeResponse Message
This message is carried from the target to the client over an established <subscribe RPC>. The following is
a message definition:
message SubscribeResponse {
oneof response {
Notification update = 1;
Bool sync_response = 3;
Error error = 4 [deprecated=true];
}
}
SubscriptionList Message
This message is used to indicate a set of paths for which common subscription behavior are required. Within
the specification of the SubscriptionList message, the client can identify one or more subscriptions to a given
prefix in the model. The following is a SubscriptionList message defintion:
message SubscriptionList {
Path prefix = 1;
repeated Subscription subscription = 2;
bool use_aliases = 3;
QOSMarking qos = 4;
enum Mode {
STREAM = 0;
ONCE = 1;
POLL = 2;
}
Mode mode = 5;
bool allow_aggregation = 6;
repeated ModelData use_models = 7;
Encoding encoding = 8; // only JSON_IETF supported in R16.12
Bool updates_only = 9;
Note Path prefix (only explicit element names), Subscription subscription, Mode mode STREAM, and
Encoding encoding IETF_JSON are supported.
Prefix Message
A valid subscription list may or may not contain a filled in prefix, composed of the shared (across all requested
subscriptions) portion of the xPath.
message Path {
repeated string element = 1; [ deprecated ]
string origin = 2;
repeated PathElem elem = 3;
optional string target = 4;
}
Note Origin (supported values are “” and “openconfig”), elem (supported element name is prefix-free), and
target are supported.
Subscription Message
This message generically describes a set of data that is to be subscribed to by a client. It contains a path,and
attributes used to govern the notification behaviors. The following is a Subscription message definition:
message Subscription {
Path path = 1;
SubscriptionMode mode = 2;
uint64 sample_interval = 3;
bool suppress_redundant = 4;
uint64 heartbeat_interval = 5;
}
Note Path path, SubscriptionMode mode, Uint64 sample_interval, and Uint64 heartbeat_interval (only if the
value is set to 0) are supported.
Path Message
A valid subscription contains a filled in path, which when added to the prefix associated with the subscription
list constitutes a full qualified path. The following is a Path message definition:
message Path {
repeated string element = 1; [ deprecated ]
string origin = 2;
repeated PathElem elem = 3;
optional string target = 4;
}
Note Origin (supported values are “” and “openconfig”), elem (supported element name is prefix-free), and
target are supported.
SubscriptionMode Message
This message informs the target about how to trigger notifications updates. The following is a SubscriptionMode
message definition:
enum SubscriptionMode {
TARGET_DEFINED = 0;
ON_CHANGE = 1;
SAMPLE = 2;
}
Notifications Message
This message delivers telemetry data from the subscription target to the collector. The following is a
Notifications message definition:
message Notification {
int64 timestamp = 1;
Path prefix = 2;
string alias = 3;
repeated Update update = 4;
repeated Path delete = 5;
bool atomic = 6;
}
<establish-subscription xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<stream>yp:yang-push</stream>
<yp:xpath-filter>/cdp-ios-xe-oper:cdp-neighbor-details/cdp-neighbor-detail</yp:xpath-filter>
<yp:dampening-period>0</yp:dampening-period>
</establish-subscription>
<get>
<filter>
<mdt-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-oper">
<mdt-subscriptions/>
</mdt-oper-data>
</filter>
</get>
<comments/>
<mdt-receivers>
…
</mdt-receivers>
<last-state-change-time>2018-12-13T21:16:57.440936+00:00</last-state-change-time>
</mdt-subscriptions>
</mdt-oper-data>
</data>
</rpc-reply>
<kill-subscription xmlns="urn:ietf:params:xml:ns:yang:ietf-event-notifications"
xmlns:yp="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<identifier>2147483653</identifier>
</kill-subscription>
xmlns:notif-bis="urn:ietf:params:xml:ns:yang:ietf-event-notifications">notif-bis:ok</subscription-result>
</rpc-reply>
<get>
<filter>
<mdt-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-oper">
<mdt-subscriptions/>
</mdt-oper-data>
</filter>
</get>
<base>
…
</base>
<type>sub-type-dynamic</type>
<state>sub-state-valid</state>
<comments/>
<mdt-receivers>
…
</mdt-receivers>
<last-state-change-time>2018-12-13T21:16:57.440936+00:00</last-state-change-time>
</mdt-subscriptions>
</mdt-oper-data>
</data>
</rpc-reply>
Periodic Subscription
The following example shows how to configure gRPC as the transport protocol for configured subscriptions
using the CLI:
The following sample RPC shows how to create a periodic subscription using NETCONF that sends telemetry
updates to the receiver every 60 seconds:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<mdt-config-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-cfg">
<mdt-subscription>
<subscription-id>200</subscription-id>
<base>
<stream>yang-push</stream>
<encoding>encode-kvgpb</encoding>
<period>6000</period>
<xpath>/memory-ios-xe-oper:memory-statistics/memory-statistic</xpath>
</base>
<mdt-receivers>
<address>10.22.23.48</address>
<port>57555</port>
<protocol>grpc-tcp</protocol>
</mdt-receivers>
</mdt-subscription>
</mdt-config-data>
</config>
</edit-config>
</rpc>
On-Change Subscription
The following sample RPC shows how to create an on-change subscription using NETCONF that sends
updates only when there is a change in the target database:
<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<mdt-config-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-cfg">
<mdt-subscription>
<subscription-id>200</subscription-id>
<base>
<stream>yang-push</stream>
<encoding>encode-kvgpb</encoding>
<no-synch-on-start>false</no-synch-on-start>
<xpath>/cdp-ios-xe-oper:cdp-neighbor-details/cdp-neighbor-detail</xpath>
</base>
<mdt-receivers>
<address>10.22.23.48</address>
<port>57555</port>
<protocol>grpc-tcp</protocol>
</mdt-receivers>
</mdt-subscription>
</mdt-config-data>
</config>
</edit-config>
</rpc>
The following sample RPC shows how to create an on-change subscription using RESTCONF:
URI:
https://10.85.116.28:443/restconf/data/Cisco-IOS-XE-mdt-cfg:mdt-config-data
Headers:
application/yang-data.collection+json, application/yang-data+json,
application/yang-data.errors+json
Content-Type:
application/yang-data+json
BODY:
{
"mdt-config-data": {
"mdt-subscription":[
{
"subscription-id": "102",
"base": {
"stream": "yang-push",
"encoding": "encode-kvgpb",
"dampening period": "0",
"xpath": "/cdp-ios-xe-oper:cdp-neighbor-details/cdp
-neighbor-detail "
}
"mdt-receivers": {
"address": "10.22.23.48"
"port": "57555"
}
}
]
}
}
subscribe: <
prefix: <>
subscription: <
path: <
origin: "openconfig"
elem: <name: "routing-policy">
>
mode: SAMPLE
sample_interval: 10000000000
>
mode: STREAM
encoding: JSON_IETF
>'
subscribe: <
prefix: <>
subscription: <
path: <
origin: "legacy"
elem: <name: "oc-platform:components">
elem: <
name: "component"
key: <
key: "name"
value: "PowerSupply8/A"
>
>
elem: <name: "power-supply">
elem: <name: "state">
>
mode: SAMPLE
sample_interval: 10000000000
>
mode: STREAM
encoding: JSON_IETF
>'
Subscription receivers are identified by the address and port number. Receivers cannot be modified. To change
the characteristics (protocol, profile, and so on) of a receiver, it must be deleted first and a new receiver created.
If a valid receiver configuration on a valid subscription is in the disconnected state, and the management wants
to force a new attempt at setting up the connection to the receiver, it must rewrite the receiver with the exact
same characteristics.
<edit-config>
<target>
<running/>
</target>
<config>
<mdt-config-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-cfg">
<mdt-subscription operation="delete">
<subscription-id>102</subscription-id>
</mdt-subscription>
</mdt-config-data>
</config>
</edit-config>
Named Receivers
With FQDN support, a new method of configuring receivers is introduced, called the named-receiver
configuration. Named receivers are top-level configuration entities that can exist independent of subscriptions.
Named receivers are identified by a name. The name is an arbitrary string, and is the index or key of the named
receiver records in the system. The named receiver configuration contains all configurations associated with
the receiver that is not subscription-dependent.
The advantages of using named receivers are as follows:
• Capable of supporting different types of receivers.
• Better state and diagnostics information.
• Hostname can be used instead of an IP address to specify the host for protocol receivers.
• Parameters of a receiver that is used by multiple subscriptions can be changed at a single place.
Note When a valid named protocol receiver is created, it is not automatically connected to the receiver. The
named protocol receiver must be requested by at least one subscription to create a connection to the
receiver.
You can configure a named protocol receiver by using the CLI or YANG models.
The following is a sample NETCONF RPC that shows how to create a named protocol receiver:
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<mdt-config-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-cfg">
<mdt-named-protocol-rcvrs>
<mdt-named-protocol-rcvr>
<name>receiver1</name>
<protocol>tls-native</protocol>
<profile>tls-trustpoint</profile>
<host>
<hostname>rcvr.test.com</hostname>
</host>
<port>45000</port>
</mdt-named-protocol-rcvr>
</mdt-named-protocol-rcvrs>
</mdt-config-data>
</config>
</edit-config>
receiver configuration. However; named protocol receivers still use the source VRF and source address of
the subscriptions as part of the connection resolution process.
The only supported name receiver type is protocol.
Subscriptions can use either named receivers or legacy receivers, but cannot use both. If the legacy receiver
is configured, setting the subscription receiver type and a named-receiver name is blocked. Similarly, if a
subscription receiver type or a named receiver is specified, you cannot configure legacy receivers.
Note that subscriptions use only one receiver, even if more than one receiver is configured.
Subscriptions using legacy receivers and subscriptions using named receivers are permitted to use the same
connection; however, it is not recommended.
<edit-config>
<target>
<running/>
</target>
<config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
<mdt-config-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-cfg">
<mdt-subscription>
<subscription-id>1</subscription-id>
<base>
<rcvr-type>rcvr-type-protocol</rcvr-type>
</base>
<mdt-receiver-names>
<mdt-receiver-name>
<name>receiver1</name>
</mdt-receiver-name>
</mdt-receiver-names>
</mdt-subscription>
</mdt-config-data>
</config>
</edit-config>
Telemetry receivers
The following is sample output from the show telemetry receiver name command:
Name: receiver1
Profile: tls-trustpoint
State: Valid
Last State Change: 08/12/20 19:55:54
Explanation:
Type: protocol
Protocol: tls-native
Host: rcvr.test.com
Port: 45000
<get>
<filter>
<mdt-oper-v2-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-oper-v2">
<mdt-named-receivers/>
</mdt-oper-v2-data>
</filter>
</get>
The YANG value rcvr-state-invalid is used only by legacy receivers. Subscription receivers that are invalid
cannot be connected, so the subscription receiver state is set to disconnected when it is invalid. The explanation
string provides the distinction between invalid subscription receivers and disconnected subscription receivers.
A subscription receiver may be disconnected due to the following reasons:
• Another receiver on the subscription is not disconnected.
Telemetry Connections
Telemetry connections represent the transport instances used by subscriptions to reach the receivers and are
purely operational. Telemetry connections are identified by an integer index value. Other information about
the connections is specific to the type of connection, which is based on the type of receiver that the subscription
is configured to use.
For the secure Cisco proprietary transports, the host part of the configured named receiver must match the
distinguished name (DN) of the certificate provided by the receiver, when the connection is set up. For this
reason, it is not permitted to have more than one receiver using the same connection.
While all the states discussed in this section are available to all types of connections, not all have to be used.
Additional operational state associated with a connection includes the identity of the remote receiver (the
peer, when available), and the time of the last state change.
Destination IP address Named receiver host Because hosts use domain names,
domain name resolution may be
required.
Some of these parameters are based on the configuration of the subscription receiver’s parent subscription.
When resolving the connection parameters from the configuration, the VRF is determined first, followed by
the destination IP address, and finally the source IP address, if an order is not specified. If a given step in the
resolution fails non-permanently, there are infinite retries at 5 second intervals.
A connection is instantiated as soon as it is requested. That is, as soon as the first subscription receiver goes
from the resolving state to the transport requested state, a connection instance with the parameters that were
resolved by the subscription receiver is created.
If the requested connection is successfully setup and used by telemetry, the connection state changes to
connected, which means that a connection exists between the Cisco IOS XE device and the receiver device.
To reallocate the resources used by the receiver, the subscription receivers that want to use the resources are
informed that the connection is set up. These subscription receivers then transition to the connecting state to
set up the resources required to connect the subscription to the receiver. Once these resources are in place,
the subscription receiver’s state changes to connected, and update notifications are received by the receiver.
The following are some of the reasons why a telemetry connection cannot become active:
• Destination unreachable.
• No listener at the remote host port.
• Listener at the remote host port is of the wrong type.
• Authentication failures.
Note When a connection setup is in progress, any subscription receiver using this connection is in the
connecting state because it has successfully resolved the parameters needed to initiate the connection
setup.
The action taken when a connection setup fails is specific to the protocol. The following table shows the retry
behaviors for connections within a single setup request and for re-resolution requests when the connection
setup request fails. This behavior is the same for connections requested by the legacy receivers as well.
Subscription is not valid. show telemetry ietf subscription Fix the subscription configuration.
id details
Subscription receiver is not valid. show telemetry ietf subscription Fix the named receiver
id receiver configuration.
Subscription receiver’s connection show telemetry ietf subscription Verify the receiver, the network
parameters cannot be resolved. id receiver configuration, or the interface state.
Subscription receiver state appears
to never leave the resolving state.
Subscription receiver connection show telemetry ietf subscription Verify that the resolved connection
does not come up. id receiver is valid, and the receiver or
collector is reachable and able to
Subscription receiver state
accept inbound connections using
constantly changes from resolving
the specified transport.
to connecting.
Subscription receiver connections show telemetry ietf subscription Verify that the collector is of the
are rejected. id receiver correct type, and that the configured
authentication and authorization is
Subscription receiver state
valid.
constantly changes through all
states except disconnected.
Subscription receiver is connected, show telemetry internal Verify that the collector is able to
but no updates are received. subscription id stats keep up with the flow of update
notifications.
Message drop count is
incrementing, but the records sent
is not.
show telemetry internal connection: This command takes an optional connection index value. When no
index is specified, it displays the basic connection parameter information for all connections that are being
used. When a connection index is specified in the command, it shows low-level details about the connection.
The command output is transport-specific, and might not be available for all transports. The output from this
command is subject to change.
show telemetry internal diagnostics: This command attempts to dump all telemetry logs and operational
state. When reporting problems, it may be helpful to use this command as close to the problem time as possible
and provide the output of the show running-config | section telemetry command as well.
Note On Cisco Catalyst 9800-80 Wireless Controllers, use the show platform software ndbman chassis
{number | active | standby} models commands.
The Cisco-IOS-XE-mdt-capabilities-oper.YANG model also displays the models supported for on-change
subscriptions.
Subscription Monitoring
Subscriptions of all types can be monitored by using CLIs and management protocol operations.
CLI
Use the show telemetry ietf subscription command to display information about telemetry subscriptions.
The following is sample output from the command:
Device# show telemetry ietf subscription 2147483667 detail
Stream: yang-push
Encoding: encode-xml
Filter:
Filter type: xpath
XPath: /mdt-oper:mdt-oper-data/mdt-subscriptions
Update policy:
Update Trigger: periodic
Period: 1000
Notes:
NETCONF
The following is a sample NETCONF message that displays information about telemetry subscriptions:
<get>
<filter>
<mdt-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-oper">
<mdt-subscriptions/>
</mdt-oper-data>
</filter>
</get>
</base>
<type>sub-type-dynamic</type>
<state>sub-state-valid</state>
<comments/>
<mdt-receivers>
<address>5.22.22.45</address>
<port>51259</port>
<protocol>netconf</protocol>
<state>rcvr-state-connected</state>
<comments/>
<profile/>
<last-state-change-time>1970-01-01T00:00:00+00:00</last-state-change-time>
</mdt-receivers>
<last-state-change-time>1970-01-01T00:00:00+00:00</last-state-change-time>
</mdt-subscriptions>
</mdt-oper-data>
</data>
</rpc-reply>
Streams
A stream defines a set of events that can be subscribed to, and this set of events can be almost anything.
However, as per the definition of each stream, all possible events are related in some way. This section
describes the supported streams.
To view the set of streams that are supported, use management protocol operations to retrieve the streams
table from the Cisco-IOS-XE-mdt-oper module (from the YANG model Cisco-IOS-XE-mdt-oper.yang) in
the mdt-streams container.
The following example shows how to use NETCONF to retrieve supported streams:
<get>
<filter>
<mdt-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-oper">
<mdt-streams/>
</mdt-oper-data>
</filter>
</get>
The example shows that three streams are supported: native, yang-notif-native, and yang-push. The stream
native is not available for general use and can be ignored.
Note Currently there are no CLIs to return the list of supported streams.
Note The following features that are described in the corresponding drafts are not supported:
• Subtree filters
• Out-of-band notifications
• Any subscription parameter not explicitly stated as supported
# VALID!
Compound keys are supported by the use of multiple key specifications. Key names and values must be
exact; no ranges or wildcard values are supported.
• In XPath expressions, select multiple keys using [] between the keys, and encapsulate the string with “.
The following is an example of an XPath expression:
filter xpath
/environment-ios-xe-oper:environment-sensors/environment-sensor[location=\"Switch\ 1\"]
[name=\"Inlet\ Temp\ Sens\"]/current-reading
All of the XPath expressions listed below are a part of the openconfig-access-points YANG model, except
the last one, which is a part of the openconfig-ap-manager YANG model. For the telemetry operation to work
correctly, ensure that configurations are done based on the OpenConfig model.
• /access-points/access-point/radios/radio/state
• /access-points/access-point/radios/radio/neighbors/neighbor
• /access-points/access-point/radios/radio/neighbors/neighbor/state
• /access-points/access-point/ssids/ssid/bssids/bssid/state/counters
• /access-points/access-point/ssids/ssid/clients/client/state/counters
• /access-points/access-point/ssids/ssid/clients/client/client-rf/state
• /access-points/access-point/ssids/ssid/clients/client/client-connection/state
• /access-points/access-point/system/aaa/server-groups/server-group/servers/server/radius/state
• /joined-aps/joined-ap/state/opstate
When you subscribe to an XPath, you receive data for the subscribed XPath and all the XPaths under it in the
hierarchy. For example, subscribing to /access-points/access-point/radios/radio/state delivers data for all the
leaves associated with it, as well as the subcontainers under it.
If you require only a subset of information, set filters in the XPath expressions to limit the updates. To filter
the data of a specific access point (AP), use a key after the node. For example, to receive data for an AP with
Scale Information
The following tables show the minimum recommended intervals for each of the gathering points under three
different scale scenarios.
Scenario1: Full Scale with four SSIDs
APs 2,000
Clients 30,000
SSIDs per AP 4
BSSIDs per AP 8
Neighbors per AP 96
Joined 2000 30 60
AAA 2000 30 60
Radio 4000 30 60
Client RF 30,000 30 60
APs 2,000
Clients 30,000
SSIDs per AP 6
BSSIDs per AP 12
Joined 2000 30 60
AAA 2000 30 60
Radio 4000 30 60
Client RF 30,000 30 60
APs 1,000
Clients 15,000
SSIDs per AP 6
BSSIDs per AP 12
Joined 1000 NA 30
AAA 1000 NA 30
Radio 2000 NA 30
Client RF 15,000 NA 30
XPath Values and Corresponding Rates on Cisco Catalyst 9800 Wireless Controllers
In the Cisco-IOS-XE-wireless-mesh-rpc, following are the permitted values and corresponding rates for XPath
/exec-linktest-ap/data-rate-idx:
ewlc-mesh-linktest-rate-idx-1 1 Mbps
ewlc-mesh-linktest-rate-idx-2 2 Mbps
ewlc-mesh-linktest-rate-idx-3 5 Mbps
ewlc-mesh-linktest-rate-idx-4 6 Mbps
ewlc-mesh-linktest-rate-idx-5 9 Mbps
ewlc-mesh-linktest-rate-idx-6 11 Mbps
ewlc-mesh-linktest-rate-idx-7 12 Mbps
ewlc-mesh-linktest-rate-idx-8 18 Mbps
ewlc-mesh-linktest-rate-idx-9 24 Mbps
ewlc-mesh-linktest-rate-idx-10 36 Mbps
ewlc-mesh-linktest-rate-idx-11 48 Mbps
ewlc-mesh-linktest-rate-idx-12 54 Mbps
ewlc-mesh-linktest-rate-idx-13 108 Mbps
ewlc-mesh-linktest-rate-idx-14 m0
ewlc-mesh-linktest-rate-idx-15 m1
ewlc-mesh-linktest-rate-idx-16 m2
ewlc-mesh-linktest-rate-idx-17 m3
ewlc-mesh-linktest-rate-idx-18 m4
ewlc-mesh-linktest-rate-idx-19 m5
ewlc-mesh-linktest-rate-idx-20 m6
ewlc-mesh-linktest-rate-idx-21 m7
ewlc-mesh-linktest-rate-idx-22 m8
ewlc-mesh-linktest-rate-idx-23 m9
ewlc-mesh-linktest-rate-idx-24 m10
ewlc-mesh-linktest-rate-idx-25 m11
ewlc-mesh-linktest-rate-idx-26 m12
ewlc-mesh-linktest-rate-idx-27 m13
ewlc-mesh-linktest-rate-idx-28 m14
ewlc-mesh-linktest-rate-idx-295 m15
The period is time, in centiseconds (1/100 of a second), between periodic push updates. A period of 1000 will
result in getting updates to the subscribed information every 10 seconds. The minimum period that can be
configured is 100, or one second. There is no default value. This value must be explicitly set in the
<establish-subscription> RPC for dynamic subscriptions and in the configuration for configured subscriptions.
Periodic updates contain a full copy of the subscribed data element or table for all supported transport protocols.
When subscribing for empty data using a periodic subscription, empty update notifications are sent at the
requested period. If data comes into existence, its values at the next period are sent as a normal update
notification.
Note Currently, this stream is not supported over Google remote procedure call (gRPC).
Transport Protocol
The protocol that is used for the connection between a publisher and a receiver decides how the data is sent.
This protocol is referred to as the transport protocol, and is independent of the management protocol for
configured subscriptions. The transport protocol affects both the encoding of the data, for example XML,
Google Protocol Buffers (GPB) and the format of the update notification itself.
Note The stream that is chosen may also affect the format of the update notification.
NETCONF Protocol
The NETCONF protocol is available only for the transport of dynamic subscriptions, and can be used with
yang-push and yang-notif-native streams.
Three update notification formats are used when using NETCONF as the transport protocol:
• When the subscription uses the yang-push stream, and if it is periodic or when the initial synchronization
update notification is sent on an on-change subscription.
• When the subscription uses the yang-push stream and it is an on-change subscription, other than the
initial synchronization update notification.
• When the subscription uses the yang-notif-native stream.
gRPC Protocol
The gRPC protocol is available only for the transport of configured subscriptions, and can only be used with
the yang-push stream. Only kvGPB encoding is supported with gRPC transport protocol.
Receiver connection retries based on gRPC protocol (exponential back-off) are supported.
For telemetry messages defined in .proto files, see: mdt_grpc_dialout.proto and telemetry.proto.
Note The trustpoint with the client ID is not mandatory in the profile configuration, as mutual authentication
is not required for gRPC over TLS. As in prior releases, gRPC over TLS can be configured only with
server validation.
To add the client ID trustpoint, use the telemetry protocol grpc profile <name> command.
This feature cannot be disabled; but it can be left unused by not configuring the receivers to use the gRPC-TLS
protocol, or by removing or not configuring the client ID trustpoint field in the receiver configuration.
Note In the event of a device reload, subscription configurations must be synchronized to the start-up
configuration of a device. This ensures that after the device reboots, subscription configurations remain
intact on the device. When the necessary processes are up and running, the device attempts to connect
to the telemetry receiver and resume normal operations.
Pubd Restartability
In Cisco IOS XE Cupertino 17.9.1, the pubd process is restartable on all platforms. Prior to this release, pubd
was restartable only on certain platforms. On other platforms, to restart the pubd process, the whole device
had to be restarted.
Pubd can be restarted by removing and re-adding the NETCONF-YANG or gNXI configuration, as applicable.
Note that this will also restart the other NETCONF-YANG or gNXI processes.
Note Currently, you can only use the gRPC protocol for managing configured subscriptions.
SUMMARY STEPS
1. enable
2. configure terminal
3. telemetry ietf subscription id
4. stream yang-push
5. filter xpath path
6. update-policy {on-change | periodic} period
7. encoding encode-kvgpb
8. source-vrf vrf-id
9. source-address source-address
10. receiver ip address ip-address receiver-port protocol protocol profile name
11. end
DETAILED STEPS
Step 5 filter xpath path Specifies the XPath filter for the subscription.
Example:
Device(config-mdt-subs)# filter xpath
/memory-ios-xe-oper:memory-statistics/memory-statistic
Step 6 update-policy {on-change | periodic} period Configures a periodic update policy for the subscription.
Example:
Device(config-mdt-subs)# update-policy periodic
6000
Step 10 receiver ip address ip-address receiver-port protocol Configures the receiver IP address, protocol, and profile
protocol profile name for notifications.
Example:
Device(config-mdt-subs)# receiver ip address
10.28.35.45 57555 protocol grpc-tcp
SUMMARY STEPS
1. enable
2. configure terminal
3. telemetry ietf subscription id
4. stream yang-push
5. filter xpath path
6. update-policy {on-change | periodic period}
7. encoding encode-kvgpb
8. receiver ip address ip-address receiver-port protocol protocol profile name
9. end
DETAILED STEPS
Step 5 filter xpath path Specifies the XPath filter for the subscription.
Example:
Device(config-mdt-subs)# filter xpath
/iosxe-oper:ios-oper-db/hwidb-table
Step 6 update-policy {on-change | periodic period} Configures an on-change update policy for the subscription.
Example:
Device(config-mdt-subs)# update-policy on-change
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2017-05-09T21:34:51.74Z</eventTime>
<push-update xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<subscription-id>2147483650</subscription-id>
<datastore-contents-xml>
<cpu-usage
xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-process-cpu-oper"><cpu-utilization>
<five-minutes>5</five-minutes></cpu-utilization></cpu-usage>
</datastore-contents-xml>
</push-update>
</notification>
If the information element to which a subscription is made is empty, or if it is dynamic, for example, a named
access list, and does not exist, the periodic update will be empty and will have a self-closing
datastore-contents-xml tag. The following is a sample RPC message in which the periodic update is empty:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<eventTime>2017-05-09T21:34:09.74Z</eventTime>
<push-update xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
<subscription-id>2147483649</subscription-id>
<datastore-contents-xml />
</push-update>
</notification>
The following is sample output from the show telemetry ietf subscription dynamic brief command:
The following is sample output from the show telemetry ietf subscription subscription-ID detail command:
The following is sample output from the show telemetry ietf subscription all detail command:
Device# show telemetry ietf subscription all detail
The following sample RPC shows how to retrieve subscription details uisng RESTCONF:
Subscription details can also be retrieved through a RESTCONF GET request to the
Cisco-IOS-XE-mdt-oper database:
URI:
https://10.85.116.28:443/restconf/data/Cisco-IOS-XE-mdt-oper: mdt-oper-data/mdt-subscriptions
Headers:
application/yang-data.collection+json, application/yang-data+json,
application/yang-data.errors+json
Content-Type:
application/yang-data+json
Returned output:
{
"Cisco-IOS-XE-mdt-oper:mdt-subscriptions": [
{
"subscription-id": 101,
"base": {
"stream": "yang-push",
"encoding": "encode-kvgpb",
"source-vrf": "",
"no-synch-on-start": false,
"xpath": "/iosxe-oper:ios-oper-db/hwidb-table"
},
"type": "sub-type-static",
"state": "sub-state-valid",
"comments": "",
"updates-in": "0",
"updates-dampened": "0",
"updates-dropped": "0",
"mdt-receivers": [
{
"address": "5.28.35.35",
"port": 57555,
"protocol": "grpc-tcp",
"state": "rcvr-state-connecting",
"comments": "Connection retries in progress",
"profile": ""
}
]
}
]
}
SUMMARY STEPS
1. enable
2. configure terminal
3. telemetry receiver protocol receiver-name
4. protocol {cloud-native | cntp-tcp | cntp-tls profile profile-name | grpc-tcp | grpc-tls profile profile-name
| native | tls-native profile profile-name}
5. host {ip ip-address | name hostname} receiver-port
6. end
DETAILED STEPS
Step 3 telemetry receiver protocol receiver-name Configures a named protocol receiver, and enters telemetry
protocol-receiver configuration mode.
Example:
Device(config)# telemetry receiver protocol
receiver1
Step 5 host {ip ip-address | name hostname} receiver-port Configures the name protocol receiver hostname.
Example:
Device(config-mdt-protocol-receiver)# host name
rcvr.test.com 45000
SUMMARY STEPS
1. enable
2. configure terminal
3. telemetry ietf subscription id
4. receiver-type protocol }
5. receiver name name
6. end
DETAILED STEPS
Step 5 receiver name name Configures a name for the receiver for notifications.
Example:
Device(config-mdt-subs)# receiver name receiver1
Standard/RFC Title
Custom Subscription to Event Notifications https://tools.ietf.org/id/
draft-ietf-netconf-subscribed-notifications-03 draft-ietf-netconf-subscribed-notifications-03.txt
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Model-Driven Telemetry gNMI Cisco IOS XE Gibraltar 16.12.1 Telemetry updates that are sent to
Dial-In the initiator/subscriber are called
Dial-in.
This feature was implemented on
the following platforms:
• Cisco Catalyst 9200 and
9200L Series Switches
• Cisco Catalyst 9300 and
9300L Series Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 and
9500-High Performance Series
Switches
• Cisco Catalyst 9600 Series
Switches
• Cisco cBR-8 Converged
Broadband Router
Model-Driven Telemetry gRPC Cisco IOS XE Gibraltar 16.10.1 Configured subscriptions cause the
Dial-Out publisher to initiate connections to
receivers, and these connections are
considered as dial-out.
This feature was implemented on
the following platforms:
• Cisco 1000 Series Integrated
Services Routers
• Cisco 4000 Series Integrated
Services Routers
• Cisco ASR 1000 Series
Aggregation Services Routers
• Cisco ASR 900 Series
Aggregation Services Routers
• Cisco ASR 920 Series
Aggregated Services Router
• Cisco Catalyst 9200 and
9200L Series Switches
• Cisco Catalyst 9300 and
9300L Series Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 and
9500-High Performance Series
Switches
• Cisco cBR-8 Converged
Broadband Router
• Cisco Cloud Services Router
1000V Series
• Cisco Network Convergence
System 520 Series
• Cisco Network Convergence
System 4200 Series
Model-Driven Telemetry: Kill Cisco IOS XE Gibraltar 16.11.1 To delete dynamic subscriptions,
Subscription you can use the CLI and the
kill-subscription RPC.
• Cisco ASR 900 Series
Aggregation Services Routers
• Cisco ASR 920 Series
Aggregated Services Router
(RSP2)
• Cisco Catalyst 3650 Series
Switches
• Cisco Catalyst 3850 Series
Switches
• Cisco Catalyst 9200 and
9200L Series Switches
• Cisco Catalyst 9300 and
9300L Series Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 and
9500-High Performance Series
Switches
• Cisco Network Convergence
System 520 Series
• Cisco Network Convergence
System 4200 Series
TLDP On-Change Notifications Cisco IOS XE Amsterdam 17.2.1 The TLDP On-Change
Notifications feature notifies users
when TLDP sessions come up or
go down and when TLDP is
configured or disabled.
This feature was implemented on
the following platforms:
• Cisco 4000 Series Integrated
Services Routers
• Cisco Catalyst 9200 Series
Switches
• Cisco Catalyst 9300 Series
Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 Series
Switches
TLS for gRPC Dial-Out Cisco IOS XE Amsterdam 17.1.1 Transport-Layer Security is
supported for gRPC dial-out. This
feature is supported on the
following platforms:
• Cisco 1000 Series Integrated
Services Routers
• Cisco 4000 Series Integrated
Services Routers
• Cisco ASR 1000 Series
Aggregation Services Routers
• Cisco ASR 900 Series
Aggregation Services Routers
• Cisco ASR 920 Series
Aggregated Services Router
• Cisco Catalyst 9200 and
9200L Series Switches
• Cisco Catalyst 9300 and
9300L Series Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 and
9500-High Performance Series
Switches
• Cisco Catalyst 9600 Series
Switches
• Cisco Catalyst 9800-40 Series
Wireless Controller
• Cisco Catalyst 9800-80 Series
Wireless Controller
• Cisco cBR-8 Converged
Broadband Router
• Cisco Cloud Services Router
1000V Series
• Cisco Network Convergence
System 520 Series
• Cisco Network Convergence
System 4200 Series
FQDN Support for gRPC Cisco IOS XE Bengaluru 17.6.1 With the introduction of the FQDN
Subscriptions Support for gRPC Subscriptions
feature, along with IP addresses,
FQDN can also be used for gRPC
subscriptions.
• Cisco 1000 Series Integrated
Services Routers
• Cisco 4000 Series Integrated
Services Routers
• Cisco ASR 1000 Series
Aggregation Services Routers
• Cisco ASR 900 Series
Aggregation Services Routers
• Cisco ASR 920 Series
Aggregated Services Router
• Cisco Catalyst 9200 and
9200L Series Switches
• Cisco Catalyst 9300 and
9300L Series Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 and
9500-High Performance Series
Switches
• Cisco Catalyst 9600 Series
Switches
• Cisco Catalyst 9800-40 Series
Wireless Controller
• Cisco Catalyst 9800-80 Series
Wireless Controller
• Cisco cBR-8 Converged
Broadband Router
• Cisco Cloud Services Router
1000V Series
• Cisco Network Convergence
System 520 Series
• Cisco Network Convergence
System 4200 Series
Leaf-Level Filtering Cisco IOS XE Cupertino 17.7.1 The Leaf-Level Filtering for
Telemetry feature allows filtering
below the gatherpoint level for the
optimized code paths.
• Cisco Catalyst 9300 and
9300L Series Switches
• Cisco Catalyst 9400 Series
Switches
• Cisco Catalyst 9500 and
9500-High Performance Series
Switches
• Cisco Catalyst 9600 Series
Switches
Mutual Authentication for gRPC Cisco IOS XE Cupertino 17.9.1 A new gRPC TLS profile that
Telemetry contains a pair of trustpoints was
added to the telemetry
configuration, so that a client ID
certificate can be specified for
mutual authentication. This new
profile can be used instead of the
trustpoint containing the server CA
certificate when configuring the
receiver profile. The trustpoint
containing the server CA certificate
is now configured as part of the
gRPC TLS profile.
This feature is supported on the
following platforms:
• Cisco Catalyst 9800-CL Series
Wireless Controller
• Cisco Catalyst 9800-40 Series
Wireless Controller
• Cisco Catalyst 9800-80 Series
Wireless Controller
On-Change Notification Cisco IOS XE Dublin 17.10.1 The TDL URI string supports
on-change notifications.
This feature was implemented on
Cisco ASR 1000 Series
Aggregation Services Routers
Series Cloud Services Routers. Similarly, an update package built for Cisco IOS XE Fuji 16.7.1 cannot be
applied on a device that runs the Cisco IOS XE Everest 16.5.2 version.
All contents of an update package will be part of future mainline or maintenance release images. The image
and platform versions are checked by the In-Service Model Update commands during the package add and
activate. If an image or platform mismatch occurs, the package install fails.
If NETCONG-YANG is enabled during package activation, NETCONF processes are restarted. All active
NETCONF sessions are killed during package activation. Failure during a package verification terminates
the activation process.
When you deactivate an update, if more than one model update package is installed, the most recently committed
model update package becomes the model package used by the device. If there are no other previously
committed model packages, then the base version of data models included with the standard image is used.
DETAILED STEPS
Step 2 install add file tftp: filename Copies the model update package from a remote location
(via FTP, TFTP) to the device, and performs a compatibility
Example:
check for the platform and image versions.
Device# install add file
tftp://172.16.0.1//tftpboot/folder1/ • You can use other methods to copy the update package
isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin from the remote location to the device, however; you
Device# install add file still have to execute the install add command before
tftp://172.16.0.1//tftpboot/folder1/ the package is activated.
asr1000-universalk9.2017-08-23_17.48.0.CSCxxxxxxx.SSA.dmp.bin
Step 3 install activate file bootflash: filename Validates whether the update package is added through the
install add command, and restarts the NETCONF processes.
Example:
Device# install activate file bootflash: • Perform the install add operation prior to activating
isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin an update package.
Device# install activate file bootflash:
asr1000-universalk9.2017-08-23_17.48.0.CSCxxxxxxx.SSA.dmp.bin
Step 5 install deactivate file bootflash: filename Deactivates the specified update package, and restarts the
NETCONF processes.
Example:
Step 7 install rollback to {base | committed | id commit-ID} Rollbacks the update to the base version, the last committed
version, or a known commit ID, and restarts NETCONF
Example:
processes.
Device# install rollback to base
• Valid values for the commit-id argument are from 1
to 4294967295.
• Older versions of data models updates are available
for use.
Step 8 install remove {file bootflash: filename | inactive} Removes the specified update package from the bootflash.
Example: • A package must be deactivated before it is removed.
Device# install remove file bootflash:
isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Device# install remove file bootflash:
asr1000-universalk9.2017-08-23_17.48.0.CSCxxxxxxx.SSA.dmp.bin
Step 9 show install summary Displays information about the active package.
Example: • The output of this command varies according to the
Device# show install summary install commands that are configured.
The sample image used in the following examples are a Cisco ASR1000 Series Aggregated Services
Router image.
The following example shows how to add a model update package file:
Device# install add file tftp://172.16.0.1//tftpboot/folder1/
asr1000-universalk9.2017-08-23_17.48.0.CSCxxxxxxx.SSA.dmp.bin
The following is sample output from the show install summary command after adding an update
package file to the device:
Device# show install summary
Active Packages:
No packages
Inactive Packages:
bootflash: isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Committed Packages:
No packages
Uncommitted Packages:
No packages
Device#
The following example shows how to activate an added update package file:
Device# install activate file bootflash:
isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
The following sample output from the show install summary command displays the status of the
model package as active and uncommitted:
Device# show install summary
Active Packages:
bootflash:isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Inactive Packages:
No packages
Committed Packages:
No packages
Uncommitted Packages:
bootflash:isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Device#
The following example shows how to execute the install commit command:
Device# install commit
install_commit: START Sun Feb 26 06:46:48 UTC 2017
SUCCESS: install_commit Sun Feb 26 06:46:52 UTC 2017
Device#
The following sample output from the show install summary command displays that the update
package is now committed, and that it will be persistent across reloads:
Device# show install summary
Active Packages:
bootflash:isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Inactive Packages:
No packages
Committed Packages:
bootflash:isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Uncommitted Packages:
No packages
Device#
The following example shows how to rollback an update package to the base package:
Device# install rollback to base
The following is sample output from the show install package command:
Device# show install package bootflash:
isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Name: isr4300-universalk9.16.05.01.CSCxxxxxxx.dmp.bin
Version: 16.5.1.0.199.1484082952..Everest
Platform: ISR4300
Package Type: dmp
Defect ID: CSCxxxxxxx
Package State: Added
Supersedes List: {}
Smu ID: 1
Device#
The following sample NETCONF hello message verifies the new data model package version:
The following is sample output from the show install log command:
Device# show install log
The sample image used in the following examples are a Cisco Catalyst 3000 Series Switch image.
The following example shows how to add a model update package file:
The following sample output from the show install summary command displays that the update
package is now committed, and that it will be persistent across reloads:
Device# show install summary
Active Packages:
bootflash:cat3k_caa-universalk9.16.06.01.CSCxxxxxxx.dmp.bin
Inactive Packages:
No packages
Committed Packages:
bootflash:cat3k_caa-universalk9.16.06.01.CSCxxxxxxx.dmp.bin
Uncommitted Packages:
No packages
Device#
In-Service Model Update Cisco IOS XE Everest This module describes how to update YANG
16.5.1a data models through In-Service Model Update.
Cisco IOS XE Everest In Cisco IOS XE Everest 16.5.1a, this feature
16.5.1b was implemented on the following platforms:
• Cisco Catalyst 9300 Series Switches
• Cisco Catalyst 9500 Series Switches
Cisco IOS XE Everest 16.6.1 In Cisco IOS XE Everest 16.5.1b, this feature
was implemented on the following platforms:
• Cisco Catalyst 3650 Series Switches
• Cisco Catalyst 3850 Series Switches
Cisco IOS XE Fuji 16.7.x In Cisco IOS XE Fuji 16.7.x, this feature was
implemented on the following platform:
• Cisco 1000 Series Aggregated Services
Routers
Cisco IOS XE Fuji 16.8.1a In Cisco IOS XE Fuji 16.8.1a, this feature was
implemented on Cisco Catalyst 9500-High
Performance Series Switches
This module describes the Application Hosting feature and how to enable it.
• Restrictions for Application Hosting, on page 353
• Information About Application Hosting, on page 354
• How to Configure Application Hosting, on page 365
• Verifying the Application-Hosting Configuration, on page 381
• Configuration Examples for Application Hosting, on page 384
• Additional References, on page 388
• Feature Information for Application Hosting, on page 389
Configure the enable command on the AppGigabitEthernet interfaces to enable application hosting on
Cisco Catalyst 9410R Switches.
The application-hosting container that is referred to as the virtualization environment is provided to run a
guest application on the host operating system. The Cisco IOS-XE virtualization services provide manageability
and networking models for running a guest application. The virtualization infrastructure allows an administrator
to define a logical interface that specifies the connectivity between the host and the guest. Cisco IOx maps
the logical interface into a Virtual Network Interface Card (vNIC) that the guest application uses.
Applications that are to be deployed in the containers are packaged as TAR files. The configuration that is
specific to these applications is also packaged as part of the TAR files.
The management interface on the device connects the application-hosting network to the Cisco IOS management
interface. The Layer 3 interface of the guest application receives the Layer 2-bridged traffic from the Cisco
IOS management interface. The management interface connects to the container interface through the
management bridge. The IP address of the application must be on the same subnet as the management interface
IP address.
Note On all Cisco Catalyst stack and stackwise virtual models (all software versions), Guest Shell and the
AppGigabitEthernet interface operate only on the active switch in the stack. Therefore, the
AppGigabitEthernet interface configuration must be applied to the AppGigabitEthernet interface on all
the switches in the stack. If the configuration is not applied to all the switches, the AppGigabitEthernet
interface on the switch will not work after a switchover.
Cisco Catalyst 9000 Series Switches support multiple applications when hosted on the SSD. The applications
must meet the following criteria:
• Cisco-signed
• Meet the switching infrastructure requirements:
• Network configuration on AppGigabitEthernet ports does not create a conflict between the
applications.
• Enough resources are available to run the applications.
Multiple applications cannot be deployed if an application consumes all the available App-hosting resources.
For example, if one application consumes all the compute and run time resources, other applications are
prevented from getting installed on the device.
For application hosting, you can configure the front-panel port as either a trunk interface or a VLAN-specific
interface. When using as a trunk interface, the front-panel port is extended to work as a Layer 2 trunk port,
and all the traffic received by the port is available to the application. When using the port as a VLAN interface,
the application is connected to a specific VLAN network.
Note When using a back-panel USB or an M2 SATA drive for application hosting, the storage medium should
be formatted as an ext4 file system.
Note Any configuration done under the app-vnic command can be rejected during activation.
Table 43: Sample Configuration Scenarios for App Hosting in Access and Trunk Modes
Scenario Supported/Unsupported
Scenario Supported/Unsupported
Single application with two front-panel ports in trunk Not a valid configuration.
and access modes with an overlapping VLAN.
VLAN overlapping with both ports.
Single application in access mode and two front-panel Not a valid configuration.
ports configured on the same VLAN.
Single application in trunk mode and two front-panel Not a valid configuration.
ports configured on an overlapping VLAN range.
The traffic is not isolated, and the VLAN range is
overlapping.
Single application in trunk mode and two front-panel Not a valid configuration.
ports configured on an overlapping VLAN range.
This configuration will be rejected during activation.
Both the front-panel ports are in trunk mode, so any
VLAN can be used. However, the same VLAN is
configured for both the ports, and as a result, the
VLAN overlaps with both the ports.
Note The same scenario applies for access mode.
Single application in trunk and access modes, and Not a valid configuration.
front-panel ports with an overlapping VLAN.
The same VLAN is configured in trunk mode and
access mode. Because of the configuration, the VLAN
overlaps with both ports.
Two applications, one in trunk mode and the other in Not a valid configuration.
access mode.
Overlapping VLAN.
When Cisco Catalyst 9300X Series Switches and Cisco Catalyst 9300 Series Switches are stacked, one of the
two front-panel ports on Cisco Catalyst 9300X Series Switches are dynamically disabled. Only the
AppGigabitEthernet 1/0/1 interface is displayed as enabled.
This section describes some of the high availability scenarios:
Note The enable command is available only on Cisco Catalyst 9410 Series Switches.
When using slot 4 of the 48-port linecard for application hosting, the port must be in the default shutdown
mode. If slot 4 of the 48-port linecard is active, application hosting is rejected. If the linecard port is disabled,
slot 4 of the 48-port linecard is marked as inactive.
If slot 4 of the 48-port linecard is populated, the port 4/0/48 will not come up. If linecard 4 is empty or if it is
a 24-port linecard, no ports are disabled.
To enable the port (4/0/48), disable application hosting by using the no iox command. No system messages
are displayed on the console when the port is enabled or disabled.
During an In-Service Software Upgrade (ISSU), the linecard port is not automatically disabled, because the
AppGigabitEthernet interface has to be enabled. Before a software downgrade, the AppGigabitEthernet
interface must be disabled to disable the front-panel port.
The linecard on slot 4 is a 48-port linecard, and the Port 48 on slot 4 is disabled. After the port is disabled,
AppGigabitEthernet interface is enabled. no configuration is applied to the port. Port 48 is
marked as inactive.
During OIR, the standby Supervisor becomes the new No state change will happen to port 48 on slot 4. The
active, and the front-panel port on the new active is standby Supervisor OIR has no effect on the active
used for app hosting. Supervisor front-panel port.
• If the link is up on either the active or standby chassis on port 48 linecard 4, then the enable command
is rejected.
• If port 48 on linecard 4 is used as a dual-active detection (DAD) link, remove the DAD link, and configure
it on another port.
• If port 48 on linecard 4 is used as a StackWise Virtual link, and the front-panel port must be enabled,
remove the StackWise Virtual link on port 48 and use another port as the StackWise Virtual link. Port
48 on linecard 4 cannot be used as a StackWise Virtual or DAD link.
Use Cases
This section describes a couple of use cases during autotransfer and auto-install of applications.
Table 45: Use Cases for the AutoTransfer and Auto-Install of Applications
SSD is plugged in while IOx is running on flash. If the SSD is plugged in while IOx is already running,
there is no impact to the running applications or to
IOx. IOx is migrated to the SSD only when IOx is
restarted by disabling and then enabling IOx through
the CLI, or due to a system restart.
System reboots, while IOx data is being copied to the While IOx data is getting migrated from one media
new media. to another, and the system reboots, the migration
process will continue, when the system restarts. The
data from the old media is deleted only when the copy
operation is complete.
Scenario Single Media in the Active Device Media in the Active and Standby
Devices
System bootup Starts IOx and the application at Starts IOx and the application on
system bootup. The USB SSD is system bootup. Does a bulk
visible immediately because it is a synchronization of the existing
local device. No synchronization information to the standby device.
happens at this time.
Scenario Single Media in the Active Device Media in the Active and Standby
Devices
Switchover Media is not found on the new Starts IOx and the application in
active device. IOx starts on the the previous state on the new active
system flash with no previously device after the system switchover
installed applications and with (SSO). Does a bulk synchronization
minimum capabilities. of the information to the new
standby device after it boots up.
Bootup or switchover: USB SSD No synchronization of the SSD No synchronization of the SSD
is present on a member device. present in member devices. The present in member devices. The
member SSD is not used to host member SSD is not used to host
IOx and applications. IOx and applications.
Device removal: Local USB SSD When the local USB SSD is IOx takes care of the graceful exit.
is removed from the active device. removed, IOx takes care of the Since IOx operates only on the
graceful exit. local disk, the standby SSD is not
used to start IOx.
User-triggered IOx restart is
required once SSD is plugged back User-triggered IOx restart is
in the active device. required once SSD is plugged back
in the active device.
Device removal: Remote USB SSD IOx does not use any member SSD, IOx does not use any member SSD,
is removed from a remote member and hence, there is no impact. and hence, there is no impact.
device.
Device going down: The active Media is not found on the new Starts IOx and applications in the
device on which IOx is running active device. IOx starts up on the state before the SSO on the new
goes down. system flash with no previously active device. Does a bulk
installed applications and with synchronization of the information
minimum capabilities. to the new standby device once it
boots up.
Designated active-standby device The change is reflected after the The change is reflected after the
change (stack environment 1:1) reboot. IOx starts from the new reboot. IOx starts from the new
active device after the reboot. active device after the reboot.
IOx uses a Cisco-certified USB3.0 flash drive in the back-panel USB port as storage for application hosting.
This media may not be present in all the stack members.
Data is synced using the rsync utility from the active to the standby device.
Front-panel port (trunk and VLAN) • Catalyst 9300 Series Switches and C9300L in
Cisco IOS XE Gibraltar 16.12.1
• Catalyst 9400 Series Switches in Cisco IOS XE
Amsterdam 17.1.1
• Catalyst 9500- High Performance Series
Switches in Cisco IOS XE Amsterdam 17.5.1
• Catalyst 9600 Series Switches in Cisco IOS XE
Amsterdam 17.5.1
• Catalyst 9300X Series Switches in Cisco IOS
XE Bengaluru 17.6.1
Note Catalyst 9300X Series Switches
support multiple AppGigabitEthernet
ports.
Cisco IOS Network Address Translation (NAT) • Catalyst 9300 Series Switches and C9300L in
Cisco IOS XE Gibraltar 16.12.1
• Catalyst 9400 Series Switches in Cisco IOS XE
Amsterdam 17.1.1
Note The IOx process must be running before the IOx virtual application can be hosted on a Cisco device.
SUMMARY STEPS
1. enable
2. configure terminal
3. iox
4. username name privilege level password {0 | 7 | user-password}encrypted-password
5. end
DETAILED STEPS
Step 4 username name privilege level password {0 | 7 | Establishes a username-based authentication system and
user-password}encrypted-password privilege level for the user.
Example: • The username privilege level must be configured as
Device(config)# username cisco privilege 15 15.
password 0 ciscoI
Note This task is applicable to Cisco IOS XE Amsterdam 17.1.1 and later releases.
In application-hosting trunk-configuration mode, all the allowed AppGigabitEthernet VLAN ports are connected
to a container. Native and VLAN-tagged frames are transmitted and received by the container guest interface.
Only one container guest interface can be mapped to the AppGigabitEthernet trunk port.
Concurrent configuration of both trunk and vlan-access ports are supported.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface AppGigabitEthernet number
4. switchport trunk allowed vlan vlan-ID
5. switchport mode trunk
6. exit
7. app-hosting appid name
8. app-vnic AppGigabitEthernet trunk
9. vlan vlan-ID guest-interface guest-interface-number
10. guest-ipaddress ip-address netmask netmask
11. end
DETAILED STEPS
Step 3 interface AppGigabitEthernet number Configures the AppGigabitEthernet and enters interface
configuration mode.
Example:
Device(config)# interface AppGigabitEthernet 1/0/1 • For stackable switches, the number argument is
switch-number/0/1.
Step 4 switchport trunk allowed vlan vlan-ID Configures the list of VLANs allowed on the trunk.
Example:
Device(config-if)# switchport trunk allowed vlan
10-12,20
Step 5 switchport mode trunk Sets the interface into permanent trunking mode and
negotiates to convert the neighboring link into a trunk link.
Example:
Device(config-if)# switchport mode trunk
Step 9 vlan vlan-ID guest-interface guest-interface-number Configures a VLAN guest interface and enters
application-hosting VLAN-access IP configuration mode.
Example:
Device(config-config-app-hosting-trunk)# vlan 10 • Multiple VLAN-to-guest interface mapping is
guest-interface 2 supported.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface AppGigabitEthernet number
4. switchport trunk allowed vlan vlan-ID
5. switchport mode trunk
6. exit
7. app-hosting appid name
8. app-vnic AppGigabitEthernet trunk
9. guest-interface guest-interface-number
10. end
DETAILED STEPS
Step 3 interface AppGigabitEthernet number Configures the AppGigabitEthernet and enters interface
configuration mode.
Example:
Device(config)# interface AppGigabitEthernet 1/0/1 • For stackable switches, the number argument is
switch-number/0/1.
Step 4 switchport trunk allowed vlan vlan-ID Configures the list of VLANs allowed on the trunk.
Example:
Device(config-if)# switchport trunk allowed vlan
10-12,20
Step 5 switchport mode trunk Sets the interface into permanent trunking mode and
negotiates to convert the neighboring link into a trunk link.
Example:
Device(config-if)# switchport mode trunk
Step 8 app-vnic AppGigabitEthernet trunk Configures a trunk port as the front-panel port for an
application, and enters application-hosting
Example:
trunk-configuration mode.
Device(config-app-hosting)# app-vnic
AppGigabitEthernet trunk
Note If the start command is configured before an application is installed, and then the install command is
configured, Cisco IOx automatically performs internal activate and start actions. This allows the
application to be automatically started by configuring the install command.
SUMMARY STEPS
1. enable
2. configure terminal
3. app-hosting appid application-name
4. start
5. end
DETAILED STEPS
Lifecycle of an Application
The following EXEC commands take you through an application's lifecycle.
Note If any configuration changes are made after an application is installed, the application in the running
state will not reflect these changes. The application must be explicitly stopped and deactivated, and then
activated and started again for the configuration changes to take effect.
SUMMARY STEPS
1. enable
2. app-hosting install appid application-name package package-path
3. app-hosting activate appid application-name
4. app-hosting start appid application-name
5. app-hosting stop appid application-name
6. app-hosting deactivate appid application-name
7. app-hosting uninstall appid application-name
DETAILED STEPS
Step 2 app-hosting install appid application-name package Installs an application from the specified location.
package-path
• An application can be installed from a local storage
Example: location such as, flash, bootflash, usbflash0, usbflash1,
Device# app-hosting install appid iox_app package and harddisk.
usbflash1:my_iox_app.tar
SUMMARY STEPS
1. enable
2. configure terminal
3. app-hosting appid application-name
4. app-resource docker
5. run-opts options
6. end
DETAILED STEPS
You can configure the IP address of a container through Cisco IOS CLIs.
SUMMARY STEPS
1. enable
2. configure terminal
3. app-hosting appid name
4. name-server# ip-address
5. app-vnic management guest-interface interface-number
6. guest-ipaddress ip-address netmask netmask
7. exit
8. app-default-gateway ip-address guest-interface network-interface
9. end
DETAILED STEPS
Step 5 app-vnic management guest-interface interface-number Configures the management gateway of the virtual network
interface and guest interface, and enters application-hosting
Example:
management-gateway configuration mode.
Device(config-app-hosting)# app-vnic management
guest-interface 0
Step 6 guest-ipaddress ip-address netmask netmask Configures the management guest interface details.
Example:
Device(config-app-hosting-mgmt-gateway)#
guest-ipaddress 172.19.0.24
netmask 255.255.255.0
DETAILED STEPS
Step 4 vrf forwarding vrf-name Associates a Virtual Routing and Forwarding (VRF)
instance or a virtual network with an interface or
Example:
subinterface.
Device(config-if)# vrf forwarding Mgmt-vrf
• Mgmt-vrf is automatically set for the management
interface on the Cisco Catalyst 9000 Series Switch.
Step 8 app-vnic management guest-interface network-interface Connects the guest interface to the management port, and
enters application-hosting management-gateway
Example:
configuration mode.
Device(config-app-hosting)# app-vnic management
guest-interface 1 • The management keyword specifies the Cisco IOS
management GigabitEthernet0/0 interface that is
connected to the container.
• The guest-interface network-interface
keyword-argument pair specifies the container's
internal Ethernet interface number that is connected
to the Cisco IOS management interface. The example
2. Based on the application's Linux support, use the standard Linux interface configuration commands:
- ifconfig dev IFADDR/subnet-mask-length
Or
- ip address {add|change|replace} IFADDR dev IFNAME [ LIFETIME ] [ CONFFLAG-LIST ]
• Enable the Dynamic Host Configuration Protocol (DHCP) in the container, and configure the DHCP
server and relay agent in the Cisco IOS configuration.
• Cisco IOx provides a DHCP client to run within the application container that is used for an
application DHCP interface.
SUMMARY STEPS
1. enable
2. configure terminal
3. app-hosting appid name
4. app-resource profile name
5. cpu unit
6. memory memory
7. vcpu number
8. end
DETAILED STEPS
Step 3 app-hosting appid name Enables application hosting and enters application-hosting
configuration mode.
Example:
Device(config)# app-hosting appid iox_app
Step 4 app-resource profile name Configures the custom application resource profile, and
enters custom application resource profile configuration
Example:
mode.
Device(config-app-hosting)# app-resource profile
custom • Only the custom profile name is supported.
Step 5 cpu unit Changes the default CPU allocation for the application.
Example: • Resource values are application specific, and any
Device(config-app-resource-profile-custom)# cpu adjustment to these values must ensure that the
7400 application can run reliably with the changes.
Step 7 vcpu number Changes the virtual CPU (vCPU) allocation for the
application.
Example:
Device(config-app-resource-profile-custom)# vcpu
2
Note The IOx process must be running before the IOx virtual application can be hosted on a Cisco device.
SUMMARY STEPS
1. enable
2. configure terminal
3. monitor session span-session-number type erspan-source
4. source interface interface-type interface-id
5. no shutdown
6. ip address ip-address
7. origin ip address ip-address
8. erspan-id erspan-flow-id
9. end
DETAILED STEPS
Step 3 monitor session span-session-number type erspan-source Defines an ERSPAN source session using the session ID
and the session type, and enters ERSPAN monitor source
Example:
session configuration mode.
Device(config)# monitor session 2 type
erspan-source
Step 4 source interface interface-type interface-id Configures the source interface, and the traffic direction to
be monitored.
Example:
Device(config-mon-erspan-src)# source interface
gigabitethernet 1/0/3
Step 6 ip address ip-address Configures the IP address that is used as the destination of
the ERSPAN traffic.
Example:
Step 7 origin ip address ip-address Configures the IP address used as the source of the
ERSPAN traffic.
Example:
Device(config-mon-erspan-src-dst)# origin ip
address 10.1.1.2
Step 8 erspan-id erspan-flow-id Configures the ID used by source and destination sessions
to identify the ERSPAN traffic, which must also be entered
Example:
in the ERSPAN destination session configuration.
Device(config-mon-erspan-src-dst)# erspan-id 5
You can either use a Layer 2 port or a Layer 3 port from ERSPAN traffic. Use the no switchport mode
command to change the port from a Layer 2 interface to a Layer 3 interface.
SUMMARY STEPS
1. enable
2. configure terminal
3. vtp mode off
4. vlan {vlan-ID | vlan-range}
5. exit
6. interface vlan vlan-ID
7. ip address ip-address mask
8. no shutdown
9. exit
10. interface AppGigabitEthernet number
11. (Optional) no switchport mode
12. (Optional) ip address ip-address mask
13. (Optional) switchport mode trunk
14. end
DETAILED STEPS
Step 3 vtp mode off Sets the VTP-device mode to off for VLANs.
Example:
Device(config)#vtp mode off
Step 4 vlan {vlan-ID | vlan-range} Adds a VLAN and enters config-VLAN configuration
mode.
Example:
Device(config)# vlan 2508
Step 6 interface vlan vlan-ID Creates a dynamic Switch Virtual Interface (SVI) and
enters the interface configuration mode.
Example:
Device(config)# interface vlan 2508
Step 10 interface AppGigabitEthernet number Configures the AppGigabitEthernet and enters interface
configuration mode.
Example:
Device(config)# interface AppGigabitEthernet 1/1 • For stackable switches, the number argument is
switch-number/0/1.
Step 11 (Optional) no switchport mode Changes the port from a Layer 2 interface to a Layer 3
interface.
Example:
Step 12 (Optional) ip address ip-address mask Configures an IP address for a Layer 3 port.
Example:
Device(config-if)# 10.1.1.2 255.255.255.0
Step 13 (Optional) switchport mode trunk Sets the interface into permanent trunking mode and
negotiates to convert the neighboring link into a trunk link
Example:
for a Layer 2 port.
Device(config-if)# switchport mode trunk
SUMMARY STEPS
1. enable
2. show iox-service
3. show app-hosting detail
4. show app-hosting device
5. show app-hosting list
6. show interfaces trunk
7. show controller ethernet-controller AppGigabitEthernet interface-number
DETAILED STEPS
Step 1 enable
Enables privileged EXEC mode.
• Enter your password if prompted.
Example:
Device> enable
---------------------------
IOx service (CAF) : Not Running
IOx service (HA) : Not Running
IOx service (IOxman) : Not Running
IOx service (Sec storage) : Not Running
Libvirtd : Running
Dockerd : Not Running
Application DB Sync Info : Not available
State : Running
Author : Cisco Systems, Inc
Application
Type : vm
App id : Wireshark
Name : Wireshark
Version : 3.4
Activated Profile Name : custom
Description : Ubuntu based Wireshark
Resource Reservation
Memory : 1900 MB
Disk : 10 MB
CPU : 4000 units
VCPU : 2
Attached devices
Type Name Alias
––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––--
Serial/shell
Serial/aux
Serial/Syslog serial2
Serial/Trace serial3
Network Interfaces
–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
eth0:
MAC address : 52:54:dd:80:bd:59
IPv4 address
eth1:
MAC address : 52:54:dd:c7:7c:aa
IPv4 address
App id State
–––––––––––––––––––––––––––––––––––––––--
Wireshark Running
Building configuration...
Device> enable
Device# configure terminal
Device(config)# iox
Device(config)# username cisco privilege 15 password 0 ciscoI
Device(config)# end
Note This section is applicable to Cisco IOS XE Amsterdam 17.1.1 and later releases.
This example shows how to configure application hosting on front-panel VLAN ports.
Device# configure terminal
Device(config)# interface AppGigabitEthernet 1/0/1
Device(config-if)# switchport trunk allowed vlan 10-12,20
Device(config-if)# switchport mode trunk
Device(config-if)# exit
Device(config)# app-hosting appid iox_app
Device(config-app-hosting)# app-vnic AppGigabitEthernet trunk
Device(config-config-app-hosting-trunk)# vlan 10 guest-interface 2
Device(config-config-app-hosting-vlan-access-ip)# guest-ipaddress 192.168.0.1
netmask 255.255.255.0
Device(config-config-app-hosting-vlan access-ip)# end
Installing package 'disk0:iperf3.tar' for 'iperf3'. Use 'show app-hosting list' for progress.
App id State
---------------------------------------------------------
iperf3 DEPLOYED
Device#
This example shows how to manually configure the IP address for an application.
Device# configure terminal
Device(config)# interface gigabitethernet 0/0
Device(config-if)# vrf forwarding Mgmt-vrf
Device(config-if)# ip address 198.51.100.1 255.255.255.254
Device(config-if)# exit
Device(config)# app-hosting appid iox_app
Device(config-app-hosting)# app-vnic management guest-interface 1
Device(config-app-hosting-mgmt-gateway)# end
The following example shows a Layer 2 port used for ERSPAN traffic:
Device> enable
Device# configure terminal
Device(config)# vtp mode off
Device(config)# vlan 2508
Device(config-vlan)# exit
Device(config)# interface vlan 2508
Device(config-if)# ip address 192.0.2.1 255.255.255.252
Device(config-if)# no shutdown
Device(config-if)# exit
Device(config)# interface AppGigabitEthernet 1/1
Device(config-if)# switchport mode trunk
Device(config-if)# end
Additional References
Related Documents
USB3.0 SSD on Cisco Catalyst 9300 Series Switches Configuring USB 3.0 SSD
USB3.0 SSD on Cisco Catalyst 9500 Series Switches Configuring USB 3.0 SSD
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Application Hosting: Cisco IOS XE Bengaluru When IOx is restarted and a different media
Autotransfer and Auto-Install 17.6.1 is selected, all applications must be migrated
of Apps from Internal Flash to the new media, and containers must be
to SSD restored to the same state as before the change.
In Cisco IOS XE Bengaluru 17.6.1, this
feature was introduced on the following
platforms:
• Cisco Catalyst 9300 and 9300L Series
Switches
• Cisco Catalyst 9400 Series Switches
Application Hosting: Cisco IOS XE Gibraltar Introduces datapath connectivity between the
Front-Panel Network Port 16.12.1 Application Hosting container and the
Access front-panel network ports. Also enables ZTP
Cisco IOS XE Amsterdam
functionality on the front-panel network.
17.1.1
• In Cisco IOS XE Gibraltar 16.12.1, this
feature was implemented on Cisco
Catalyst 9300 Series Switches.
• In Cisco IOS XE Amsterdam 17.1.1, this
feature was implemented on Cisco
Catalyst 9400 Series Switches.
Application Hosting: Cisco IOS XE Gibraltar Introduces datapath connectivity between the
Front-Panel USB Port Access 16.12.1 Application Hosting container and the
front-panel USB port.
Cisco IOS XE Amsterdam
17.1.1 • In Cisco IOS XE Gibraltar 16.12.1, this
feature was implemented on Cisco
Catalyst 9300 Series Switches.
• In Cisco IOS XE Amsterdam 17.1.1, this
feature was implemented on Cisco
Catalyst 9400 Series Switches.
ERSPAN Support on the Cisco IOS XE Dublin 17.10.1 ERSPAN support on the AppGigabitEthernet
AppGigabitEthernet Port port enables the mirroring of data traffic from
the device to an application that runs on the
AppGigabitEthernet port by using IOx.
Native Docker Container: Cisco IOS XE Amsterdam The Application Auto-Restart feature helps
Application Auto-Restart 17.2.1 applications deployed on platforms to retain
the last configured operational state in the
Cisco IOS XE Bengaluru
event of a system switchover or restart. This
17.5.1
feature is enabled by default, and cannot be
disabled by users.
• In Cisco IOS XE Amsterdam 17.2.1, this
feature was implemented on Cisco
Catalyst 9300 Series Switches.
• In Cisco IOS XE Bengaluru 17.5.1, this
feature was implemented on Cisco
Catalyst 9410 Series Switches.
ThousandEyes Enterprise Agent Version 4.0 available in Cisco IOS XE Bengaluru 17.6.1, supports the
following additional features that are not available in the ThousandEyes Agent Version 3.0:
• BrowserBot support when back-panel SSD is available.
• DNAC app icon and description.
• Docker health monitoring.
• The app-hosting upgrade URL command to upgrade the ThousandEyes Enterprise Agent.
In Cisco IOS XE Bengaluru 17.6.1, add-on mode is supported on Cisco Catalyst 9300, 9300L, and 9300X
Series Switches, and Cisco Catalyst 9400 Series Switches.
BrownField GreenField
• Download the file • Available in the bootflash under the /apps folder.
https://downloads.thousandeyes.com/ Shipped with the device.
enterprise-agent/
thousandeyes-enterprise-agent-3.0.cat9k.tar. The • Use the install command to download and deploy
file is signed by the same certificate authority the application.
(CA) that is used by www.cisco.com for HTTPS
downloads; without an username or a password.
• Use the install command to download and
deploy the application.
This section describes the maximum resources required for the agent to run:
• CPU: 2 vCPUs
• Memory: 2G
• Storage: 1G for persistent logging by applications, out of the 4G partition in the flash file system. This
storage is shared by the IOx metadata.
• Media storage:
• 120G SSD for Cisco Catalyst 9300 and Cat9300 L Series Switches in Cisco IOS XE Amsterdam
17.3.3.
• 240/480/960GB M2-SATA-HDD for Cisco Catalyst 9400 Series Switches in Cisco IOS XE Bengaluru
17.5.1.
After the download of the Enterprise Agent, it initiates a call to create a secure channel to the ThousandEyes
cloud-based portal that provides the required application configuration, and gathers application data. The link
to the TE portal is https://app.thousandeyes.com.
ThousandEyes BrowserBot
ThousandEyes Enterprise Agent Version 4.0 provides a BrowserBot for transaction scripting test. The
BrowserBot is a component of the Enterprise Agent that manages page load and transaction tests. The
BrowserBot allows you to enable customized JavaScript tests which mimic the actions of your web browser
on the ThousandEyes Cloud Portal. To protect the host operating system from any errant JavaScript operations,
the ThousandEyes agent creates sandbox containers to run your JavaScript.
If an unrestricted disk is used by the application, the ThousandEyes agent will dynamically install the
BrowserBot package during initialization that permits portal transaction scripting tests to be configured.
Note The BrowserBot support is not available in ThousandEyes Agent Version 3.0.
BrowserBot consumes a large amount of hardware resources. 2GB system memory and 2 VCPU loads are
the maximum IOx system memory and CPU load allocated for all IOx apps. To allow multiple apps to
concurrently run in the bootflash, lower the default package.yaml BrowserBot resources before activating the
agent. Use the app-resource profile custom command to override the default package.yaml settings:
• CPU:1850 CPU units (1/4 VCPU)
• Memory: 500MB
DETAILED STEPS
Step 4 app-vnic AppGigabitEthernet trunk Configures a trunk port as the front-panel port for an
application, and enters application-hosting
Example:
trunk-configuration mode.
Device(config-app-hosting)# app-vnic
AppGigabitEthernet trunk
Step 5 vlan vlan-ID guest-interface guest-interface-number Configures a VLAN guest interface and enters
application-hosting VLAN-access IP configuration mode.
Example:
Device(config-config-app-hosting-trunk)# vlan 10
guest-interface 2
Step 13 prepend-pkg-opts Merges the package options with the Docker runtime
options.
Example:
Device(config-app-hosting-docker)# • Any duplicate variable is overwritten.
prepend-pkg-opts
DETAILED STEPS
Step 3 interface appgigabitethernet number Configures the AppGigabitEthernet and enters interface
configuration mode.
Example:
Device(config)# interface AppGigabitEthernet 1/0/1 • For stackable switches, the number argument is
switch-number/0/1.
Step 4 switchport trunk allowed vlan vlan-ID Configures the list of VLANs allowed on the trunk.
Example:
Device(config-if)# switchport trunk allowed vlan
10-12,20
Step 5 switchport mode trunk Sets the interface into permanent trunking mode and
negotiates to convert the neighboring link into a trunk link.
Example:
Device(config-if)# switchport mode trunk
SUMMARY STEPS
1. enable
2. app-hosting install appid application-name package package-path
3. app-hosting start appid application-name
4. end
DETAILED STEPS
Step 2 app-hosting install appid application-name package Installs an application from the specified location.
package-path
Example:
Device# app-hosting install 1keyes
https://downloads.thousandeyes.com/
enterprise-agent/thousandeyes-enterprise-agent-3.0.cat9k.tar
Or
Device# app-hosting install appid 1keyes package
flash:/apps/[greenfield-app-tar]
The following is sample output from the show app-hosting list command:
Device# show app-hosting list
App id State
---------------------------------------------------------
1keyes RUNNING
The following example shows how to install the ThousandEyes Enterprise Agent.
Note You can either download the BrownField application from the ThousandEyes website or install the
prepackaged Greenfield application from the flash filesystem.
Device> enable
Device# Device# app-hosting install 1keyes https://downloads.thousandeyes.com/
enterprise-agent/thousandeyes-enterprise-agent-3.0.cat9k.tar
OR
Device# app-hosting install appid 1keyes package flash:/apps/[greenfield-app-tar]
Device# app-hosting start appid 1keyes
Device# end
App id : 1keyes
Owner : iox
State : RUNNING
Application
Type : docker
Name : thousandeyes/enterprise-agent
Version : 3.0
Description :
Path : flash:thousandeyes-enterprise-agent-3.0.cat9k.tar
URL Path :
Activated profile name : custom
Resource reservation
Memory : 0 MB
Disk : 1 MB
CPU : 1850 units
CPU-percent : 25 %
VCPU : 1
Attached devices
Type Name Alias
---------------------------------------------
serial/shell iox_console_shell serial0
serial/aux iox_console_aux serial1
serial/syslog iox_syslog serial2
serial/trace iox_trace serial3
Network interfaces
---------------------------------------
eth0:
MAC address : 52:54:dd:c0:a2:ab
IPv4 address : 10.0.0.110
IPv6 address : ::
Network name : mgmt-bridge-v14
Docker
------
Run-time information
Command :
Entry-point : /sbin/my_init
-v $(APP_DATA)/data:/var/lib/te-agent -e TEAGENT_PROXY_TYPE=DIRECT
-e TEAGENT_PROXY_LOCATION= -e TEAGENT_PROXY_USER= -e
TEAGENT_PROXY_AUTH_TYPE=
-e TEAGENT_PROXY_PASS= -e TEAGENT_PROXY_BYPASS_LIST= -e
TEAGENT_KDC_USER=
-e TEAGENT_KDC_PASS= -e TEAGENT_KDC_REALM= -e TEAGENT_KDC_HOST=
-e TEAGENT_KDC_PORT=88
-e TEAGENT_KERBEROS_WHITELIST= -e TEAGENT_KERBEROS_RDNS=1 -e
PROXY_APT=
-e APT_PROXY_USER= -e APT_PROXY_PASS= -e APT_PROXY_LOCATION= -e
TEAGENT_AUTO_UPDATES=1
-e TEAGENT_ACCOUNT_TOKEN=r3d29srpebr4j845lvnamwhswlori2xs
--hostname=cat9k-9300-usb --memory=1g
Package run options : -e TEAGENT_ACCOUNT_TOKEN=TOKEN_NOT_SET --hostname=$(SYSTEM_NAME)
--cap-add=NET_ADMIN
--mount type=tmpfs,destination=/var/log/agent,tmpfs-size=140m
--mount type=tmpfs,destination=/var/lib/te-agent/data,tmpfs-size=200m
-v $(APP_DATA)/data:/var/lib/te-agent -e TEAGENT_PROXY_TYPE=DIRECT
-e TEAGENT_PROXY_LOCATION= -e TEAGENT_PROXY_USER= -e
TEAGENT_PROXY_AUTH_TYPE=
-e TEAGENT_PROXY_PASS= -e TEAGENT_PROXY_BYPASS_LIST= -e
TEAGENT_KDC_USER=
-e TEAGENT_KDC_PASS= -e TEAGENT_KDC_REALM= -e TEAGENT_KDC_HOST=
-e TEAGENT_KDC_PORT=88 -e TEAGENT_KERBEROS_WHITELIST= -e
TEAGENT_KERBEROS_RDNS=1
-e PROXY_APT= -e APT_PROXY_USER= -e APT_PROXY_PASS= -e
APT_PROXY_LOCATION=
-e TEAGENT_AUTO_UPDATES=1
Application health information
Status : 0
Last probe error :
Last probe output :
The following sample output from the show running-configuration command displays the static IP address
configuration:
Device# show running-config | section app-hosting
The following sample output from the show running-configuration command displays the static IP address
configuration and the proxy server information:
The following is sample output from running the app-resource Docker package merged with the Docker
runtime options:
// Example of "prepend-package-opts" merging
app-hosting appid TEST
app-vnic management guest-interface 3
app-resource docker
prepend-package-opts !!!
run-opts 1 "--entrypoint '/bin/sleep 1000000'"
run-opts 2 "-e TEST=1 "
Additional References
Related Topic Document Title
ThousandEyes URL https://app.thousandeyes.com
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
OpenFlow Overview
OpenFlow is a specification from the Open Networking Foundation (ONF) that defines a flow-based forwarding
infrastructure and a standardized application-programmatic interface. OpenFlow allows a controller to direct
the forwarding functions of a device through a secure channel.
OpenFlow is the protocol between a controller (control plane) and an Ethernet switch (data plane). The switch
has flow tables arranged in a pipeline. Flows are rules to examine packets that reach these tables.
An OpenFlow agent on the switch communicates with the controller using the OpenFlow protocol. The agent
supports both OpenFlow 1.0 (wire protocol 0x1) and OpenFlow 1.3 (wire protocol 0x4). It can have up to
eight controller connections. These connections are not preserved across a switchover, and the controller will
have to reconnect to the agent after a switchover.
The OpenFlow implementation on Cisco Catalyst 9400 Series Switches is stateless, and nonstop forwarding
(NSF) is not supported. The standby supervisor does not synchronize with the flow database.
OpenFlow Controller
The OpenFlow controller is an entity that interacts with an OpenFlow switch using the OpenFlow protocol.
In most cases, a controller is a software that manages many OpenFlow logical switches. Controllers offer a
centralized view of the network, and enable administrators to dictate to the underlying systems (switches and
routers) on how to handle the network traffic. A controller typically runs on a Linux server, and must have
IP connectivity to OpenFlow-capable switches.
A controller manages a switch, and inserts and deletes the flows on the switch. These flows support a subset
of OpenFlow 1.3 and 1.0 match and action criteria.
The switch connects to the controller using the management port. The management port is in the management
virtual routing and forwarding (VRF) instance, and hence provides a secure connection to the controller. To
connect a controller to the switch, configure the IP address and port number on which the controller can be
reached.
Flow Management
A flow entry is an element in a flow table that is used to match and process packets. It contains priority levels
for matching precedence, a set of match fields for matching packets, a set of instructions to apply, and packet
and byte counters. A timeout is also associated with each flow (a hard timeout or an inactivity timeout), which
is used to automatically remove flows.
A maximum of 32 flow tables are supported.
Each flow provides the following information:
• Priority: High-priority flows are matched first. A flow update requires all the flows to be prioritized
based on the configured priority.
• Match fields: A part of a flow entry against which a packet is matched. Match fields can match the various
packet header fields. If no match information is provided for a field, a wildcard is used.
• Action: An operation that acts on a packet.
OpenFlow Pipeline
An OpenFlow pipeline is a set of linked flow tables that provide matching, forwarding, and packet modification
in an OpenFlow switch. A port is where packets enter and exit the pipeline.
Packets are received on an ingress port and processed by the OpenFlow pipeline that forwards it to output
ports. The packet ingress port is owned by the packet throughout the pipeline, and represents the port on which
the packet was received into the switch. Note that the ingress port can also be used as a match field in a flow.
Flow actions allow packets to be sent to subsequent tables in the pipeline for further processing, and allow
information to be communicated between tables. Pipeline processing stops when the action associated with
a matching flow entry does not specify the next table. At this point, the packet is usually modified and
forwarded. The packet can also be dropped.
Flow tables of an OpenFlow switch are sequentially numbered, starting from 0. Pipeline processing always
starts by matching the packet against flow entries of flow table 0. Other flow tables can be used depending
on the outcome of the match and actions in the first table, which could result in matching the packet against
flow entries in subsequent tables.
VLAN ID — 0x13f
IPv4 source address Ethernet type should be Yes 10.0.0.0/24 (with mask)
set to 0x0800
IPv4 destination address Ethernet type should be Yes 10.0.0.254 (without mask)
set to 0x0800
Incoming interface — — —
Supported Actions
A flow can send a packet to:
• The controller.
• Any interface of the switch (including the incoming interface).
• A subsequent flow table (after Table 0) for another lookup.
• A group.
• The switch CPU for local processing. Only Cisco Discovery Protocol and Link Layer Discovery Protocol
(LLDP) packets can be sent for local processing.
A flow can add (push) or remove (pop) a VLAN tag. If a packet is an IP packet, the flow can decrement the
Time to Live (TTL) header field.
The ability to modify the packet fields are defined as Set-Field action. A flow can also modify the following
header fields of a packet:
VLAN ID 4k
Rewrite Fields
In Cisco IOS XE Bengaluru 17.4.1, the support to rewrite the following fields has been added:
Field Scale
ipv4_src 4k
ipv4_dst 4k
icmpv4_type 256
ip_dscp 64
The IP_DSCP field is part of the IPv4 type of service (ToS) field and the IPv6 traffic class field.
Cisco Catalyst 9300 Series Cisco Catalyst 9400 Series Cisco Catalyst 9500
Switches Switches, and Cisco High-Performance Series
Catalyst 9500 Series Switches
Switches
Flow Operations
This section describes the operations that take place when a flow is sent by the controller to be programmed
in the OpenFlow device.
Typically a device has flow tables arranged in a pipeline. The pipeline capabilities information specifies the
structure of the pipeline, such as the number of tables or stages, what each stage is capable of doing (match
or actions), and the size of each table.
When the controller sends a flow request, the OpenFlow agent verifies whether the flow can be handled by
the hardware. It compares the flow against the capabilities of the hardware that are defined when the switch
is booted up. If the flow is valid, it is programmed in the appropriate flow table.
If the new pipeline is validated (whether the hardware can support the pipeline), it becomes the new set of
capabilities used to check if a flow can be installed or not.
After the pipeline is instantiated and flows are installed, packets are forwarded by the switch. Ingress packets
are matched against the flows in each flow table, until the highest-priority matching flow entry is found. Packet
matching may be exact (match all fields of the table exactly), or partial (match some or all fields, and fields
with bit masks may be partially matched). Packets can be modified or forwarded based on the configured
actions. Actions can be applied in the pipeline at any time. An action can determine the next flow table to
match, the set of egress ports for the packet, and whether the packet should be routed to the controller.
On the OpenFlow controller, configure a flow with the output-to-local action to ensure that packets are sent
to the device CPU for local processing.
For more information about PoE, see the Configuring POE chapter.
SUMMARY STEPS
1. enable
2. configure terminal
3. boot mode openflow
4. exit
5. write erase
6. • delete flash:vlan.dat
• delete flash:stby-vlan.dat
7. reload
8. enable
9. show boot mode
DETAILED STEPS
Step 4 exit Exits global configuration mode and enters privileged EXEC
mode.
Example:
Device(config)# exit
Step 6 • delete flash:vlan.dat • Deletes the vlan.dat file that stores the VLAN
• delete flash:stby-vlan.dat information.
Example: • Deletes the stby-vlan.dat file, if you have a standby
Device# delete flash:vlan.dat device.
Device# delete flash:stby-vlan.dat
Step 7 reload Reloads the switch and enables OpenFlow forwarding mode
for the switch.
Example:
Device# reload
Step 9 show boot mode Displays information about the device's forwarding mode.
Example:
Device# show boot mode
Example
The following is sample output from the show boot mode command that shows the device in
OpenFlow mode:
Device# show boot mode
What to do next
To go back to normal mode, configure the no boot mode openflow command and then reload the device.
Configuring OpenFlow
SUMMARY STEPS
1. enable
2. configure terminal
3. feature openflow
4. openflow
5. switch 1 pipeline 1
6. controller ipv4 ip-address port port-number vrf vrf-name security {none | tls}
7. datapath-id ID
8. tls trustpoint local name remote name
9. end
DETAILED STEPS
Step 5 switch 1 pipeline 1 Configures a logical switch and pipeline, and enters
OpenFlow switch configuration mode.
Example:
Device(config-openflow)# switch 1 pipeline 1
Step 6 controller ipv4 ip-address port port-number vrf vrf-name Connects to a controller.
security {none | tls}
• You must configure the tls trustpoint command if
Example: you have configured TLS as the OpenFlow controller
Device(config-openflow-switch)# controller ipv4 connection security option.
10.2.2.2 port 6633 vrf Mgmt-vrf security tls
• You do not have to configure tls trustpoint command
if you have not configured any security option for the
OpenFlow controller.
Step 8 tls trustpoint local name remote name (Optional) Configures an OpenFlow switch Transport Layer
Security (TLS) trustpoint.
Example:
Device(config-openflow-switch)# tls trustpoint
local trustpoint1 remote trustpoint1
SUMMARY STEPS
1. enable
2. configure terminal
3. feature openflow
4. interface type number
5. switchport mode trunk
6. switchport nonnegotiate
7. no keepalive
8. spanning-tree bpdufilter enable
9. end
DETAILED STEPS
Step 4 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 1/0/3
Step 5 switchport mode trunk Sets the trunking mode of the Layer 2-switched interface
to trunk.
Example:
Device(config-if)# switchport mode trunk
Step 8 spanning-tree bpdufilter enable Enables bridge protocol data unit (BPDU) filtering on the
interface.
Example:
Device(config-if)# spanning-tree bpdufilter enable
Verifying OpenFlow
Use these commands to verify your OpenFlow configuration. These commands can be used in any order.
SUMMARY STEPS
1. enable
2. show openflow hardware capabilities
3. show openflow switch 1 controller
4. show openflow switch 1 ports
5. show openflow switch 1 flows list
DETAILED STEPS
Step 1 enable
Enables privileged EXEC mode.
• Enter your password if prompted.
Example:
Device> enable
Pipeline ID: 1
Pipeline Max Flows: 2322
Max Flow Batch Size: 100
Statistics Max Polling Rate (flows/sec): 10000
Pipeline Default Statistics Collect Interval: 5
.
.
.
Flow: 1 Match: any Actions: goto_table:1, Priority: 9000, Table: 0, Cookie: 0x1,
Duration: 2382.117s, Packets: 34443, Bytes: 3359315
Additional References
Related Documents
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, http://www.cisco.com/support
including documentation and tools for troubleshooting and resolving
technical issues with Cisco products and technologies.
To receive security and technical information about your products,
you can subscribe to various services, such as the Product Alert
Tool (accessed from Field Notices), the Cisco Technical Services
Newsletter, and Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a
Cisco.com user ID and password.
OpenFlow Power over Cisco IOS XE Gibraltar 16.12.1 PoE is supported on OpenFlow ports.
Ethernet
This feature was implemented on the following
platforms:
• Catalyst 9300 Series Switches
• Catalyst 9400 Series Switches
OpenFlow Breakout Cisco IOS XE Bengaluru 17.5.1 Breakout cables enable a single 40G Quad
Port Support Small Form-Factor Pluggable+ (QSFP+)
interface to be split into four 10G SFP+
interfaces, and a single 100G QSFP28 interface
into four 25G SFP28 interfaces.
This feature was introduced on the following
platforms:
• Catalyst 9500 and 9500 High
Performance Series Switches
the TCP session with the OpenFlow controller, and the connection will not be terminated by the OpenFlow
agent.
Stateful Switchover
Stateful switchover (SSO) maintains stateful protocol and application information to retain user session
information during a switchover. The flows sent to the OpenFlow device by the controller are retained during
a switchover from the active supervisor to the standby supervisor, so that the controller does not have to
re-install the flows. It also provides a faster switchover relative to high system availability.
In devices that support dual supervisors, SSO takes advantage of the supervisor redundancy to increase the
network availability. SSO establishes one of the supervisors as the active and the other as the standby, and
then synchronizes critical state information between them. Following an initial synchronization between the
two supervisors, SSO dynamically maintains state information between them.
SSO is used with the Cisco Nonstop Forwarding (NSF) feature.
With NSF, even during a switchover, packets are forwarded based on the flow entries programmed by the
OpenFlow controller.
Probe Interval
The active supervisor maintains the OpenFlow TCP connection with the controller through the management
interface, GigabitEthernet 0/0, and this connection is synchronized with the standby supervisor. The active
supervisor probes the controller-connection based on the configured probe interval.
After a switchover, the management interface on the new active takes a minimum of 13 seconds to become
operational. Packets sent by the controller until then are not received, and this can lead to the disconnecting
of the OpenFlow TCP connection. To avoid the OpenFlow agent timeout due to the probe-interval, a default
value of 40 seconds is automatically configured on active supervisor.
DETAILED STEPS
Step 4 switch 1 pipeline 1 Configures a logical switch and pipeline, and enters
OpenFlow switch configuration mode.
Example:
Device(config-openflow)# switch 1 pipeline 1
Step 5 controller ipv4 ip-address port port-number vrf vrf-name Connects to an OpenFlow controller.
Example: Note High Availability is not supported with TLS.
Device> enable
Device# configure terminal
Device(config)# openflow
Device(config-openflow)# switch 1 pipeline 1
Device(config-openflow-switch)# controller ipv4 10.2.2.2 port 6633 vrf Mgmt-vrf
Device(config-openflow-switch)# end
Controller: 1
172.16.18.85:6636
Protocol: tcp
VRF: Mgmt-vrf
Connected: Yes
Role: Equal
Negotiated Protocol Version: OpenFlow 1.3
Last Alive Ping: 2021-01-29 08:44:59 UTC
state: ACTIVE
sec_since_connect: 4893
The following is sample output from the show tcp ha connection command. The state should show ESTAB
on both the active and standby supervisors.
High Availability in Cisco IOS XE Bengaluru 17.5.1 High availability in OpenFlow mode supports
OpenFlow Mode SSO and NSO.
In Cisco IOS XE Bengaluru 17.5.1, this feature
was introduced on the following platform:
• Catalyst 9400 Series Switches