The information contained in this document is subject to change. This document contains proprietary information, which is protected by copyright
laws. All rights are reserved. No part of this document may be photocopied, reproduced or translated to another language or program language
without prior written consent of RFI Engineering B.V.
RefGuide_U-routerNGW_v1.01.docx
Page: 46(
57)
14.8 Interface
The ‘
interface
’ endpoints provide information about all IP interfaces on the U-router NGW. You
can retrieve or set the interface IP configuration for the Ethernet, mobile and virtual interfaces on
the unit.
ENDPOINTS
GET /api/interface
POST /api/interface
You can use the
GET /api/interface
endpoint to retrieve the status of the interfaces.
For example:
curl https://192.168.168.1/api/interface -u rfi:rfi123
Returns:
{
"interfaces": [{
"id": "eth0",
"mac": "40:28:14:fe:dd:b7",
"state": "up",
"method": "static",
"ip": "192.168.168.1",
"mask": "255.255.255.0",
"metric": "125",
"defaultGateway": "192.168.168.253",
"nameServer1": "192.168.168.42",
"nameServer2": "62.140.138.233"
}, {
"id": "wwan0",
"mac": "",
"state": "up",
"ip": "109.33.58.206",
"mask": "255.255.255.252",
"gateway": "109.33.58.205",
"metric": "25"
}, {
"id": "tun0",
"state": "down",
"ip": "0.0.0.0"
}, {
"id": "ppp0",
"state": "down",
"ip": "0.0.0.0"
}],
"status": "OK"
}
You can use the POST /api/interface endpoint to set the parameters of interface identified by the
‘id’.
The possible POST parameters are:
method
Sets the interface either to ‘static’ or ‘dhcp’. When set
to static you must also specify the ‘ip’ together with
‘mask’
ip
The IP address of the interface, when method is set to
‘static’.
mask
The netmask of the interface when method is set to ‘static’
metric
Metric is the value that is assigned to an IP route for a
particular network interface that identifies the cost that
is associated with using that route. The lower the value,
the higher the preference for this interface.