Methods
SetIP
The SetIP method inserts the given IP in the specific interface, replacing the existing ones (if any). It means, old addresses of the IP will be removed and it will contain only the new one. It accepts both ipv4 and ipv6 addresses.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/ip/setIP | |
Method | POST | |
Body Parameter | SetIPAddressRequest | IpAddressRequest, containing the LogicalDevice where to set the IP address and the IPProtocolEndpoint, containing the new address of the logical device (ipv4 and ipv6 supported) |
Return | - |
Body Example
Following example would set 192.168.1.111/24 address to interface fe-0/3/3.1
<?xml version="1.0" encoding="UTF-8"?> <setIpAddressRequest> <ipProtocolEndpoint> <IPv4Address>192.168.1.111</IPv4Address> <subnetMask>255.255.255.0</subnetMask> </ipProtocolEndpoint> <logicalDevice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="networkPort"> <name>fe-0/3/3</name> <portNumber>1</portNumber> </logicalDevice> </setIpAddressRequest>
SetIPv4
The SetIPv4 method inserts the given IP in the specific interface, replacing the existing ones (if any). It means, old addresses of the IP will be removed and it will contain only the new one. It accepts only IPv4 addresses.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/ip/setIPv4 | |
Method | POST | |
Body Parameter | SetIPAddressRequest | IpAddressRequest, containing the LogicalDevice where to set the IP address and the IPProtocolEndpoint, containing the new address of the logical device (only ipv4) |
Return | - |
Body Example
Following example would set 192.168.1.111/24 address to interface fe-0/3/3.1
<?xml version="1.0" encoding="UTF-8"?> <setIpAddressRequest> <ipProtocolEndpoint> <IPv4Address>192.168.1.111</IPv4Address> <subnetMask>255.255.255.0</subnetMask> </ipProtocolEndpoint> <logicalDevice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="networkPort"> <name>fe-0/3/3</name> <portNumber>1</portNumber> </logicalDevice> </setIpAddressRequest>
SetIPv6
The SetIPv4 method inserts the given IP in the specific interface, replacing the existing ones (if any). It means, old addresses of the IP will be removed and it will contain only the new one. It accepts only IPv4 addresses.
Value | Description | |
---|---|---|
URL | http://hostname:8888/opennaas/router/{resourceName}/ip/setIPv6 | |
Method | POST | |
Body Parameter | SetIPAddressRequest | IpAddressRequest, containing the LogicalDevice where to set the IP address and the IPProtocolEndpoint, containing the new address of the logical device (ipv6 only) |
Return | - |
Body Example
Following example would set 2067:f0d0:1002:51::4/32 address to interface fe-0/3/3.1
<?xml version="1.0" encoding="UTF-8"?> <setIpAddressRequest> <ipProtocolEndpoint> <IPv6Address>2607:f0d0:1002:51::4</IPv6Address> <prefixLength>32</prefixLength> </ipProtocolEndpoint> <logicalDevice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="networkPort"> <name>fe-0/3/3</name> <portNumber>1</portNumber> </logicalDevice> </setIpAddressRequest>