Routing Protocol (OSPF, BGP, EIGRP) Requirements

Resource Summary for Routing Protocols

HTTP Method
Resource
URL (BaseURL)
GET
POST
PUT
DELETE

All OSPF passive interfaces

/api/v1/routing-svc/ospf/{routing-protocol-id}/passive

Y

N

N

N

All EIGRP passive interfaces

/api/v1/routing-svc/eigrp/{routing-protocol-id}/passive

Y

N

N

N

Enables/
Disables the OSPF route updates on an interface

/api/v1/routing-svc/ospf/{routing-protocol-id}/passive/{if-id}

Y

N

Y

N

Enables/
Disables the route updates on an interface

/api/v1/routing-svc/eigrp/{routing-protocol-id}/passive/{if-id}

Y

N

Y

N

OSPF process id

/api/v1/routing-svc/ospf

N

Y

N

N

BGP ASN

/api/v1/routing-svc/bgp

N

Y

N

N

EIGRP ASN

/api/v1/routing-svc/eigrp

N

Y

N

N

OSPF routing process instance

/api/v1/routing-svc/ospf/{routing-protocol-id}

N

N

N

Y

BGP routing process instance

/api/v1/routing-svc/bgp/{routing-protocol-id}

N

N

N

Y

BGP Bestpath

/api/v1/routing-svc/bgp/{routing-protocol-id}/best-path

Y

N

Y

N

Neighbor Fall-over

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors

Y

Y

N

N

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors/{neighbor-id}

Y

N

Y

N

EIGRP routing process instance

/api/v1/routing-svc/eigrp/{routing-protocol-id}

N

N

N

Y

OSPF network

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks

Y

Y

N

N

EIGRP Networks

/api/v1/routing-svc/eigrp/{routing-protocol-id}/networks

Y

Y

N

N

BGP Networks

/api/v1/routing-svc/bgp/{routing-protocol-id}/networks

Y

Y

N

N

OSPF network

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks/{network-id}

Y

N

N

Y

EIGRP network

/api/v1/routing-svc/eigrp/{routing-protocol-id}/networks/{network-id}

{network-id} is the ipaddress_prefixLen

Y

N

N

Y

BGP network

/api/v1/routing-svc/bgp/{routing-protocol-id}/networks/{network-id}

The network-id appears in the URL as ipaddr_prefixLen (CIDR format).

Y

N

N

Y

BGP neighbors

/api/v1/routing-svc/bgp/{asn-id}/neighbors

Only BGP requires neighbor configuration. OSPF and EIGRP learn their neighbors.

Y

Y

N

N

BGP neighbor

/api/v1/routing-svc/bgp/{asn-id}/neighbors/<neighbor-ip-address>

Y

N

Y

Y

BGP Neighbor Fall-over

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors/{neighbor-id}

Y

Y

Y

N

N

Y

N

Y

Routing table

/api/v1/routing-svc/routing-table

Y

N

N

N

Static routes

/api/v1/routing-svc/static-routes

Y

Y

N

N

A static route

/api/v1/routing-svc/static-routes/{destination-network_next-hop}

- or -

/api/v1/routing-svc/static-routes/{destination-network_next-hop_intf-name}

- or -

/api/v1/routing-svc/static-routes/{destination-network_next-hop_intf-name}

Y

N

N

Y

Create a Routing Protocol Instance Identifier

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Resource URI

Verb
URI

POST

/api/v1/routing-svc/BGP

/api/v1/routing-svc/EIGRP

/api/v1/routing-svc/OSPF

Properties

Property
Type
Required for POST and PUT
Description

routing-protocol-type

string

Optional in request

“BGP”, “EIGRP”, or “OSPF”

routing-protocol-id

string

Mandatory

Unique routing protocol ID.

Examples: EIGRP ASN, BGP ASN, OSPF process ID.

Note : IOS supports only one BGP routing instance.

router-id

ipaddress

Optional

IP address in x.x.x.x format.

JSON Representation

{
"routing-protocol-id": "{string}"
}

Related Topics

BGP Network Resource

EIGRP Network Resource

OSPF Network Resource

Create a BGP Instance

Example

JSON Request

POST /api/v1/routing-svc/bgp
 
