We expect HTTP to work only when going from EG1 to EG2, and only on port 80. Let’s check. First, we’ll start a web server on h36_2
by running this on host 1:
mininet> h36_2 python -m SimpleHTTPServer 80
Note that this will block your prompt until you Ctrl-C it later.
Now on host 2, run:
mininet> h35_4 curl http://10.0.36.2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 488 100 488 0 0 72944 0 --:--:-- --:--:-- --:--:-- 97600 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html> <title>Directory listing for /</title> <body> <h2>Directory listing for /</h2> <hr> <ul> <li><a href="config.py">config.py</a> <li><a href="config.pyc">config.pyc</a> <li><a href="mininet_gbp.py">mininet_gbp.py</a> <li><a href="mininet_gbp.pyc">mininet_gbp.pyc</a> <li><a href="odl_gbp.py">odl_gbp.py</a> <li><a href="odl_gbp.pyc">odl_gbp.pyc</a> <li><a href="testOfOverlay.py">testOfOverlay.py</a> </ul> <hr> </body> </html>
You can see that the host in endpoint group 1 is able to access the server in endpoint group 2.
Let’s try the reverse. Ctrl-C the server on host 1 and then run:
mininet> h35_2 python -m SimpleHTTPServer 80
We can still access the server from h35_4
on host 2, because it’s in the same endpoint group:
mininet> h35_4 curl http://10.0.35.2 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 488 100 488 0 0 55625 0 --:--:-- --:--:-- --:--:-- 61000 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html> <title>Directory listing for /</title> <body> <h2>Directory listing for /</h2> <hr> <ul> <li><a href="config.py">config.py</a> <li><a href="config.pyc">config.pyc</a> <li><a href="mininet_gbp.py">mininet_gbp.py</a> <li><a href="mininet_gbp.pyc">mininet_gbp.pyc</a> <li><a href="odl_gbp.py">odl_gbp.py</a> <li><a href="odl_gbp.pyc">odl_gbp.pyc</a> <li><a href="testOfOverlay.py">testOfOverlay.py</a> </ul> <hr> </body> </html>
But we cannot access it from h36_4
on host 2, because it’s in a different endpoint group and our contract allows HTTP only in the other direction:
mininet> h36_4 curl http://10.0.35.2 --connect-timeout 3 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0 curl: (28) Connection timed out after 3001 milliseconds