...
- Export Restful API interface to support configuration of MWAN3, Firewall & NAT, IpSec.
- Site-to-Site tunnels across edges & edges & central orchestrators and application managers
Architecture
SDEWAN CNF enhances OpenWRT Luci web interface with SDEWAN controllers to provide Restful API for network functions' configuration and control.
CNF includes below modules:
- MWAN3: mwan3 configuration for multiple WAN links’ management
- Firewall: fw3 configuration for firewall rule, NAT rule.
- IpSec: strongswan configuration to setup security tunnel between CNFs
- DNS/DHCP: dnsmasq configuration for DNS and DHCP (ip4) or odhcpd configuration for DHCP (ip6)
- BGP/OSPF: bird configuration for BGP/OSPF auto routing
- Service: manage (e.g. start, stop, restart etc.) lifecycle of network function applications (e.g. mwan3, fw3, strongswan etc.)
- Runtime States: exports system log for debugging
APIs
Common Error code:
Code | Description |
---|---|
400 | Bad request |
401 | unauthorized -the security token is not provides or expired. |
404 | resource not found |
...
- Normal response codes: 200
Response Parameters
Name In Type Description services body array a list of supported service - Response Example
{
"services": ["mwan3", "firewall", "ipsec"]
}
...
SDEWAN Interface
SDEWAN interfaces interface API provide network interfaces information and control to up/down a network interface
...
Request:
Request Parameters
Name In Type Description interface path string interface name, e.g. "eth0" action body string action to be executed. valid value are "up", "down" Request Example
{
"action": "up"
}
Response
- Normal response code: 200
- Error response code: 400 (e.g. invalid action), 404 (e.g. interface not found)
Response Parameters
Name In Type Description result body string operation execution result Response Example
{
"result": "success"
}
GET /cgi-bin/luci/sdewan/v1/interfaces
...
- Normal response codes: 200
Response Parameters
Name In Type Description interfaces body array a list of available network interfaces ip_address body array ip address of the interface ip6_address body array ipv6 address of the interface mac_address body string mac address of the interface status body string interface status, valid value are "UP", "DOWN" received_packets body string number of received packets send_packets body string number of send packaets - Response Example
{"interfaces": [
{ "ip_address: ["10.0.0.1"],
"name":"eth0",
"status":"UP",
"send_packets":"19148",
"mac_address":"22:22:22:22:22:22",
"receive_packets":"20923" }
]}
GET /cgi-bin/luci/sdewan/v1/interfaces/{interface-name}
...
- Normal response codes: 200
Response Parameters
Name In Type Description interface-name path string interface name ip_address body array ip address of the interface ip6_address body array ipv6 address of the interface mac_address body string mac address of the interface status body string interface status, valid value are "UP", "DOWN" received_packets body string number of received packets send_packets body string number of send packaets - Response Example
{ "ip_address: ["10.0.0.1"],
"name":"eth0",
"status":"UP",
"send_packets":"19148",
"mac_address":"22:22:22:22:22:22",
"receive_packets":"20923" }
MWAN3
OpenWRT MWAN3 configuration includes below sections:
...