How it works...

In this recipe, we pinged (depth)th host from the 0th host. As (depth < the number of hosts), this works well. Note that subsequent executions will give different outcomes as the ping statistics. This is because the network is actually emulated with real processes, and hence the ping actually occurs between the emulated processes.

You may re-execute the program to see different outcomes to the previous:

$ sudo python 9_2_mininet_emulation.py --depth=2 --fanout=3 
PING 10.0.0.3 (10.0.0.3) 56(84) bytes of data.
64 bytes from 10.0.0.3: icmp_seq=1 ttl=64 time=3.33 ms
    
--- 10.0.0.3 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.332/3.332/3.332/0.000 ms
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.152.159