Configuring RPM for IPv4

Setting the Next-Hop Address

Setting the Next-Hop Address
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
  "children": [
    {
      "rtmapRule": {
        "attributes": {
          "name": "map1"
        },
        "children": [
          {
            "rtmapEntry": {
              "attributes": {
                "action": "permit",
                "order": "10"
              },
              "children": [
                {
                  "rtmapSetNh": {
                    "attributes": {
                      "addr": "1.2.3.4"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>map1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <nh-items>
              <SetNh-list>
                <addr>1.2.3.4</addr>
              </SetNh-list>
            </nh-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Specifies where output packets that pass a match clause of a route map for policy routing. In this example, the IP address is set to 1.2.3.4.

Note: This example was added in Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map map1 permit 10
 set ip next-hop 1.2.3.4

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Deleting the Next-Hop Address

Deleting the Next-Hop Address
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
  "children": [
    {
      "rtmapRule": {
        "attributes": {
          "name": "map1"
        },
        "children": [
          {
            "rtmapEntry": {
              "attributes": {
                "action": "permit",
                "order": "10"
              },
              "children": [
                {
                  "rtmapSetNh": {
                    "attributes": {
                      "addr": "1.2.3.4",
                      "status": "deleted"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>map1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <nh-items>
              <SetNh-list xc:operation="delete">
                <addr>1.2.3.4</addr>
              </SetNh-list>
            </nh-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Note: This example was added in Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map map1 permit 10
 no set ip next-hop 1.2.3.4

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Configuring Next-Hop Order as Per CLI Configuration

Configuring Next-Hop Order as Per CLI Configuration
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
  "topSystem": {
    "children": [
      {
        "rpmEntity": {
          "children": [
            {
              "rtmapRule": {
                "attributes": {
                  "name": "Map_1"
                },
                "children": [
                  {
                    "rtmapEntry": {
                      "attributes": {
                        "action": "permit",
                        "forceOrderV4": "enabled",
                        "order": "10"
                      },
                      "children": [
                        {
                          "rtmapSetNh": {
                            "attributes": {
                              "addr": "2.4.6.8"
                            }
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  }
}
{
    "imdata": []
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>Map_1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <forceOrderV4>enabled</forceOrderV4>
            <nh-items>
              <SetNh-list>
                <addr>2.4.6.8</addr>
              </SetNh-list>
            </nh-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Note: This example was added in Release 7.0(3)I7(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map Map_1
 set ip next-hop 2.4.6.8 force-order

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html

Deleting Next-Hop Order as Per CLI Configuration

Deleting Next-Hop Order as Per CLI Configuration
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
  "rpmEntity": {
    "children": [
      {
        "rtmapRule": {
          "attributes": {
            "name": "Map_1"
          },
          "children": [
            {
              "rtmapEntry": {
                "attributes": {
                  "action": "permit",
                  "loadShareV4": "disabled",
                  "order": "10"
                },
                "children": [
                  {
                    "rtmapSetNh": {
                      "attributes": {
                        "addr": "2.4.6.8",
                        "status": "deleted"
}}}]}}]}}]}}
{
    "imdata": []
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>Map_1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <loadShareV4>disabled</loadShareV4>
            <nh-items>
              <SetNh-list xc:operation="delete">
                <addr>2.4.6.8</addr>
              </SetNh-list>
            </nh-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Note: This example was added in Release 7.0(3)I7(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map Map_1
 no set ip next-hop 2.4.6.8 force-order

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html

Configuring Load Sharing

Configuring Load Sharing
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
  "rpmEntity": {
    "children": [
      {
        "rtmapRule": {
          "attributes": {
            "name": "Map_1"
          },
          "children": [
            {
              "rtmapEntry": {
                "attributes": {
                  "action": "permit",
                  "loadShareV4": "enabled",
                  "order": "10"
                },
                "children": [
                  {
                    "rtmapSetNh": {
                      "attributes": {
                        "addr": "2.4.6.8"
}}}]}}]}}]}}
{
    "imdata": []
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>Map_1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <loadShareV4>enabled</loadShareV4>
            <nh-items>
              <SetNh-list>
                <addr>2.4.6.8</addr>
              </SetNh-list>
            </nh-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Note: This example was added in Release 7.0(3)I7(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map Map_1
 set ip next-hop 2.4.6.8 load-share

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html

Deleting Load Sharing Configuration

Deleting Load Sharing Configuration
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
  "rpmEntity": {
    "children": [
      {
        "rtmapRule": {
          "attributes": {
            "name": "Map_1"
          },
          "children": [
            {
              "rtmapEntry": {
                "attributes": {
                  "action": "permit",
                  "loadShareV4": "disabled",
                  "order": "10"
                },
                "children": [
                  {
                    "rtmapSetNh": {
                      "attributes": {
                        "addr": "2.4.6.8",
                        "status": "deleted"
}}}]}}]}}]}}
{
    "imdata": []
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>Map_1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <loadShareV4>disabled</loadShareV4>
            <nh-items>
              <SetNh-list xc:operation="delete">
                <addr>2.4.6.8</addr>
              </SetNh-list>
            </nh-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Note: This example was added in Release 7.0(3)I7(3).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map Map_1
 no set ip next-hop 2.4.6.8 load-share

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html

Setting the Next-Hop Address to Unchanged for eBGP Sessions Only

Setting the Next-Hop Address to Unchanged for eBGP Sessions Only
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
  "children": [
{
  "rtmapRule": {
    "attributes": {
      "name": "map1"
},
"children": [
  {
    "rtmapEntry": {
      "attributes": {
        "action": "permit",
        "order": "10"
},
  "children": [
{
  "rtmapSetNhPeerAddr": {
    "attributes": {
      "v4Unchange": "enabled"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>map1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <nhpa-items>
              <v4Unchange>enabled</v4Unchange>
            </nhpa-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Note: This example was added in Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map map1 permit 10
 set ip next-hop unchanged

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html

Disabling the Next-Hop Address Set to Unchanged for eBGP Sessions Only

Disabling the Next-Hop Address Set to Unchanged for eBGP Sessions Only
POST http://<mgmt0_IP>/api/mo/sys/rpm.json
{
"rpmEntity": {
  "children": [
    {
      "rtmapRule": {
        "attributes": {
          "name": "map1"
        },
        "children": [
          {
            "rtmapEntry": {
              "attributes": {
                "action": "permit",
                "order": "10"
              },
              "children": [
                {
                  "rtmapSetNhPeerAddr": {
                    "attributes": {
                      "v4Unchange": "disabled"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <rpm-items>
    <rtmap-items>
      <Rule-list>
        <name>map1</name>
        <ent-items>
          <Entry-list>
            <order>10</order>
            <action>permit</action>
            <nhpa-items>
              <v4Unchange>disabled</v4Unchange>
            </nhpa-items>
          </Entry-list>
        </ent-items>
      </Rule-list>
    </rtmap-items>
  </rpm-items>
</System>

Note: This example was added in Release 7.0(3)I7(2).


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.

route-map map1 permit 10
 no set ip next-hop unchanged

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html