<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">This was an old post but I thought I should answer it in case someone else had the same problem. </pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">It appears that the problem must be that you're not specifying the link type as tc (which is required to modify link parameters). </pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0)">If you look at the example you've provided, notice how the parameter TCLink is passed in the following line:</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre">net</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre"> </span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre;font-weight:bold">=</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre"> </span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre">Mininet</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre">(</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre">topo</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre;font-weight:bold">=</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre">topo</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.984375px;white-space:pre">, </span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px">host</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px;font-weight:bold">=</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px">CPULimitedHost</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px">,</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px"> </span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px">link</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px;font-weight:bold">=</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px">TCLink</span><span class="" style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:17.99715805053711px">)</span><br>
</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">If instead, you wish to use a topology file and call mininet from command prompt, you could specify the link type using the --link option.</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">
eg. </pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">sudo mn --custom Custom.py --topo mytopo --link tc</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Hope this helps.</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)">
PS: This is my first post here so I'm not sure if it ends up at the right place. :) <span style="font-family:arial">Apologies if it doesn't </span></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><span style="font-family:arial">Saurabh</span></pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0)"><pre style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;color:rgb(51,51,51);line-height:17.99715805053711px">
<div class="" id="LC35" style="padding-left:10px"><br></div></pre></pre><pre><font color="#000000"><span style="white-space:pre-wrap">On May 2, 2013, at 3:11 PM, Balázs Németh wrote:
></span></font><i style="color:rgb(0,0,0);white-space:pre-wrap"> Hi all!
</i><font color="#000000"><span style="white-space:pre-wrap">></span></font><i style="color:rgb(0,0,0);white-space:pre-wrap">
</i><font color="#000000"><span style="white-space:pre-wrap">></span></font><i style="color:rgb(0,0,0);white-space:pre-wrap"> I would like to set a link some options (bandwidth), on one of my topos.
</i><font color="#000000"><span style="white-space:pre-wrap">></span></font><i style="color:rgb(0,0,0);white-space:pre-wrap"> I tried it the way is shown in the corresponding mininet API example:
</i><font color="#000000"><span style="white-space:pre-wrap">></span></font><i style="color:rgb(0,0,0);white-space:pre-wrap"> <a href="https://github.com/mininet/mininet/blob/master/examples/simpleperf.py#L30">https://github.com/mininet/mininet/blob/master/examples/simple</a></i><font color="#1155cc"><span style="white-space:pre-wrap"><i><u>The problem with, as it appears,</u></i></span></font><i style="color:rgb(0,0,0);white-space:pre-wrap;font-family:arial"><a href="https://github.com/mininet/mininet/blob/master/examples/simpleperf.py#L30">perf.py#L30</a></i></pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0)">><i>
</i>><i> I am making a simple custom topology, not using the API. But it won't work for me. The error message i got:
</i>><i> unexpected keyword argument 'bw'
</i>><i>
</i>><i> The implementation of addLink() (in mininet.topo.Topo.addLink) says:
</i>><i> def addLink(self, node1, node2, port1=None, port2=None, **opts)
</i>><i>
</i>><i> Although, I am not sure, I fully understand how this "**arg" function parameter works in Python.
</i>><i>
</i>><i> thanks for your time,
</i>><i> Balázs
</i></pre><div><i><br></i></div>
</div>