Skip to content

Node Classes

carlosmscabral edited this page Jul 21, 2013 · 15 revisions

Home | Installing | Tutorial | GUI | Node Classes | Topology Generators |Routing | Publications | Related Projects


Below we show a simple class diagram with the node classes implemented by Mini-CCNx:

class

Mini-CCNx brings three new nodes to Mininet: CCNHost, CPULimitedCCNHost and CCNRouter (the blue ones in the figure).

CCNHost

Extends the basic Host class.

  • Configures the ccnd socket, log file, port and starts the ccnd daemon;
  • From the parser, configures two news parameters for the host: FIB (Forwarding Information Base) and APP (application that will run on this node);
  • Builds IP connectivity to other CCNHosts;
  • Implements methods for manually inserting and removing FIB entries;
  • When terminated, is responsible for shutting down the ccnd daemon and cleaning up.

CCNRouter

Extends the CCNHost class

  • It is basically a CCNHost without an application. In CCN, there's no such difference between Hosts or Routers; they are all nodes. This was done here just to add the ability to specify a default application for a CCN node.

CPULimitedCCNHost

Extends the CPULimitedHost class.

  • Configures the ccnd socket, log file, port and starts the ccnd daemon;
  • From the parser, configures two news parameters for the host: FIB (Forwarding Information Base) and APP (application that will run on this node);
  • Builds IP connectivity to other CCNHosts;
  • Implements methods for manually inserting and removing FIB entries;
  • When terminated, is responsible for shutting down the ccnd daemon and cleaning up.
  • Responsible for holding the core and CPU parameters. Basically, each CPULimitedHost will be mapped into a cgroup with limited CPU and with permission to run in the specified core.

Limiting CPU usage

Using cgroups, you can emulate the limitation of resources to each node (that in the end will be a group of processes). This brings isolation to Mini-CCNx, providing high-fidelity behavior (as introduced by Mininet).

The CPU parameter is a given percentage. It will be multiplied by the number of cores in you machine. For example, if you have a 4-core machine, you have a total computing power of 400%. If you specify, in the Mini-CCNx configuration file, a percentage of CPU like

...
[routers]
s1: cpu=0.1
...

s1 will have a total 0.1 x 4 = 40% of the total CPU power of the machine, that is 400%.

Clone this wiki locally