6. Topology File explained

Topology input file is defined in YAML(Yet another Markup Language). YAML is human readable data serialization language , commonly used as configuraton file for applications.

Topology Object consists the following main sections,

6.1. name

name defines the topology name. Data type is string

Example:

name : Simple Star Topology 1

6.2. version

version defines the topology file schema version. The current version is 1.0.

Example:

version: 1.0

6.3. description

description is for detailed description of the topology. Its a multiline string.

Example:

description: |
  This topology consists of 4 nodes, and a switch.
  All Nodes are connected to a same switch.

6.4. controller

controller is a object defined for SDN Controller. This object contains url property. url defines the SDN Controller URL. Data type is string.

All the switches in the topology will be connected to this controller url.

Example:

controller:
  url: tcp:0.0.0.0:6633

6.5. openflow

openflow is a object defined for openflow protocol. This object contains version property. data type is number.

This openflow version is applied for all the switches in the topology.

Example:

openflow:
  version: 1.3

6.6. network

network is a list for defining the network objects. Each network object containes name and subnet property. KNet will manages the IP assignment to the nodes in this network. The network name will be used by the nodes object.

Example:

networks:
  -
    name: n1
    subnet: 10.1.1.0/24

6.7. qos

qos is a list for defining the qos object. Each qos object containes the name, bandwidth, latency, jitter, pktloss property. KNet use this qos object for applying qos in the link using linux traffic shaping tool.

qos object will be consumed by link object.

Example:

qos:
  -
    name: q1
    bandwidth: 100Mbps
    latency: 100ms
    jitter: 1ms
    pktloss: 0.5%

6.8. nodes

nodes object consists of list of nodes. Each node is represented with the name, image, network, ip, mac properties.

  1. name defines the node name. Its a mandatory parameter
  2. image defines the docker image for the node. Recommended value is “ubuntu:trusty” image. thats is ubuntu 14.04 version. Dont change it until unless you know about this. Its a mandatory parmeter
  3. network defines the network belongs to this node. if network is mentioned, IP will be automatically allocated from this network.
  4. ip defines the static ip for this node. The given ip will be assigned to the node. Either network or ip should present.
  5. mac defines the mac id for the interface. Its a optional parameter

Example1:

nodes:
  -
    name: a1
    image: ubuntu:trusty
    network: n1

Example2:

nodes:
  -
    name: a1
    image: ubuntu:trusty
    ip: 10.10.10.2/24
    mac: 00:00:00:00:00:01

6.9. switches

switches object consists of list of switches. Each switch is represented with the name proerty.

name defines the switch name. Its a mandatory parameter.

Example1:

switches:
  -
    name: switch1