...
To connect to a server agent you must issue the following HTTP post request:
|
To disconnect from a server agent you must issue the following HTTP post request:
|
Controller Configuration
The server device driver can monitor/modify the controller's information on a server on the fly.
To get the associated controller of a certain server, one could issue the following HTTP GET command:
|
A similar result could be achieved using the ONOS CLI as An example response follows:
...
onos:device-controllers rest:serverIp:serverPort
To set a (set of) controller(s) to a certain server, one could issue the following HTTP POST command:
...
{
"controllers":
[
{
"ip":"192.
...
16.125.
...
167",
"port":80,
"type":"tcp"
...
}
]
}
A similar result could be achieved using the ONOS CLI as
...
follows:
|
|
To set Finally, to delete a (set of) controller(s) from to a certain server, one could issue the following HTTP DELETE POST command:
|
|
If the command succeeds it returns: success
A similar result could be achieved using the ONOS CLI as follows:
|
|
|
Server System Operations
Finally, to delete a (set of) controller(s) from a server, one could issue an HTTP DELETE command to the resource 'delete_controllers' or an ONOS CLI command as follows:
|
Server System Operations
The driver supports a system-related operation which returns the time of the server as The driver supports a system-related operation which returns the time of the server as follows:
|
A similar result could be achieved using the ONOS CLI as An example response follows:
{
"time":1591261221344620712
}
A similar result could be achieved using the ONOS CLI as follows:
|
|
A reboot operation is also offered by this ONOS behavior, but the server driver does not implement it.
...
The resource discovery command issued by the device driver hits the following resource path on the server:
|
A server with 2 Intel CPU cores in one socket, 16 GB of DDR4 DRAM, and a single-port Mellanox 100 GbE NIC might provide the following response:
...
The CPU, main memory, and NIC monitoring command issued by the device driver hits the following resource path on the server:
|
...
A server with NICs in mode "flow" allows the server device driver to manage its rules.
To install a NIC rules rule on a server's NIC with instance name fd0, associated with CPU core 0, the device driver POST issues the following JSON HTTP POST command to the server's resource:
...
HTTP POST: http://serverIp/metron/rules
{
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
},
...
|
...
|
...
|
...
|
...
|
...
|
For your convenience the same rule is visualized below in a more user-friendly JSON format:
{
"rules":
[
"cpus":
[
{
"id":0,
{
"id": "5057dd63-93ea-42ca-bb14-8a5e37e214da",
"rulesrxFilter":
{
[ "method": "flow"
},
"nics":
{[
{
"idname": 54043196136729470"fd0",
"cpus":
"content":"ingress pattern eth type is[
2048 / src is 192.168.100.7 dst is 192.168.1.7 / udp src is 53 / end actions queue index 0 / count / end" {
"id":0,
} "rules":
] }[
] {
} ] } ]
}
Note that the "content" field contains a rule (with unique ID 54043196136729470) that follows the DPDK Flow API, as the NIC on this server is bound to a DPDK driver.
...
"id": 54043196136729470,
"content":"ingress pattern eth type is 2048 / src is 192.168.100.7
...
dst is 192.168.1.7
...
/ udp src is 53 / end actions queue index 0 / count / end"
The action of this rule redirects the matched packets to hardware queue with index 0.
This queue is associated with CPU core 0, as indicated by the "id" field in the "cpus" attribute.
NIC Rule Monitoring
The server device driver also performs periodic NIC rule monitoring, for those NICs in mode "flow".
The NIC rule monitoring command issued by the device driver hits the following resource path on the server:
...
HTTP GET: http://serverIp/metron/rules
A server with 1 NIC rule in NIC with name fd0 (associated with CPU core 0) might respond as follows:
{
"rules":
[
{}
"id":"5057dd63-93ea-42ca-bb14-8a5e37e214da",
"rxFilter":]
{
"method":"flow"
},
"nics":
[]
{}
]
"name":"fd0",}
"cpus":
[
{
"id":0,
"rules":
[
]
}
Note that the "content" field contains a rule (with unique ID 54043196136729470) that follows the DPDK Flow API, as the NIC on this server is bound to a DPDK driver.
The example rule matches packets with source IP address 192.168.100.7, destination IP address 192.168.1.7, and source UDP port 53.
The action of this rule redirects the matched packets to hardware queue with index 0.
This queue is associated with CPU core 0, as indicated by the "id" field in the "cpus" attribute.
NIC Rule Monitoring
The server device driver also performs periodic NIC rule monitoring, for those NICs in mode "flow".
The NIC rule monitoring command issued by the device driver hits the following resource path on the server:
|
A server with 1 NIC rule in NIC with name fd0 (associated with CPU core 0) might respond as follows:
{
"rules":
[
{
"id":"5057dd63-93ea-42ca-bb14-8a5e37e214da",
"rxFilter":
{
{
"method":"flow"
"id":54043196136729470},
"nics":
[
"content":"ingress pattern eth type is 2048 / ipv4 src is 192.168.100.7 dst is 192.168.1.7 / udp src is 53 / end actions queue index 0 / end"
{
"name":"fd0",
"cpus":
}[
{
]
}"id":0,
"rules":
[
{
"id":54043196136729470,
"content":"ingress pattern eth type is 2048 / ipv4 src is 192.168.100.7 dst is 192.168.1.7 / udp src is 53 / end actions queue index 0 / end"
}
]
}
]
}
]
}
]
}
NIC Rule Deletion
To delete the above rule (once it has successfully been installed) with unique ID 54043196136729470, the server device driver needs to hit the following path:
|
To delete multiple rules at once, you should append a comma-separated rule IDs as follows:
|
NIC Table Statistics
To retrieve statistics related to a server's NIC tables, the server device driver needs to hit the following path:
|
A server with 2 NICs and 3 rules installed in the first NIC might respond as follows:
{
"nics":
[
{
"id":0,
"table":
[
{
"id":0,
"activeEntries":3,
"pktsLookedUp":0,
"pktsMatched":0
}
]
}
{
"id":1,
"table":
[
{
"id":0,
"activeEntries":0,
"pktsLookedUp":0,
"pktsMatched":0
}
]
}
]
}
NIC Port Administration
To enable a NIC port, the server device driver needs to issue the following HTTP post command to a server:
|
If the command succeeds it returns: success
A similar result could be achieved using the ONOS CLI as follows:
|
Similarly, to disable a NIC port, the server device driver needs to issue the following HTTP post command to a server:
|
If the command succeeds it returns: success
A similar result could be achieved using the ONOS CLI as follows:
|
NIC Queue Configuration
The server device driver can also provide NIC queue configuration information through the following HTTP GET command:
|
An example response of a server with 1 100GbE NIC and 2 queues follows:
{
"nics":
[ ]
}
]{
}
]
}
NIC Rule Deletion
To delete the above rule (once it has successfully been installed) with unique ID 54043196136729470, the server device driver needs to hit the following path:
...
HTTP DELETE: http://serverIp/metron/rules_delete/
54043196136729470
To delete multiple rules at once, you should append a comma-separated rule IDs as follows:
...
HTTP DELETE: http://serverIp/metron/rules_delete/54043196136729470,54043196136729471
NIC Table Statistics
To retrieve statistics related to a server's NIC tables, the server device driver needs to hit the following path:
...
HTTP GET: http://serverIp/metron/rules_table_stats
NIC Port Administration
To enable a NIC port, the server device driver needs to issue the following HTTP post command to a server:
...
curl -X POST --data '{"port":0, "portStatus":"enable"}' --header "Content-Type: application/json" http://serverIp/metron/nic_ports
A similar result could be achieved using the ONOS CLI as follows:
...
onos:portstate rest:serverIp:serverPort nicID enable
Similarly, to disable a NIC port, the server device driver needs to issue the following HTTP post command to a server:
...
curl -X POST --data '{"port":0, "portStatus":"disable"}' --header "Content-Type: application/json" http://serverIp/metron/nic_ports
A similar result could be achieved using the ONOS CLI as follows:
...
onos:portstate rest:serverIp:serverPort nicID disable
NIC Queue Configuration
The server device driver can also provide NIC queue configuration information through the following HTTP GET command:
...
"id":0,
"queues":
[
{
"id":0,
"type":"MAX",
"maxRate":"100000"
},
{
"id":1,
"type":"MAX",
"maxRate":"100000"
}
]
}
]
}
This ONOS behavior also offers two additional methods, i.e., add/delete queue, but the server driver does not implement these methods.
...
To access the server device driver's UI click on the Menu button (top left corner on the ONOS UI), then select one of the tabs "Servers-CPU", "Servers-MemoryLatency", "Servers-ThroughputMemory", or "Servers-LatencyThroughput" at the bottom of the list in Section "Network" as shown in the figure below:
...