3

I want to use mininet to test a small network with some asymmetric links, but I have not found any information about it. Could someone have an idea to simulate these kind of links.

gsamaras
  • 71,951
  • 46
  • 188
  • 305

1 Answers1

0

It is possible to set different limitations to the different interfaces of the same link. As this link suggests, assuming that in your topology you have created a host connected to a switch, like this :

switch1 = self.addSwitch('s1')
host1 = self.addHost('h1')
self.addLink(host1, switch1, bw = 1000) 

you can set different bandwidth to one of the host's interfaces like this :

intf = h1.intf()
info( "Setting BW Limit for Interface " + str(intf) + " to " + str(TARGET_BW) + "\n" )
intf.config(bw = TARGET_BW, smooth_change = True)   //smooth_change=True or False

assuming that you have defined something like :

TARGET_BW = 500

after your imports.

Marievi
  • 4,951
  • 1
  • 16
  • 33