Action |
Method |
Payload Required |
API |
---|---|---|---|
To define a default gateway |
PUT |
Yes |
/api/running/switch/ip/default-gateway |
To restore the default configuration |
DELETE |
No |
/api/running/switch/ip/default-gateway |
To show the default gateway |
GET |
No |
api/running/switch/ip/default-gateway |
Example for IP Gateway APIs Payload
<default-gateway><gateway>169.254.1.3</gateway></default-gateway>
Property |
Type |
Description |
Mandatory/Default Value |
---|---|---|---|
gateway |
String |
Specifies the default gateway IP address |
Yes |
Example: PUT IP Gateway APIs
curl -k -u admin:admin -d "<default-gateway><gateway>169.254.1.3</gateway></default-gateway>" -X PUT https://209.165.201.1/api/running/switch/ip/default-gateway -H "Content-Type: application/vnd.yang.data+xml"
Example: DELETE IP Gateway APIs
curl -k -u admin:admin -X DELETE https://209.165.201.1/api/running/switch/ip/default-gateway
Example: GET IP Gateway APIs
curl -k -u admin:admin -X GET "https://209.165.201.1/api/running/switch/ip/default-gateway"
IP Route APIs
Action |
Method |
Payload Required |
API |
---|---|---|---|
To enable static routes |
PUT |
Yes |
/api/running/switch/ip/routing |
To add a static route |
PUT |
Yes |
/api/running/switch/ip/route |
To remove a static route |
DELETE |
No |
/api/running/switch/ip/route/ip-route-forwarding-list |
Example for IP Route APIs Payload
<routing></routing>
Example for IP Route APIs Payload
<route><ip-route-forwarding-list><prefix>2.2.2.2</prefix><mask>255.255.255.255</mask><forwarding-address>5.5.5.1</forwarding-address></ip-route-forwarding-list></route>
Example: PUT IP Route APIs
curl -k -u admin:admin -d "<routing></routing>" -X PUT https://209.165.201.1/api/running/switch/ip/routing -H "Content-Type: application/vnd.yang.data+xml"
Example: PUT IP Route APIs
curl -k -u admin:admin -d "<route><ip-route-forwarding-list><prefix>2.2.2.2</prefix><mask>255.255.255.255</mask><forwarding-address>5.5.5.1</forwarding-address></ip-route-forwarding-list></route>" -X PUT https://209.165.201.1/api/running/switch/ip/route -H "Content-Type: application/vnd.yang.data+xml"
Example: DELETE IP Route APIs
curl -k -u admin:admin -X DELETE https://209.165.201.1/api/running/switch/ip/route/ip-route-forwarding-list/2.2.2.2,255.255.255.255,5.5.5.1