PUT /aicc/network/routes

Use the method to configure the Lenovo XClarity Administrator route settings.

Authentication

Authentication with user name and password is required.

Request URL

PUT https://<management_server_IP>/aicc/network/routes

Query parameters

None

Request body

Attributes Required / Optional Type Description
routes Required Array Information about network routes
  destination Optional String Destination IPv4 or IPv6 address for this route
  dev Required String Interface to be used to connect to the device that is specified by nexthop (either "eth0" or "eth1")
  ip_version Required Integer IP version of this route. This value is either "4" or "6."
  nexthop Required String IP address of the router to be used to forward packets to the address that is specified by destination
  prefix_len Optional Integer Number of bits in the network mask, or the prefix that is to be applied to the device that is specified by destination to get the subnet. This can be one of the following values.
  • 0. Default route.
  • 32. If the value of ip_version is 4, this indicates a host route.
  • 128. If the value of ip_version if 6, this indicates a host route.

All other values are network routes.

Request example

This example request sets the IPv4 default route.
{
    "routes": [{
        "ip_version": 4,
        "nexthop": "192.168.56.1",
        "prefix_len": 0
    },
    {
        ...
    }]
}
This example request sets an IPv4 route.
{
    "routes": [{
        "destination": "100.10.10.10",
        "dev": "eth0",
        "ip_version": 4,
        "nexthop": "192.168.56.1",
        "prefix_len": 32
    },
    {
        ...
    }]
}
This example request sets the default IPv6 route.
{
    "routes": [{
        "ip_version": 6,
        "nexthop": "2002:97b:c2bb:83d:5054:ff:fe2c:eefe",
        "prefix_len": 0
        
    },
    {
        ...
    }]
}
This example request sets an IPv6 route.
{
    "routes": [{
        "destination": "2002:97b:c2bb:83d::",
        "dev": "eth1",
        "ip_version": 6,
        "nexthop": "2002:97b:c2bb:83d:5054:ff:fe2c:eefe",
        "prefix_len": 64
    }],
    {
        ...
    }]
}

Response codes

Code Description
200 OK
400 Bad request

Response body

None