intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

name of the host limited to <=8 chars #399

Closed srikrishna3118 closed 2 years ago

srikrishna3118 commented 2 years ago

I was naming the stations (name_robo2) ap1 = net.addAccessPoint('ap1', ssid='new-ssid', mode='g', channel='1', failMode="standalone", mac='00:00:00:00:00:01', position='400,600,0') net.addStation('name_robo1', mac='00:00:00:00:00:02', ip='10.0.0.1/8', position='400,400,0')

as soon as the number of characters exceeds the limit (<=8) the add intf function results in error. I have posted the error log.

added intf name_robo1-wlan0 (0) to node name_robo1 DEBUG:mininet:added intf name_robo1-wlan0 (0) to node name_robo1

name_robo1 : ('ip link set', 'name_robo1-wlan0', 'up') DEBUG:mininet: name_robo1 : ('ip link set', 'name_robo1-wlan0', 'up')

Error: argument "name_robo1-wlan0" is wrong: "dev" not a valid ifname DEBUG:mininet:Error: argument "name_robo1-wlan0" is wrong: "dev" not a valid ifname

ramonfontes commented 2 years ago

You are reporting a known issue, since the interface name must be less than 16 characters. As you can see this is a limit imposed by iproute2.

srikrishna3118 commented 2 years ago

Ok -wlan0 also part of that interface potentially further limiting the name.. I missed that thank you