Content-Type: application/json
Accept: application/json
 
{
"routing-protocol-id": "100"
}
 

JSON Response

201 Created
Location: http://host/api/v1/routing-svc/bgp/100

Create an OSPF Process ID

Example

JSON Request

POST /api/v1/routing-svc/ospf
 
Content-Type: application/json
Accept: application/json
 
{
"routing-protocol-id": "100"
}
 

JSON Response

201 Created
Location: http://host/api/v1/routing-svc/ospf/100

Create an EIGRP ASN

Example

JSON Request

POST /api/v1/routing-svc/eigrp
 
Content-Type: application/json
Accept: application/json
 
{
"routing-protocol-id": "100"
}
 

JSON Response

201 Created
Location: http://host/api/v1/routing-svc/eigrp/100

Delete a Routing Protocol Instance Identifier

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Resource URI

Verb
URI

DELETE

/api/v1/routing-svc/BGP/{routing-protocol-id}

/api/v1/routing-svc/OSPF/{routing-protocol-id}

/api/v1/routing-svc/EIGRP/{routing-protocol-id}

{routing-protocol-id} is one of: EIGRP ASN, BGP ASN, or OSPF process id.

Delete a BGP ASN

Example

JSON Request

DELETE /api/v1/routing-svc/bgp/100

JSON Response

204 No Content

Delete an EIGRP ASN

Example

JSON Request

DELETE /api/v1/routing-svc/eigrp/100

JSON Response

204 No Content

Delete an OSPF Process ID

Example

JSON Request

DELETE /api/v1/routing-svc/ospf/100

JSON Response

204 No Content

Retrieve All Routing Protocol IDs

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Resource URI

Verb
URI

GET

/api/v1/routing-svc/BGP

/api/v1/routing-svc/OSPF

/api/v1/routing-svc/EIGRP

Retrieve All BGP ASNs

Example

JSON Request

GET /api/v1/routing-svc/bgp
Accept: application/json

JSON Response

200 ok
Content-type: application/json
 
{
"kind": "collection#bgp-asn",
"items": [
{
"kind": "object#bgp-asn",
"routing-protocol-id": "100"
},
]
}

Retrieve All EIGRP ASNs

Example

JSON Request

GET /api/v1/routing-svc/eigrp
Accept: application/json

JSON Response

200 ok
Content-type: application/json
 
{
"kind": "collection#eigrp-asn",
"items": [
{
"kind": "object#eigrp-asn",
"routing-protocol-id": "100"
},
]
}
 

Retrieve All OSPF Process IDs

Example

JSON Request

GET /api/v1/routing-svc/ospf
Accept: application/json

JSON Response

200 ok
Content-type: application/json
 
{
"kind": "collection#ospf-process-id",
"items": [
{
"kind": "object#ospf-process-id",
"routing-protocol-id": "100"
},
]
}

BGP Network Resource

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties

 

Property
Type
Required for POST and PUT
Description

network

string

Mandatory

Destination network CIDR format x.x.x.x/nn

kind

string

Not applicable

“object#bgp-network”

routing-protocol

string

Not applicable

bgp

routing-protocol-id

number

Not applicable

BGP ASN

JSON Representation

{
"kind": "object#bgp-network"
"routing-protocol-id": "{string}",
"network": "{ipaddress}"
}

Related Topics

Create a BGP Instance

Configure a BGP Network

Resource URI

Verb
URI

POST

/api/v1/routing-svc/bgp/{routing-protocol-id}/networks

{routing-protocol-id} is the BGP ASN

Example

JSON Request

POST /api/v1/routing-svc/bgp/100/networks
 
Content-type: application/json
Accept: application/json
 
{
"network": "172.17.1.0/24"
}
 

JSON Response

201 Created
Location: http://host/api/v1/routing-svc/bgp/100/networks/172.17.1.0_24

Retrieve a BGP Network

Example

JSON Request

GET /api/v1/routing-svc/bgp/100/networks/10.0.0.0_24
Accept: application/json

JSON Response

200 ok
 
Content-type: application/json
 
{
"kind": "object#bgp-network",
"routing-protocol": "bgp",
"routing-protocol-id": "100",
"network": "10.0.0.0/24"
}

Retrieve All BGP Networks

