- Preface
- Read Me First
- Software Packaging and Architecture
- Using Cisco IOS XE Software
- Console Port, Telnet, and SSH Handling
- Consolidated Packages and Sub-Package Management
- Software Upgrade Process
- High Availability Overview
- Broadband Scalability and Performance
- UniDirectional Link Detection (UDLD) Protocol
- Using the Management Ethernet Interface
- Multilink PPP Support for the ASR 1000 Series Aggregation Services Routers
- Synchronous Ethernet Support
- IEEE 1588v2 PTP Support
- Configuring Bridge Domain Interfaces
- Enabling Support for Tunable DWDM-XFP-C
- Monitoring and Maintaining Multilink Frame Relay
- Configuring MPLS Layer 2 VPNs
- Configuring Support for Management Using the REST API
- LSM-MLDP-based MVPN Support
- Tracing and Trace Management
- Packet Trace
- Configuring and Accessing the Web User Interface
- PPP Half-Bridge on the Cisco ASR 1000 Series Routers
- Unsupported Commands
- Configuration Examples
Enabling Management by REST API
Introduction
You can use the Cisco IOS XE REST API to manage the Cisco ASR 1001-X and ASR 1002-X as an alternative to configuring and managing selected features on the router using the Cisco IOS XE CLI. This chapter describes how to configure these Cisco ASR routers to enable management using the REST API. For detailed information about using the REST API, see the Cisco IOS XE REST API Management Reference Guide.
Overview of Installation
Installing the Cisco IOS XE REST API involves the following general steps:
1. Download the OVA package from Cisco.com.
a. From the Cisco Routers product page, navigate to the Cisco CSR 1000V Cloud Services Router product page.
http://www.cisco.com/c/en/us/products/routers/cloud-services-router-1000v-series/index.html
b. Click the “Download Software” link.
c. Select the Cisco IOS XE release package and follow the instructions for downloading the software.
2. Install the REST API OVA on the ASR platform.
3. Enable the REST API on the ASR platform. In the Enabling REST API Support Using the Cisco IOS XE CLI section, see:
Enabling REST API Support Using the Cisco IOS XE CLI
- Configuring the Data Plane Dual Management Interface to Support the REST API
- Configuring the Management Plane Dual Management Interface to Support the REST API
- Configuring the REST API Local Port and AutoSave Options
- Configuring onep
- Disabling REST API Support
- Disabling REST API Support
- Viewing the REST API Container Status
Configuring the Data Plane Dual Management Interface to Support the REST API
Beginning with Cisco IOS XE 3.16, it is possible to associate management container IP addresses with either:
- Management plane interface (see Configuring the Management Plane Dual Management Interface to Support the REST API)
Configuration Notes
Management Container IP Addresses in Subnet of Router Management Interface
To allocate the management container IP addresses to be associated with the router’s management interface, ensure that the IP addresses configured for the management container are within the same subnet as the router’s management interface. For example:
Management container IP address: 192.168.5.225
Router management interface: 192.168.5.224
Order of Configuring Gateway Port, Management Interface, and IP Addresses
Configuring the management container details in the following order:
1. vNIC gateway port (vnic gateway virtualportgroup0)
The vNIC management interface (vnic management GigabitEthernet0) can be configured after the guest IP addresses.
SUMMARY STEPS
3. interface GigabitEthernet x
4. ip address ipv4-addr subnet-mask
7. interface virtualportgroup virtual-port-group-number
9. interface virtualportgroup 0
10. ip unnumbered GigabitEthernet0/0/0
12. ip route ipv4-address ipv4-subnet-mask VirtualPortGroup0
14. ip unnumbered GigabitEthernet x
18. vnic gateway virtualportgroup virtual-port-group-number
19. guest ip address remote-mgmt-ipv4-addr
21. vnic management GigabitEthernet0
25. ip route ip-address subnet-mask virtualportgroup virtual-port-group-number
DETAILED STEPS
Configuring the Management Plane Dual Management Interface to Support the REST API
Beginning with Cisco IOS XE 3.16, it is possible to associate management container IP addresses with either:
- Data plane interface (see Configuring the Data Plane Dual Management Interface to Support the REST API)
Configuration Notes
Management Container IP Addresses in Subnet of Router Management Interface
To allocate the management container IP addresses to be associated with the router’s management interface, ensure that the IP addresses configured for the management container are within the same subnet as the router’s management interface. For example:
Management container IP address: 192.168.5.225
Router management interface: 192.168.5.224
Order of Configuring Gateway Port, Management Interface, and IP Addresses
Configuring the management container details in the following order:
1. vNIC gateway port (vnic gateway virtualportgroup0)
2. vNIC management interface (vnic management GigabitEthernet0)
In contrast to the related procedure that uses the data plane interface, in this case, the vNIC management interface must be configured before configuring guest IP addresses.
SUMMARY STEPS
3. interface GigabitEthernet x
4. ip address ipv4-addr subnet-mask
7. interface virtualportgroup virtual-port-group-number
9. interface virtualportgroup 0
10. ip unnumbered GigabitEthernet0/0/0
12. ip unnumbered GigabitEthernet x
16. vnic gateway virtualportgroup virtual-port-group-number
18. guest ip address guest-mgmt-ipv4-address
19. vnic management GigabitEthernet0
23. ip route ip-address subnet-mask virtualportgroup virtual-port-group-number
DETAILED STEPS
Configuring the REST API Local Port and AutoSave Options
Beginning with Cisco IOS XE Release 3.13S, you can configure the REST API local port and autosave options.
SUMMARY STEPS
DETAILED STEPS
Configuring onep
The Open Network Environment Programming Interface (onep) is used to define the service set for Cisco IOS and the REST API. Configure onep as follows.
SUMMARY STEPS
DETAILED STEPS
|
|
|
---|---|---|
Enter configuration commands, one per line. End with CNTL/Z. |
||
|
||
|
||
|
Disabling REST API Support
Support for the REST API is enabled by default. The following procedure disables the REST API.
DETAILED STEPS
|
|
|
---|---|---|
|
||
|
||
|
||
|
||
|
Exits remote-management configuration mode and enters configuration mode. |
Note When REST API support is disabled using the no restful-api command, the REST API PUT, POST and DELETE operations are disabled. However, the GET operation is still available.
Viewing the REST API Container Status
Use the show virtual-service detail command to view the REST API container status.