Demo entry 6645302



Submitted by anonymous on Oct 09, 2017 at 21:26
Language: Python 3. Code size: 631 Bytes.

class DumbbellTopo(Topo):
    "Dumbbell topology for Shrew experiment"
    def build(self):
    	#TODO:Add your code to create the topology.
    	#Add 2 switches
    	s2 = self.addSwitch('s2')
        s3 = self.addSwitch('s3')

    	#Left Side
    	n0 = self.addHost('n0')
    	n1 = self.addHost('n1')
        self.addLink(n0, s2, bw=16, delay='2ms')
    	self.addLink(n1, s2, bw=24, delay='2ms')

    	#Right Side
    	n4 = self.addHost('n4')
    	n5 = self.addHost('n5')
        self.addLink(n4, s3, bw=16, delay='2ms')
    	self.addLink(n5, s3, bw=16, delay='2ms')

self.addLink(s2, s3, bw=9.6, delay='10ms')

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).