Static Routes
Configures, modifies, and retrieves IP route configurations. The URI to configure data for static IP route is:
network-instances/network-instance/default-vrf/protocols/protocol/STATIC/icx-static/static-routes
Supported HTTP Operations
URL: https://<host>/restconf/data/network-instances/network-instance/default-vrf/protocols/protocol/STATIC/icx-static/static-routes
Request body: {
"static": [
{
"prefix": "xx.xx.xx.xx/32",
"config": {
"prefix": "xx.xx.xx.xx/32"
},
"next-hops": {
"next-hop": [
{
"index": "xx.xx.xx.xx",
"config": {
"index": "xx.xx.xx.xx",
"next-hop": "xx.xx.xx.xx",
"metric": 200
}
}
]
}
}
]
}
Response body: IP route gets reflected as below:
DUT1# sh running config | include ip route
ip route 0.0.0.0/0 xx.xx.xx.xx
ip route xx.xx.xx.xx/32 xx.xx.xx.xx distance 200
URL: https://<host>/restconf/data/network-instances/network-instance/default-vrf/protocols/protocol/STATIC/icx-static/static-routes
Request body: None
Response body: {
"openconfig-network-instance:static-routes" : {
"static" : [
{
"next-hops" : {
"next-hop" : [
{
"index" : "xx.xx.xx.xx",
"interface-ref" : {
"state" : {}
},
"config" : {
"next-hop" : "xx.xx.xx.xx",
"index" : "xx.xx.xx.xx",
"metric" : 200
},
"state" : {}
}
]
},
"config" : {
"prefix" : "xx.xx.xx.xx/32"
},
"state" : {},
"prefix" : "xx.xx.xx.xx/32"
}
]
}
}
URL: https://<host>/restconf/data/network-instances/network-instance/default-vrf/protocols/protocol/STATIC/icx-static/static-routes/static/xx.xx.xx.xx//32/next-hops
Request body:
{
"openconfig-network-instance:next-hops" : {
"next-hop" : [
{
"index" : "xx.xx.xx.xx",
"config" : {
"next-hop" : "xx.xx.xx.xx",
"index" : "xx.xx.xx.xx",
"metric" : 100
}
}
]
}
}
Response body: DUT1(config)# sh running config | include ip route
ip route 0.0.0.0/0 xx.xx.xx.xx
ip route xx.xx.xx.xx/32 ethernet 1/1/5
ip route xx.xx.xx.xx/32 xx.xx.xx.xx distance 200
ip route xx.xx.xx.xx/32 xx.xx.xx.xx distance 200
URL: https://<host>/restconf/data/network-instances/network-instance/default-vrf/protocols/protocol/STATIC/icx-static/static-routes
Request body:{
"openconfig-network-instance:static-routes": {
"static": [
{
"prefix": "xx.xx.xx.xx/32",
"config": {
"prefix": "xx.xx.xx.xx/32"
},
"next-hops": {
"next-hop": [
{
"index": "xx.xx.xx.xx",
"config": {
"index": "xx.xx.xx.xx",
"next-hop": "xx.xx.xx.xx",
"metric": 200
}
}
]
}
}
]
}
}
Response body: None
URL: https://<host>/restconf/data/network-instances/network-instance/default-vrf/protocols/protocol/STATIC/icx-static/static-routes/static/160.80.80.80//32/next-hops/next-hop/10.177.113.1
Request body: None
Response body: Unconfigure the static route.
GET:{
"openconfig-network-instance:static-routes" : {
"static" : [
{
null
}
]
}
}