Mininet: REST API
Mininet is an excellent extensible network emulation tool, however, currently is designed for human input...
Get Nodes
GET
http://localhost/mn/api/nodes
This endpoint allows you to get a list of nodes within the topology.
Query Parameters
class
string
Only return nodes of a given python class
{
"c0": {
"class": "Controller"
},
"h2": {
"class": "Host"
},
"s1": {
"class": "OVSSwitch"
},
"h1": {
"class": "Host"
}
}
Get Node Information
GET
http://localhost/mn/api/node/:node_name
Get the information regarding a given node
Path Parameters
node_name
string
The name of the node to get get the information of
{
"ips": [
"10.0.0.1"
],
"macs": [
"96:03:52:ef:ba:39"
],
"class": "Host",
"name": "h1"
}
Ping a Host Set
GET
http://localhost/mn/api/pingset
Run a ping to a host pair matrix
Query Parameters
hosts
string
a comma-separated set of host names
{
"h2-h1": {
"received": 1,
"rtt_avg": 4.764,
"sender": "h2",
"sent": 1,
"target": "h1"
},
"h1-h2": {
"received": 1,
"rtt_avg": 4.708,
"sender": "h1",
"sent": 1,
"target": "h2"
}
}
Ping all hosts
GET
http://localhost/mn/api/pingall
Ping a complete host set
{
"h2-h1": {
"received": 1,
"rtt_avg": 3.37,
"sender": "h2",
"sent": 1,
"target": "h1"
},
"h1-h2": {
"received": 1,
"rtt_avg": 2.682,
"sender": "h1",
"sent": 1,
"target": "h2"
}
}
Run iperf between 2 hosts
GET
http://localhost/mn/api/iperf
Query Parameters
time
integer
number of seconds to run for ( >0, < 31)
type
string
l4 type to run [tcp, udp]
client
string
host to run as iperf client
server
string
host to run as iperf server
{
"server": "h1",
"client": "h2",
"server_speed": "13243 Mbits/sec",
"client_speed": "13256 Mbits/sec",
"traffic_type": "TCP",
"seconds": 1
}
Last updated
Was this helpful?