Resource URI

Verb
URI

GET

/api/v1/routing-svc/bgp/{routing-protocol-id}/networks

{routing-protocol-id} is the BGP ASN

Properties for Retrieve All

Property
Type
Description

network

string

Destination network CIDR format x.x.x.x/nn

JSON Representation

{
"kind": "collection#bgp-network",
"routing-protocol-type": "BGP",
"routing-protocol-id": "{string}",
"items": [ { json object with kind "object#bgp-network"} ]
}

Example

JSON Request

GET /api/v1/routing-svc/bgp/100/networks
Accept: application/json
 

JSON Response

200 ok
 
Content-type: application/json
 
{
"kind": "collection#bgp-network",
"routing-protocol": "bgp",
"routing-protocol-id": "100",
"items": [
{
"kind": "object#bgp-network",
"network": "172.17.1.0/24"
},
{
"kind": "object#bgp-network",
"network": "173.17.1.0/24"
},
]
}

Delete a BGP Network

Example

JSON Request

DELETE /api/v1/routing-svc/bgp/100/networks/10.0.0.0_24

JSON Response

204 No Content

BGP Best Path Selection Resource

History

 

Release
Modification

IOS XE 3.11

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties

 

Property
Type
Required for POST and PUT
Description

compare-routerid

boolean

Optional

Compare routerid for best path selection

ignore-cost-community

boolean

Optional

Ignore cost community for best path selection

ignore-igp-metrics

boolean

Optional

Ignore IGP metric

compare-confederation-path

boolean

Optional

Multi-Exit-Discriminator option

missing-as-least-preferred

boolean

Optional

Multi-Exit-Discriminator option

allow-invalid

boolean

Optional

Prefix validation option

disable

boolean

Optional

Prefix validation option

JSON Representation

{
"kind" : "object#bgp-bestpath",
"compare-routerid" : true,
"ignore-cost-community" : true,
"ignore-igp-metric" : true,
"multi-exit-discriminator" :
{
"compare-confederation-path" : true,
"missing-as-worst" : true
},
"prefix-validation" :
{
"allow-invalid" : true,
"disable" : true
}
}
 

Retrieve BGP Best Path

Resource URI

 

Verb
URI

GET

/api/v1/routing-svc/bgp/{routing-protocol-id}/best-path

Example

JSON Request

GET /api/v1/routing-svc/bgp/100/bestpath
Accept: application/json

JSON Response

200 OK
Content-Type: application/json
 
{
"kind" : "object#bgp-bestpath",
"compare-routerid" : true,
"ignore-cost-community" : true,
"ignore-igp-metric" : true,
"multi-exit-discriminator" :
{
"compare-confederation-path" : true,
"missing-as-worst" : true},
"prefix-validation" :
{
"allow-invalid" : true,
"disable" : true
},
}

Modify BGP Best Path

Resource URI

 

Verb
URI

PUT

/api/v1/routing-svc/bgp/{routing-protocol-id}/best-path

Example

JSON Request

PUT /api/v1/routing-svc/bgp/100/bestpath
Content-Type: application/json
 
{
"compare-routerid" : true,
"ignore-cost-community" : true,
"ignore-igp-metric" : true,
"multi-exit-discriminator" :
{
"compare-confederation-path" : true,
"missing-as-worst" : true
},
"prefix-validation" :
{
"allow-invalid" : true,
"disable" : true
}
}

JSON Response

204 No Content
 

EIGRP Network Resource

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.13

Added virtual-instance-name property.

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties

Property
Type
Required for POST and PUT
Description

kind

string

Not applicable

“object#eigrp-network”. Read-only.

routing-protocol

string

Not applicable

“eigrp”

routing-protocol-id

number

Not applicable

EIGRP ASN

network

string

Mandatory

Destination network CIDR format x.x.x.x/nn.

virtual-instance-name

string

Optional

EIGRP virtual instance name

JSON Representation

{
"kind": "object#bgp-network",
"routing-protocol": "EIGRP",
"routing-protocol-id": {number},
"network": "{string}",
"virtual-instance-name": "{string}"
}

Related Topics

Create an EIGRP ASN

Create an EIGRP Network

Resource URI

Verb
URI

POST

