Changes between Version 6 and Version 7 of GENIExperimenter/Tutorials/jFed/GettingStarted_PartII_ndn/Procedure/Execute
- Timestamp:
- 07/05/16 16:32:29 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GENIExperimenter/Tutorials/jFed/GettingStarted_PartII_ndn/Procedure/Execute
v6 v7 51 51 == 5 Trying out the NDN application == 52 52 53 In this experiment, you will be able to see the NDNin-network caching in action. Our experiment consists of the following nodes:53 In this experiment, you will be able to see in-network caching in action. Our experiment consists of the following nodes: 54 54 * A data source node, called {{{Custodian}}} that holds data in the namespace /nytimes 55 55 * A node, called {{{Internet Router}}} that forwards {{{Interest}}} and {{{Data}}} packets to and from the {{{Custodian}}}. … … 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 You can find this information in the {{{RSpec Viewer}}} tab in the {{{Node login information}}} section.[[br]] 70 Keep the quotes format unchanged, otherwise the script may not run. 71 72 Once the topology is up, run {{{copy-scripts.sh}}}, this will automatically transfer the necessary files to the nodes in our topology. 73 {{{ 74 $ ./copy-scripts.sh 62 $ cd /local 63 $ sudo ./install_script.sh 75 64 }}} 76 65 77 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. 78 {{{ 79 $ nfd-stop 80 $ nfd-start 66 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]] 70 The producer application will listen for {{{Interest}}} requests of a namespace {{{-n}}} and reply with {{{Data}}} packets. 71 {{{ 72 $ sudo python /local/producer.py -n /nytimes 81 73 }}} 82 74 83 wait until the shell prompt returns (~ a few seconds). The NFD is now up and running. 84 85 === 5.1 Run the NDN application on the same node === 86 87 You are now ready to start the producer application and register a namespace. ^([#hn note: you can try other namespaces as well])^[[br]] 88 The producer application will listen for {{{Interest}}} requests of a namespace {{{-n}}} and reply with {{{Data}}} packets. 75 SSH to the {{{Experimenter}}} node, and start the consumer application 89 76 {{{ 90 $ python producer.py -n /nytimes77 $ sudo python /local/consumer.py -u /nytimes/science 91 78 }}} 92 You should see a message 93 {{{ 94 $ Registering prefix /nytimes 95 }}} 96 Open another terminal on the {{{Custodian}}} node and run 97 {{{ 98 $ python consumer.py -u /nytimes/science 99 }}} 100 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. 101 You are all set. Stop the producer application by {{{Ctrl + C}}} and stop the NFD 102 {{{ 103 $ nfd-stop 104 }}} 105 106 === 5.2 Run the NDN application on the entire topology === 107 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: 108 {{{ 109 $ ./setup-app.sh 110 }}} 111 112 We are now ready to run our experiment.[[br]] 113 SSH to the {{{Custodian}}} node and start the {{{producer}}} application 114 {{{ 115 $ python producer.py -n /nytimes 116 }}} 117 118 SSH to the {{{Experimenter}}} node and start the consumer application 119 {{{ 120 $ python consumer.py -u /nytimes/science 121 }}} 122 This 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)}}} 123 80 You can check this phenomenon by running the same consumer application in the {{{PI}}} node. 124 81 SSH to the {{{PI}}} node and start the consumer application 125 82 {{{ 126 $ pythonconsumer.py -u /nytimes/science83 $ sudo python /local/consumer.py -u /nytimes/science 127 84 }}} 128 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 the {{{Data}}} was retrieved much faster.[[br]] 129 87 You can repeat the experiment with different namespaces 130 88 {{{ 131 $ pythonconsumer.py -u /nytimes/math89 $ sudo python /local/consumer.py -u /nytimes/math 132 90 }}} 133 91 This time you see that the {{{Interest}}} request is served by the {{{Custodian}}}. 92 [[br]] 93 Feel free to explore different {{{namespaces}}}. 134 94 135 === 5. 3(Optional) Visualize experiment data flows ===95 === 5.2 (Optional) Visualize experiment data flows === 136 96 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]. 137 138 97 139 98 ----