Posts

Showing posts from March, 2013

[mininet] A simple example to build your own topology in mininet

Well, first of all I want to thank my colleague to giving me an example to build myself topology. It is very simple. Everyone can modify it and do your own topology with OpenFlow Controller.
Second, due to introducing switch cluster concept in Floodlight Controller, I will provide a simple example to give switch clusters in topology.

my_topology.py


frommininet.topoimportTopoclassMyTopo(Topo):"Simple topology example."def__init__(self):"Create custom topo."# Initialize topologyTopo.__init__(self)h1=self.addHost('h1')h2=self.addHost('h2')h3=self.addHost('h3')h4=self.addHost('h4')h5=self.addHost('h5')h6=self.addHost('h6')s1=self.addSwitch('s1')s2=self.addSwitch('s2')s3=self.addSwitch('s3')s4=self.addSwitch('s4')s5=self.addSwitch('s5')s6=self.addSwitch('s6')s7=self.addSwitch('s7')self.addLink(s1,s2)self.addLink(s1,s3)self.addLink(s2,s3)self.addLink(s2,s4)self.addLink(s…

[astyle] A tool to format your source code

This is a good tool to consist your code style in some kind of programming languages, such as C, C++, C#, and Java.
http://astyle.sourceforge.net/astyle.html