/api/v1/routing-svc/eigrp/{routing-protocol-id}/networks

URI Property
Description

{routing-protocol-id}

EIGRP ASN

Example

JSON Request

POST /api/v1/routing-svc/eigrp/145/networks
 
Content-type: application/json
Accept: application/json
 
{
"network": "131.108.0.0/24"
}
 

JSON Response

201 Created
Location: http://host/api/v1/routing-svc/eigrp/145/networks/131.108.0.0_24

Retrieve an EIGRP Network

Resource URI

Verb
URI

GET

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks/{network_mask}

URI Property
Description

{routing-protocol-id}

EIGRP ASN

{network_mask}

Network and the prefix length joined by an underscore.

Example

JSON Request

GET /api/v1/routing-svc/eigrp/10/networks/131.108.200.0_24
Accept: application/json
 

JSON Response

200 OK
 
Content-type: application/json
 
{
"kind": "object#eigrp-network",
"routing-protocol": "eigrp",
"routing-protocol-id": "10",
"network": "131.108.200.0/24"
}
 

Retrieve All Configured EIGRP Networks

Resource URI

Verb
URI

GET

/api/v1/routing-svc/eigrp/{routing-protocol-id}/networks

URI Property
Description

{routing-protocol-id}

EIGRP ASN

Properties for Retrieve All

Property
Type
Description

kind

string

“object#eigrp-network”. Read-only.

routing-protocol

string

“eigrp”

routing-protocol-id

number

EIGRP ASN

network

string

Destination network CIDR format x.x.x.x/nn.

JSON Representation

{
"kind": "collection#eigrp-network",
"routing-protocol-type": "EIGRP",
"routing-protocol-id": {number},
"items": [ {json object with kind "object#eigrp-network"} ]
}
 

Example

JSON Request

GET /api/v1/routing-svc/eigrp/145/networks
Accept: application/json

JSON Response

200 ok
 
Content-type: application/json
{
"kind": "collection#eigrp-network"
"routing-protocol-id": "145",
"routing-protocol": "eigrp",
"items": [
{
"kind": "object#eigrp-network",
"network": "172.17.1.0/24"
},
{
"kind": "object#eigrp-network",
"network": "173.17.1.0/24"
},
]
}

Delete an EIGRP Network

Resource URI

Verb
URI

DELETE

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks/{network_mask}

URI Property
Description

{routing-protocol-id}

EIGRP ASN

{network_mask}

Network and the prefix length, joined by an underscore.

Example

JSON Request

DELETE /api/v1/routing-svc/eigrp/10/networks/131.108.200.0_24
Accept: application/json

JSON Response

204 No Content

OSPF Network Resource

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties

Property
Type
Required for POST and PUT
Description

area

string

Mandatory

OSPF area as a decimal value or IP address format x.x.x.x.

network

string

Mandatory

Destination network CIDR format x.x.x.x/nn.

kind

string

Not applicable

“object#ospf-network”. Read-only.

routing-protocol

string

Not applicable

“ospf”

routing-protocol-id

number

Not applicable

OSPF process ID.

JSON Representation

{
"kind": "object#ospf-network",
"routing-protocol": "{string}",
"routing-protocol-id": "{string}",
"network": "{string}",
"area" : "{string}"
}

Related Topics

Create an OSPF Process ID

Configure an OSPF Network

Resource URI

Verb
URI

POST

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks

URI Property
Description

{routing-protocol-id}

OSPF process ID

Example

JSON Request

POST /api/v1/routing-svc/ospf/10/networks
 
Content-type: application/json
Accept: application/json
 
{
"network" : "131.108.200.0/24",
"area" : 0
}

JSON Response

201 Created
Location: http://host/api/v1/routing-svc/ospf/10/networks/131.108.200.0_24_0

Retrieve an OSPF Network

Resource URI

Verb
URI

GET

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks/{network_mask_area}

URI Property
Description

{routing-protocol-id}

OSPF process ID

{network_mask_area}

Network, prefix length, and OSPF area, joined by underscores.

Example

JSON Request

GET /api/v1/routing-svc/ospf/10/networks/131.108.200.0_24_0
Accept: application/json

JSON Response

200 OK
 
Content-type: application/json
 
