Changes between Version 104 and Version 105 of EducationalAssignments/TakeHome

Changes between Version 104 and Version 105 of EducationalAssignments/TakeHome

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 104 and Version 105 of EducationalAssignments/TakeHome

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 104 and Version 105 of EducationalAssignments/TakeHome

Show
Ignore:
Timestamp:
07/05/12 20:32:36 (7 years ago)
Author:
leonwlaw
Comment:

Quick pass of GENI->Clearinghouse. Left link/file references intact.

Legend:

Unmodified
Added
Removed
Modified
  • EducationalAssignments/TakeHome

    v104 v105  
    1414---- 
    1515[[BR]] 
    16 = Using the GENI website and the Seash = 
     16= Using the Clearinghouse website and the Seash = 
    1717[[BR]] 
    1818== Step 1 : Adding resources == 
    1919---- 
    2020 
    21 Login to the Seattle [https://seattle.cs.washington.edu/geni/ GENI website].   If you don't already have an account (i.e. your instructor or TA gave you one) go ahead and register for an account.   Click on the My Vessels tab and you'll see that you currently aren't using any resources.  
     21Login to the Seattle [https://seattle.cs.washington.edu/geni/ Clearinghouse website].   If you don't already have an account (i.e. your instructor or TA gave you one) go ahead and register for an account.   Click on the My Vessels tab and you'll see that you currently aren't using any resources.  
    2222 
    2323In the top pane, select LAN and choose 5 vessels, and click "Get".  After a few seconds, you will see that five computers have been added for you to use.   If you can't obtain 5 LAN nodes, it is fine to use fewer. 
     
    4343---- 
    4444 
    45 Now lets add the credentials you just downloaded from the website into seash.  Type the following command at the prompt, '''(replacing ''username'' with the user name you used to log into the Seattle GENI website)''' 
     45Now lets add the credentials you just downloaded from the website into seash.  Type the following command at the prompt, '''(replacing ''username'' with the user name you used to log into the Seattle Clearinghouse website)''' 
    4646 
    4747{{{ 
     
    202202---- 
    203203 
    204 Now we're ready to measure the connectivity between computers!   The first thing we need to do is check which UDP port we should use.   For convenience, Seattle GENI assigns the same UDP port to all of a user's vessels.  
    205  
    206 To figure out which port you should use, log into the Seattle GENI website and on the Profile page, look to see what port number it indicates.   '''You should write down your port number as you'll need this value repeatedly.''' 
     204Now we're ready to measure the connectivity between computers!   The first thing we need to do is check which UDP port we should use.   For convenience, Seattle Clearinghouse assigns the same UDP port to all of a user's vessels.  
     205 
     206To figure out which port you should use, log into the Seattle Clearinghouse website and on the Profile page, look to see what port number it indicates.   '''You should write down your port number as you'll need this value repeatedly.''' 
    207207 
    208208We'll measure connectivity by sending UDP pings from a target computer to a destination.  At the " username@LAN !> " prompt type 
     
    213213}}} 
    214214 
    215 This will allow you to see the IP of %2.  Now type (replacing ''GENIport'' with your port number) 
    216  
    217 {{{ 
    218 #!python 
    219 username@LAN !> on %2 run udppingserver.repy GENIport 
    220 }}} 
    221  
    222  
    223 You can ping from %1 to %2 by typing the line listed below.   Replace ''IP_of_%2'' with the IP address of computer %2 as shown by your previous list command.   It will be something like 1.2.3.4.   Also replace ''GENIport'' with your port number. 
    224  
    225 {{{ 
    226 #!python 
    227 username@LAN !> on %1 run udpping.repy IP_of_%2 GENIport 
     215This will allow you to see the IP of %2.  Now type (replacing ''port'' with your port number) 
     216 
     217{{{ 
     218#!python 
     219username@LAN !> on %2 run udppingserver.repy port 
     220}}} 
     221 
     222 
     223You can ping from %1 to %2 by typing the line listed below.   Replace ''IP_of_%2'' with the IP address of computer %2 as shown by your previous list command.   It will be something like 1.2.3.4.   Also replace ''port'' with your port number. 
     224 
     225{{{ 
     226#!python 
     227username@LAN !> on %1 run udpping.repy IP_of_%2 port 
    228228}}} 
    229229 
     
    271271}}} 
    272272 
    273 This adds the file with nodes to ping to all of the computers in the LAN group. Now type (substituting your port for ''GENIport'') 
    274  
    275 {{{ 
    276 #!python 
    277 username@LAN !> run allpairsping.repy GENIport 
    278 }}} 
    279  
    280 You can see the result of all of the nodes pinging each other by opening your web browser and pointing it at one of the computers in your neighboriplist:GENIport.   For example, if 1.2.3.4 is a computer in your list, and your port is 54321 then open your browser and in the address bar type "http://1.2.3.4:54321".   If the node you chose doesn't respond, try another node. 
     273This adds the file with nodes to ping to all of the computers in the LAN group. Now type (substituting your port for ''port'') 
     274 
     275{{{ 
     276#!python 
     277username@LAN !> run allpairsping.repy port 
     278}}} 
     279 
     280You can see the result of all of the nodes pinging each other by opening your web browser and pointing it at one of the computers in your neighboriplist:port.   For example, if 1.2.3.4 is a computer in your list, and your port is 54321 then open your browser and in the address bar type "http://1.2.3.4:54321".   If the node you chose doesn't respond, try another node. 
    281281 
    282282Each node reports a matrix showing its connectivity. You will see that every node is able to ping every other node (i.e. the matrix is full of latencies).   If a row is completely missing, you'll notice the corresponding column is likely empty as well.   This indicates that the node you are looking at is mostly likely down.    
     
    288288---- 
    289289 
    290 Now we'll run the all pairs ping on computers distributed around the world. Log back into the Seattle GENI website. You will see the nodes that you're using are listed under the My Vessels tab. Click on "remove all".  Now that you've given back your resources, you can add other resources. Under the My Vessels tab, in the "Get more resources" pane, select WAN (instead of LAN), choose 10 computers, and click "Get".   Now you'll see that ten computers / vessels around the world have been added for you to use. 
     290Now we'll run the all pairs ping on computers distributed around the world. Log back into the Seattle Clearinghouse website. You will see the nodes that you're using are listed under the My Vessels tab. Click on "remove all".  Now that you've given back your resources, you can add other resources. Under the My Vessels tab, in the "Get more resources" pane, select WAN (instead of LAN), choose 10 computers, and click "Get".   Now you'll see that ten computers / vessels around the world have been added for you to use. 
    291291 
    292292Back in seash, type 
     
    338338{{{ 
    339339#!python 
    340 username@WAN !> run allpairsping.repy GENIport 
    341 }}} 
    342  
    343 Finally, check the result of all of the nodes pinging each other by opening your web browser and pointing it at one of the computers in your neighboriplist:GENIport.   If you can't see this from a specific node, try to refresh a few times.   You should try to load the webpage of a different computer if the problem persists. 
     340username@WAN !> run allpairsping.repy port 
     341}}} 
     342 
     343Finally, check the result of all of the nodes pinging each other by opening your web browser and pointing it at one of the computers in your neighboriplist:port.   If you can't see this from a specific node, try to refresh a few times.   You should try to load the webpage of a different computer if the problem persists. 
    344344 
    345345What do you observe? Is the connectivity graph complete and do all of the nodes agree on which nodes are alive?  As before, a column which is empty and has a corresponding empty row indicates a down node.   Do you see any nodes that cannot connect to each other but can contact other nodes?   If so you'll see something like the image below. 
     
    363363Now that you have a connectivity matrix where there are two nodes that can't communicate, notice that other computers can communicate with these nodes, but they can't contact each other directly. This is an effect called "non-transitive connectivity".   Non-transitive connectivity usually happens because of configuration errors or convergence failures in the BGP protocol.    
    364364 
    365 Write down the IP addresses of the two computers that cannot directly communicate and also write down the IP of a node that can communicate with both nodes.   To get packets to flow from two nodes that can't communicate, we can have a node in the middle forward packets.   Find the %number of the node who can talk to both nodes.   Then type (replacing ''node1IP'', ''node2IP'', and ''GENIport'') 
    366  
    367 {{{ 
    368 #!python 
    369 username@WAN !> on %number run udpforward.repy node1IP node2IP GENIport 
    370 }}} 
    371  
    372 Now start the udppingserver on node1 by doing (replacing ''%node1'' with the node number for node1 and ''GENIport'') 
    373  
    374 {{{ 
    375 #!python 
    376 username@WAN !> on %node1 run udppingserver.repy GENIport 
    377 }}} 
    378  
    379  
    380 To send a ping packet, run: (replacing ''%node2'' with the node number for node2, ''intermediateIP'' with the IP address of the computer that can talk to both nodes, and ''GENIport'') 
    381  
    382 {{{ 
    383 #!python 
    384 username@WAN !> on %node2 run udpping.repy intermediateIP GENIport 
     365Write down the IP addresses of the two computers that cannot directly communicate and also write down the IP of a node that can communicate with both nodes.   To get packets to flow from two nodes that can't communicate, we can have a node in the middle forward packets.   Find the %number of the node who can talk to both nodes.   Then type (replacing ''node1IP'', ''node2IP'', and ''port'') 
     366 
     367{{{ 
     368#!python 
     369username@WAN !> on %number run udpforward.repy node1IP node2IP port 
     370}}} 
     371 
     372Now start the udppingserver on node1 by doing (replacing ''%node1'' with the node number for node1 and ''port'') 
     373 
     374{{{ 
     375#!python 
     376username@WAN !> on %node1 run udppingserver.repy port 
     377}}} 
     378 
     379 
     380To send a ping packet, run: (replacing ''%node2'' with the node number for node2, ''intermediateIP'' with the IP address of the computer that can talk to both nodes, and ''port'') 
     381 
     382{{{ 
     383#!python 
     384username@WAN !> on %node2 run udpping.repy intermediateIP port 
    385385}}} 
    386386 
     
    405405The next part of the assignment is best performed from your home computer.  It will try to detect the presence of a network address translator (NAT); a feature that many wireless modems and home routers have.  You will need to download the demokit and keys like you previously did in Step 2. 
    406406 
    407 If you can't run Repy on your home computer, you can also obtain a computer using Seattle GENI.   If you use Seattle GENI, choose a node of type NAT.   You will need to change the below directions so that you use seash to run commands on the NAT node instead of running the programs locally.    
    408  
    409 Either way, run seash from a terminal by typing "python seash.py" or "seash.py".  Load your keys by typing (replacing ''username'' with your GENI user name) 
     407If you can't run Repy on your home computer, you can also obtain a computer using Seattle Clearinghouse.   If you use Seattle Clearinghouse, choose a node of type NAT.   You will need to change the below directions so that you use seash to run commands on the NAT node instead of running the programs locally.    
     408 
     409Either way, run seash from a terminal by typing "python seash.py" or "seash.py".  Load your keys by typing (replacing ''username'' with your Clearinghouse user name) 
    410410 
    411411{{{ 
     
    423423and you'll see the prompt changes to "username@ !>".  
    424424 
    425 Check on the Seattle GENI website to see if you still have nodes to use.   If not, under My Vessels, select WAN, choose 1 computer, and click "Get".   
     425Check on the Seattle Clearinghouse website to see if you still have nodes to use.   If not, under My Vessels, select WAN, choose 1 computer, and click "Get".   
    426426 
    427427Now under seash at the " username@ !>" prompt, type 
     
    432432}}} 
    433433 
    434 You should see the IP of at least one WAN node. Write down the IP address of the WAN node.   Write down the IP address of your computer (you can obtain this by typing "ipconfig" at a prompt in Windows, by typing "hostname -i" on Linux, or by typing either {{{"host `hostname`"}}} or {{{ifconfig}}} on a Mac).   Start the pingserver on the WAN node with the following command in seash (replacing ''GENIport'' with your port number): 
    435 {{{ 
    436 #!python 
    437 username@ !> on %WANnode run udppingserver.repy GENIport 
    438 }}} 
    439  
    440 Ping the WAN node from your local computer by typing the following command at a terminal window (not in seash!) after you cd to the directory the demokit is in.   Remember to replace ''WANIP'' with the WAN node's IP address and ''GENIport'' with your port.   If you are running this on a remote system, you should use seash and replace the {{{python repy.py restrictions.allowallports}}} portion of the command with 'run'. 
    441  
    442  
    443 {{{ 
    444 python repy.py restrictions.allowallports udpping.repy WANIP GENIport 
     434You should see the IP of at least one WAN node. Write down the IP address of the WAN node.   Write down the IP address of your computer (you can obtain this by typing "ipconfig" at a prompt in Windows, by typing "hostname -i" on Linux, or by typing either {{{"host `hostname`"}}} or {{{ifconfig}}} on a Mac).   Start the pingserver on the WAN node with the following command in seash (replacing ''port'' with your port number): 
     435{{{ 
     436#!python 
     437username@ !> on %WANnode run udppingserver.repy port 
     438}}} 
     439 
     440Ping the WAN node from your local computer by typing the following command at a terminal window (not in seash!) after you cd to the directory the demokit is in.   Remember to replace ''WANIP'' with the WAN node's IP address and ''port'' with your port.   If you are running this on a remote system, you should use seash and replace the {{{python repy.py restrictions.allowallports}}} portion of the command with 'run'. 
     441 
     442 
     443{{{ 
     444python repy.py restrictions.allowallports udpping.repy WANIP port 
    445445}}} 
    446446 
     
    467467 
    468468{{{ 
    469 python repy.py restrictions.allowallports udppingserver.repy GENIport 
     469python repy.py restrictions.allowallports udppingserver.repy port 
    470470}}} 
    471471 
     
    474474{{{ 
    475475#!python 
    476 username@ !> on %WANnode run udpping.repy localIP GENIport 
     476username@ !> on %WANnode run udpping.repy localIP port 
    477477}}} 
    478478 
     
    495495== Conclusion == 
    496496 
    497 That's all for the take home assignment.   You've just seen non-transitive connectivity in practice, used one hop detour routing to circumvent it, and also determined if your computer is behind a NAT.   We hope this has been informative and enjoyable.   If you would like to [DonatingResources donate resources] to the Seattle project, you call install Seattle on your home computer.   Clicking on the Get Donations tab from your Seattle GENI account and picking the appropriate installer to download will credit the donation to your account.   If you have any comments or questions please contact justinc -AT- cs -DOT- washington -DOT- edu 
     497That's all for the take home assignment.   You've just seen non-transitive connectivity in practice, used one hop detour routing to circumvent it, and also determined if your computer is behind a NAT.   We hope this has been informative and enjoyable.   If you would like to [DonatingResources donate resources] to the Seattle project, you call install Seattle on your home computer.   Clicking on the Get Donations tab from your Seattle Clearinghouse account and picking the appropriate installer to download will credit the donation to your account.   If you have any comments or questions please contact justinc -AT- cs -DOT- washington -DOT- edu