Configuring an IPv4 Static Route
DME
YANG
Copy
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{ "ipv4Inst": { "children": [ { "ipv4Dom": { "attributes": { "name": "default" }, "children": [ { "ipv4Route": { "attributes": { "prefix": "192.0.0.0/8" }, "children": [ { "ipv4Nexthop": { "attributes": { "nhAddr": "192.0.2.4/32", "nhIf": "eth1/8", "nhVrf": "default", "pref": "1", "rtname": "StatRt5", "tag": "1234" }}}]}}]}}]}}
Response
{ imdata:[] }
Copy
<System> <ipv4-items> <inst-items> <dom-items> <Dom-list> <name>default</name> <rt-items> <Route-list> <prefix>192.0.0.0/8</prefix> <nh-items> <Nexthop-list> <nhIf>eth1/8</nhIf> <nhAddr>192.0.2.4/32</nhAddr> <nhVrf>default</nhVrf> <pref>1</pref> <rtname>StatRt5</rtname> <tag>1234</tag> </Nexthop-list> </nh-items> </Route-list> </rt-items> </Dom-list> </dom-items> </inst-items> </ipv4-items> </System>