{
"kind" : "object#ospf-network",
"routing-protocol" : "ospf",
"routing-protocol-id" : "10",
"network" : "131.108.200.0/24",
"area" : 0
}
 

Retrieve All Configured OSPF Networks

Resource URI

Verb
URI

GET

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks

URI Property
Description

{routing-protocol-id}

OSPF process ID

Properties for Retrieve All

Property
Type
Description

kind

string

Must be "collection#ospf-network"

routing-protocol

string

"OSPF"

routing-protocol-id

string

OSPF process id

items

array

List of networks

JSON Representation

{
"kind": "collection#ospf-network",
"routing-protocol-type": "{string}",
"routing-protocol-id": "{string}",
"items": [ {json object with kind "object#ospf-network"} ]
}

Example

JSON Request

GET /api/v1/routing-svc/ospf/10/networks
Accept: application/json

JSON Response

200 ok
 
Content-type: application/json
{
"kind": "collection#ospf-network",
"routing-protocol": "ospf",
"routing-protocol-id": 10,
"items": [
{
"kind": "object#ospf-network",
"network" : "171.108.201.0/24",
"area" : 0
},
{
"kind": "object#ospf-network",
"network" : "171.108.202.0/24",
"area" : 1
},
]
}

Delete an OSPF Network

Resource URI

Verb
URI

DELETE

/api/v1/routing-svc/ospf/{routing-protocol-id}/networks/{network_mask_area}

URI Property
Description

{routing-protocol-id}

OSPF process ID

{network_mask_area}

Network, prefix length, and OSPF area, joined by underscores.

Example

JSON Request

DELETE /api/v1/routing-svc/ospf/10/networks/131.108.200.0_24_0
Accept: application/json

JSON Response

204 No Content

BGP Neighbor Resource

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.11

Added enable and detection properties

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties

Property
Type
Description

kind

string

Mandatory

Can only be "object#bgp-neighbor"

routing-protocol-id

number

Mandatory

BGP AS

neighbor

ipaddress

Mandatory

IP address format x.x.x.x

remote-as

string

Mandatory

Neighbor's ASN

fall-over

object

Optional

Configures fall-over

enable

boolean

Mandatory

{sub-property of fall-over)

Enable or disable fall-over

detection

string

Optional

{sub-property of fall-over)

If fall-over is enabled, optionally use bfd

JSON Representation for BGP Neighbor Configuration

{
"kind": "object#bgp-neighbor",
"routing-protocol-id": {number},
"address": "{ip-address}",
"remote-as": "{string}",
"fall-over":
{
"enable" : {boolean},
"detection": "{string}"
}
}

 

Create BGP Neighbor

Resource URI

Verb
URI

POST

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors

Example

JSON Request

POST /api/v1/routing-svc/bgp/100/neighbors
Content-Type: application/json
 
{
"routing-protocol-id": "100",
"address": "152.13.25.25",
"remote-as": "222",
"fall-over":
{
"enable" : true,
"method" : "bfd"
}
}

JSON Response

201 Created

Location: https://host/api/v1/bgp/100/neighbors/152.13.25.25

Retrieve a BGP Neighbor

Resource URI

Verb
URI

GET

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors/{neighbor-id}

URI Property
Description

{routing-protocol-id}

BGP ASN

{neighbor-id}

Neighbor IP address in x.x.x.x format

Example

JSON Request

GET /api/v1/routing-svc/bgp/100/neighbors/152.12.25.25
Accept: application/json

JSON Response

200 OK
Content-Type: application/json
 
{
"kind": "object#bgp-neighbor",
"routing-protocol-id": "100",
"address": "152.13.25.25",
"remote-as": "222",
"fall-over":
{
"enable": true,
"method" : "bfd"
}
}
 

Retrieve All Static BGP Neighbors

Resource URI

Verb
URI

GET

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors

URI Property
Description

{routing-protocol-id}

BGP ASN

Properties for Retrieve All

Property
Type
Description

kind

string

Must be “collection#bgp-neighbor”

items

array

Array of static BGP neighbor json objects

JSON Representation

{
"kind": "collection#bgp-neighbor",
"routing-protocol-type": "{string}",
"routing-protocol-id": "{string}",
"items":[
{json object with kind "object#bgp-neighbor"}
]
}

