Changes between Version 37 and Version 38 of GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ndn/Procedure/Execute
- Timestamp:
- 07/01/16 17:38:04 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ndn/Procedure/Execute
v37 v38 57 57 * A principal investigator node, called {{{PI}}} and a experimenter node, called {{{Experimenter}}} that will send {{{Interest}}} requests to the {{{Custodian}}} via UDP tunnels. 58 58 59 Download the scripts and Python codes to your host machine and extract it. 60 * [http://192.1.242.151/files/ndn-tutorial.gz ndn-tutorial.gz] 61 62 Or alternatively, 59 60 Once the topology is up, logon to the {{{Custodian}}} node and restart the NDN Forwarding Daemon. 63 61 {{{ 64 $ wget http://192.1.242.151/files/ndn-tutorial.gz 65 $ tar -xvf ndn-tutorial.gz 66 }}} 67 68 In the '''ndn-tutorial-config.sh''' configuration file, edit the fields according to your GENI username, SSH key, GENI Aggregate name, pc and port numbers. [[br]] 69 Keep the quotes format unchanged, otherwise the script may not run. 70 71 Once the topology is up, run {{{copy-scripts.sh}}}, this will automatically transfer the necessary files to the nodes in our topology. 72 {{{ 73 $ ./copy-scripts.sh 62 $ cd /local 63 $ sudo ./install_script.sh 74 64 }}} 75 65 76 Login into the node {{{Custodian}}} and re-start the NDN Forwarding Daemon (NFD). This will make sure the content store is refreshed and the routes are cleared.77 {{{78 $ nfd-stop79 $ nfd-start80 }}}81 66 82 wait until the shell prompt returns (~ a few seconds). The NFD is now up and running. 83 84 === 5.1 Run the NDN application on the same node === 85 86 You are now ready to start the producer application and register a namespace. ^([#hn note: you can try other namespaces as well])^[[br]] 67 === 5.1 Run the NDN application on the entire topology === 68 We are now ready to run our experiment.[[br]] 69 On the {{{Custodian}}} node, start the {{{producer}}} application ^([#hn note: you can try other namespaces as well])^ [[br]] 87 70 The producer application will listen for {{{Interest}}} requests of a namespace {{{-n}}} and reply with {{{Data}}} packets. 88 71 {{{ 89 $ cd /local 90 $ python producer.py -n /nytimes 91 }}} 92 You should see a message 93 {{{ 94 $ Registering prefix /nytimes 95 }}} 96 Open another terminal on the {{{Custodian}}} node and run 97 {{{ 98 $ cd /local 99 $ python consumer.py -u /nytimes/science 100 }}} 101 This will start the consumer application that will send {{{Interest}}} request packets to the producer. Take a moment to look at the entries in the NFD. 102 You are all set. Stop the producer application by {{{Ctrl + C}}} and stop the NFD 103 {{{ 104 $ nfd-stop 105 }}} 106 107 === 5.2 Run the NDN application on the entire topology === 108 In this section, we are going to start the NFD and register the forwarding faces on the remaining nodes. We have automated these tasks for the {{{Campus-Router}}}, {{{Internet-Router}}}, and {{{PI}}} nodes using a script. On your host machine, do the following: 109 {{{ 110 $ ./setup-app.sh 111 }}} 112 113 We are now ready to run our experiment.[[br]] 114 SSH to the {{{Custodian}}} node and start the {{{producer}}} application 115 {{{ 116 $ python producer.py -n /nytimes 72 $ sudo python /local/producer.py -n /nytimes 117 73 }}} 118 74 119 75 SSH to the {{{Experimenter}}} node, and start the consumer application 120 76 {{{ 121 $ pythonconsumer.py -u /nytimes/science77 $ time sudo python /local/consumer.py -u /nytimes/science 122 78 }}} 123 Th is time the {{{Interest}}} request travels the entire topology, leaving breadcrumbs. The {{{Data}}} packet follows the breadcrumbs back to the {{{consumer}}}, leaving cached versions of the content. This is call in-network caching and it is one of the most important features in {{{Information Centric Networking (ICN)}}}79 The {{{Interest}}} packet travels the entire topology, leaving breadcrumbs. The {{{Data}}} packet follows the breadcrumbs back to the {{{consumer}}}, leaving cached versions of the content. This is call in-network caching and it is one of the most important features in {{{Information Centric Networking (ICN)}}} 124 80 You can check this phenomenon by running the same consumer application in the {{{PI}}} node. 125 81 SSH to the {{{PI}}} node and start the consumer application 126 82 {{{ 127 $ pythonconsumer.py -u /nytimes/science83 $ time sudo python /local/consumer.py -u /nytimes/science 128 84 }}} 129 This time your {{{PI}}} node gets the content back, but nothing happens on the {{{Custodian}}} because the requested content is cached in the {{{Campus Router}}} node. 85 This time your {{{PI}}} node gets the content back, but nothing happens on the {{{Custodian}}} because the requested content is cached in the {{{Campus Router}}} node.[[br]] 86 Note that this time the [[[Data}}} was retrieved much faster.[[br]] 130 87 You can repeat the experiment with different namespaces 131 88 {{{ 132 $ pythonconsumer.py -u /nytimes/math89 $ time sudo python /local/consumer.py -u /nytimes/math 133 90 }}} 134 91 This time you see that the {{{Interest}}} request is served by the {{{Custodian}}}. 135 92 136 === 5. 3(Optional) Visualize experiment data flows ===93 === 5.2 (Optional) Visualize experiment data flows === 137 94 To use the GENI Desktop to visualize the data flows in your network, continue with the instructions [wiki:GENIExperimenter/Tutorials/jacks/GettingStarted_PartII_ndn/Procedure/Execute/GEMINI here]. 138 95