ipmininet.cli module

An enhanced CLI providing IP-related commands

class ipmininet.cli.IPCLI(mininet, stdin=<_io.TextIOWrapper name='<stdin>' mode='r' encoding='UTF-8'>, script=None, **kwargs)

Bases: mininet.cli.CLI

Start and run interactive or batch mode CLI mininet: Mininet network object stdin: standard input for CLI script: script to run in batch mode

default(line: str)

Called on an input line when the command prefix is not recognized. Overridden to run shell commands when a node is the first CLI argument. Past the first CLI argument, node names are automatically replaced with corresponding addresses if possible. We select only one IP version for these automatic replacements. The chosen IP version chosen is first restricted by the addresses available on the first node. Then, we choose the IP version that enables every replacement. We use IPv4 as a tie-break.

do_ip(line: str)

ip IP1 IP2 …: return the node associated to the given IP

do_ips(line: str)

ips n1 n2 …: return the ips associated to the given node name

down/up the link between 2 specified routers, can specify multiple multiple link :param line: the router name between which the link as to be

downed/up: r1 r2, r3 r4 [down/up]
do_ping4all(line)

Ping (IPv4-only) between all hosts.

do_ping4pair(_line)

Ping (IPv4-only) between first two hosts, useful for testing.

do_ping6all(line)

Ping (IPv4-only) between all hosts.

do_ping6pair(_line)

Ping (IPv6-only) between first two hosts, useful for testing.

do_route(line: str = '')

route destination: Print all the routes towards that destination for every router in the network