Example 1

JSON Request

GET /api/v1/routing-svc/bgp/100/neighbors
Accept: application/json
 

JSON Response

200 ok
 
Content-type: application/json
 
{
"kind": "collection#bgp-neighbor",
"routing-protocol-id": "100",
"items": [
{
"kind": "object#bgp-neighbor",
"address": "152.13.25.25",
"remote-as": "100"
},
{
"kind": "object#bgp-neighbor",
"address": "144.12.13.1",
"remote-as": "10"
}
]
}

Example 2

JSON Request

GET /api/v1/routing-svc/bgp/100/neighbors
Accept: application/json

JSON Response

200 ok
Content-type: application/json
 
{
"kind" : "collection#bgp-neighbor",
"routing-protocol-id" : "100",
"items" : [
{
"kind": "object#bgp-neighbor",
"address": "152.13.25.25",
"remote-as: "100",
"fall-over":
{
"enable": true,
"method" : "bfd"
}
}
]
}

Modify a BGP Neighbor

Resource URI

Verb
URI

PUT

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors/{neighbor-id}

URI Property
Description

{routing-protocol-id}

BGP ASN

{neighbor-id}

Neighbor IP address in x.x.x.x format

Example

JSON Request

PUT /api/v1/routing-svc/bgp/100/neighbors/152.13.25.25
Content-Type: application/json
 
{
"routing-protocol-id": "100",
"address" : "152.13.25.25",
"remote-as" : "222",
"fall-over" :
{
"enable" : true,
"method" : "bfd"
}
}

JSON Response

204 No Content
 

Delete a BGP neighbor

Resource URI

Verb
URI

DELETE

/api/v1/routing-svc/bgp/{routing-protocol-id}/neighbors/{neighbor-id}

URI Property
Description

{routing-protocol-id}

BGP ASN

{neighbor-id}

Neighbor IP address in x.x.x.x format

Example

JSON Request

DELETE /api/v1/routing-svc/bgp/100/neighbors/152.13.25.25

JSON Response

204 No Content

Enabling and Disabling Routing Updates on an Interface (Passive for OSPF and EIGRP)

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.13

Added virtual-instance-name property for EIGRP passive interface.

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties for OSPF

Property
Type
Required for POST and PUT
Description

kind

string

Not applicable

Object type:

object#passive-interface

routing-protocol-type

string

Mandatory

ospf or eigrp (not case-sensitive)

routing-protocol-id

string

Mandatory

EIGRP ASN or OSPF process ID.

if-name

string

Mandatory

Name of an interface

passive

boolean

Mandatory

“true” to disable sending routing updates on the interface, or “false” to re-enable.

Properties for EIGRP

Property
Type
Required for POST and PUT
Description

kind

string

Not applicable

Object type:

object#passive-interface

routing-protocol-type

string

Mandatory

ospf or eigrp (not case-sensitive)

routing-protocol-id

string

Mandatory

EIGRP ASN or OSPF process ID.

if-name

string

Mandatory

Name of an interface

passive

boolean

Mandatory

“true” to disable sending routing updates on the, or “false” to re-enable.

virtual-instance-name

string

Optional

EIGRP virtual instance name

JSON Representation for OSPF

{
"routing-protocol-id": "{string}",
"routing-protocol-type": "{string}",
"if-name": "{string}",
"passive": {boolean}
}

JSON Representation for EIGRP

{
"routing-protocol-id": "{string}",
"routing-protocol-type": "{string}",
"if-name": "{string}",
"passive": {boolean},
"virtual-instance-name": "{string}"
}

Suppress Sending of Routing Updates through a Specified Interface

note.gif

Noteblank.gif This command is not applicable to BGP.


This command has no meaning or effect unless the routing protocol is running on the interface through the network commands.

Resource URI

Verb
URI

PUT

/api/v1/routing-svc/ {routing-protocol}/{routing-protocol-id}/passive/{if-id}

Example: Disabling sending routing updates on GigabitEthernet1

JSON Request

PUT /api/v1/routing-svc/eigrp/100/passive/GigabitEthernet1
Content-type: application/json
Accept: application/json
 
{
"passive": true
}

JSON Response

204 No Content

Retrieve a Passive Interface

