mininet
mininet copied to clipboard
Change MTU (Maximum Transmission Unit) of a mininet host
How can I change the MTU of a mininet host through the python script? I've figured it out with my switch's interfaces, I'm not able to do it with hosts though. Any idea of how can I do it? Thanks in advance
Hello, I am not sure whether this is the correct way to do this or not, but I found a workaround for this.
When creating topology using python script we can run commands inside every host. Using the "ifconfig" command we can change MTU of a mininet host.
Example Code:
h1.cmd('ifconfig h1-eth0 mtu 65535') # here h1-eth0 is the interface name, 65535 is the new MTU for host 1.
NOTE: the above command must be executed before starting the CLI inside the python script.
@lantz consider closing this issue and creating a "user support" label to mark such issues. GH issues should not be used for this type of questions.
Remember not to abuse github issues by posting support requests or usage questions.