I need to emulate a network with n hosts connected by a switch. The perfect tool for this seems to be mininet. The problem is that I need to run a python script in every host that makes use of the hostname. The skript acts different depending on the hostname, so this is very important for me :)
But the hostname seems to be the same in every host! Example:
h1 hostname
outputs "simon-pc"
h2 hostname
outputs "simon-pc"
"simon-pc" is the hostname of my "real" underlying ubuntu system.
I don't find a possibility to change the hostname on the host.
Is this even possible? And if yes, how? If no, why not?
I read about mininet using one common kernel for every host. Might this be the problem?