Resource URI

Verb
URI

GET

/api/v1/routing-svc/ {routing-protocol}/{routing-protocol-id}/passive/{if-id}

 

URI Property
Description

{routing-protocol-id}

ospf or eigrp

Example for OSPF

JSON Request

GET /api/v1/routing-svc/ospf/100/passive/GigabitEthernet1
Accept: application/json

JSON Response

200 OK
Content-type: application/json
 
{
"kind": "object#passive-interface",
"routing-protocol-id": "100",
"routing-protocol-type": "ospf",
"if-name": "GigabitEthernet1",
"passive": true
}

Example for EIGRP

JSON Request

GET /api/v1/routing-svc/eigrp/passive/GigabitEthernet1
Accept: application/json

JSON Response

200 OK
Content-type: application/json
 
{
"kind": "object#passive-interface",
"routing-protocol-id": "100",
"routing-protocol-type": "eigrp",
"if-name": "GigabitEthernet1",
"passive": true,
"virtual-instance-name": "Instance01"
}

Routing Table Display

The routing table may be larger than the HTTP response can handle, so the REST client needs to indicate the range and size of the routes in the HTTP GET request.

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties

Property
Type
Description

kind

string

Object type. Always “collection#route-entry”

end-of-table

boolean

“true” if this is the last of the route entry and/or there is no more. “false” if there are more route entries in the global routing table.

items

array

List of object#route-entry

routing-protocol

string

Protocol that derived the route.

  • Application route.
  • Connected route.
  • Static route.
  • BGP route.
  • Mobile route.
  • RIP route.
  • OSPF route.
  • ISIS route.
  • EIGRP route.
  • OSPFv3 route.
  • ODR route.
  • HSRP route.
  • NHRP route.
  • LISP route.
  • IPv6 NEMO route.
  • IPv6 ND route.
  • IPv6 RPL route.

route-type

string

  • OSPF route type, route within an area.
  • OSPF route type, route across different areas.
  • OSPF external route of type 1.
  • OSPF external route of type 1.
  • OSPF NSSA external route of type 1.
  • OSPF NSSA external route of type 2.
  • BGP internal routes(iBGP)
  • BGP external routes (iBGP)
  • BGP local routes.
  • BGP internal routes(iBGP) or BGP external routes or BGP local routes.
  • IS-IS level-1 route.
  • IS-IS level-1 route.
  • IS-IS level-2 route.
  • IS-IS level-1 inter area route.
  • IGRP2 derived routes.
  • IGRP2 redestributed routes.

network

cidr

Network in CIDR format x.x.x.x/nn

admin-distance

string

The administrative distance of the information source.

metric

number

Metric for the route

next-hop-router

ipaddress

Specifies the address of the next router to the remote network.

outgoing-interface

string

Specifies the through which the specified network can be reached.

URI Parameters

Parameter
Type
Description

start-prefix

string

Start prefix in CIDR format x.x.x.x/nn.

range-type

string

"eq-or-gt" (equal or greater) or "gt" (greater) relative to the start-prefix.

count

number

The number of routes to be returned

Retrieve the Global Routing Table

Resource URI

Verb
URI

GET

/api/v1/routing-svc/ routing-table?start-prefix={cidr}&range-type={string}&count={number}

Example 1

JSON Request

GET /api/v1/routing-svc/routing-table?start-prefix=0.0.0.0/0& range-type=eq-or-gt&count=2

JSON Response

200 ok
 
Content-type: application/json
 
{
"kind": "collection#route-entry",
"items": [
{
"kind": "object#route-entry",
"routing-protocol": "OSPF",
"route-type": "E1",
"network": "172.50.0.0/16",
"distance": 160,
"metric": 5,
"next-hop-router": "10.19.254.6",
"outgoing-interface": "GigabitEthernet2"
},
{
"kind": "object#route-entry",
"routing-protocol": "BGP",
"route-type": "",
"network": "173.50.24.0/24",
"distance": 160,
"metric": 5,
"next-hop-router": "10.19.254.6",
"outgoing-interface": "GigabitEthernet2"
}
]
"end-of-table": false
}
 

Example 2

JSON Request

GET /api/v1/routing-svc/routing-table?start-prefix=173.50.24.0/24&range-type=gt&count=1
Accept: application/json

JSON Response

200 ok
 
Content-type: application/json
 
{
"kind": "collection#route-entry",
"items": [
{
"kind": "object#route-entry",
"routing-protocol": "OSPF",
"route-type": "E1",
"network": "173.50.0.0/16",
"admin-distance": 160,
"metric": 5,
"next-hop-router": "10.19.254.6",
"outgoing-interface": "GigabitEthernet2"
}
],
"end-of-table": true
}

Static Route Resource

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Properties

Property
Type
Description

kind

string

Must be "object#static-route"

destination-network

string

Destination network in CIDR format x.x.x.x/nn

next-hop-router

ipaddress

IP address in x.x.x.x format or outgoing interface name (gigEthernet 0).

outgoing-interface

string

Outgoing interface name (gigabitEthernet1). Optional if next-hop is specified.

admin-distance

number

1-255. When there are multiple routes to the same destination, the route with the smaller admin-distance value is chosen. The smaller the admin-distance, the higher the preference. Default is 1. Optional.

JSON Representation for Static Route

{
"kind": "object#static-route",
"destination-network": "{string}",
"next-hop-router": "{ipaddress}",
"outgoing-interface": "{string}",
"admin-distance": {number}
}

Configure a Static Route

Resource URI

Verb
URI

POST

/api/v1/routing-svc/static-routes

The static route is identified by both the prefix (CIDR) and next hop. Next hop could be an interface, an IP address or both.

Example

JSON Request

POST /api/v1/routing-svc/static-routes
 
Content-type: application/json
Accept: application/json
 
{
"destination-network": "20.20.20.20/32",
"next-hop-router":"30.30.30.1",
"outgoing-interface": "gigabitEthernet1",
"admin-distance": 3
}

JSON Response

201 Created
Location: http://host/api/v1/routing-svc/static-routes/20.20.20.20_32_30.30.30.1_gig1

Retrieve a Static Route

Resource URI

Verb
URI

GET

/api/v1/routing-svc/static-routes/{destination-network_next-hop}

GET

/api/v1/routing-svc/static-routes/{destination-network_intf-name }

GET

/api/v1/routing-svc/static-routes/{destination-network_next-hop_intf-name}

Example

JSON Request

GET /api/v1/routing-svc/static-routes/20.20.20.20_32_30.30.30.1
Accept: application/json

JSON Response

200 ok
 
Content-type: application/json
{
"kind": "object#static-route",
"destination-network": "20.20.20.20/32",
"next-hop-router":"30.30.30.1"
}

Retrieve All the Static Routes

This API retrieves only static routes that are in the routing information base (RIB).

Resource URI

Verb
URI

GET

/api/v1/routing-svc/static-routes

Properties for Retrieve All

Property
Type
Description

kind

string

Must be “collection#static-route”

items

array

Array of static route json objects

JSON Representation for Retrieve All

{
"kind": "collection#static-route",
"items": [ { json object of kind object#static-route } ]

}

Example

JSON Request

GET /api/v1/routing-svc/static-routes
Accept: application/json

JSON Response

200 ok
 
Content-type: application/json
{
"kind": "collection#static-route",
"items": [
{
"kind": "object#static-route",
"destination-network": "20.20.20.20/32",
"next-hop-router":"30.30.30.1",
"outgoing-interface": "gigabitEthernet1",
"admin-distance": 3
},
{
"kind": "object#static-route",
"destination-network": "20.20.20.20/32",
"next-hop-router":"20.30.30.1",
"admin-distance": 5
}
]
}

Delete a Static Route

History

 

Release
Modification

IOS XE 3.10

Introduced for the CSR1000V platform

IOS XE 3.14

Introduced for ASR1001-X and ASR1002-X platforms

Resource URI

Verb
URI

DELETE

/api/v1/routing-svc/static-routes/{destination-network_next-hop}

DELETE

/api/v1/routing-svc/static-routes/{destination-network_intf-name }

DELETE

/api/v1/routing-svc/static-routes/{destination-network_next-hop_intf-name}

Example

JSON Request

DELETE /api/v1/routing-svc/static-routes/20.20.20.20_32_30.30.30.1
Accept: application/json

JSON Response

204 No Content