From e367333b62c9a441779efeb99153e737cd6ffc4c Mon Sep 17 00:00:00 2001 From: "Arthi.b" Date: Wed, 22 Jul 2015 19:36:44 +0530 Subject: [PATCH] Added VTN Renderer in User Guide. Change-Id: Ia4e188e1b767b7a721c6382f3bebebeebf4296dc Signed-off-by: Arthi.b (cherry picked from commit 753e46436049e2bf35f917fe40d1ec15660d4536) --- .../NIC_How_To_configure_VTN_Renderer.adoc | 108 ++++++++++++++++++ .../src/main/asciidoc/nic/nic-user.adoc | 4 + 2 files changed, 112 insertions(+) create mode 100644 manuals/user-guide/src/main/asciidoc/nic/NIC_How_To_configure_VTN_Renderer.adoc diff --git a/manuals/user-guide/src/main/asciidoc/nic/NIC_How_To_configure_VTN_Renderer.adoc b/manuals/user-guide/src/main/asciidoc/nic/NIC_How_To_configure_VTN_Renderer.adoc new file mode 100644 index 000000000..cc3fdb66a --- /dev/null +++ b/manuals/user-guide/src/main/asciidoc/nic/NIC_How_To_configure_VTN_Renderer.adoc @@ -0,0 +1,108 @@ +==== How to configure VTN Renderer + +The NIC Model provides an abstract model for expressing the desired state and operation of the network. + +===== Requirement + +* Configure mininet and create a topology: + +Replace based on your environment + +---- +$ mininet@mininet-vm:~$ sudo mn --controller=remote,ip= --topo tree,2 +---- + +---- + mininet> net + h1 h1-eth0:s2-eth1 + h2 h2-eth0:s2-eth2 + h3 h3-eth0:s3-eth1 + h4 h4-eth0:s3-eth2 + s1 lo: s1-eth1:s2-eth3 s1-eth2:s3-eth3 + s2 lo: s2-eth1:h1-eth0 s2-eth2:h2-eth0 s2-eth3:s1-eth1 + s3 lo: s3-eth1:h3-eth0 s3-eth2:h4-eth0 s3-eth3:s1-eth2 + c0 +---- + +===== Downloading and deploy Karaf distribution +* Get the Lithium Distribution. + +* Unzip the downloaded zip distribution + +* To run the Karaf + +---- +./bin/karaf +---- + +* Once the console is up, type as below to install feature. + +---- +feature:install odl-nic-renderer-vtn +---- + +===== Configuration + +Please execute the following curl commands to test network intent using mininet: + +* Create Intent + +---- +curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8181/restconf/config/intent:intents/intent/b9a13232-525e-4d8c-be21-cd65e3436034 -d '{ "intent:intent" : { "intent:id": "b9a13232-525e-4d8c-be21-cd65e3436034", "intent:actions" : [ { "order" : 2, "allow" : {} } ], "intent:subjects" : [ { "order":1 , "end-point-group" : {"name":"10.0.0.1"} }, { "order":2 , "end-point-group" : {"name":"10.0.0.2"}} ] } }' +---- + +---- +curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8181/restconf/config/intent:intents/intent/b9a13232-525e-4d8c-be21-cd65e3436035 -d '{ "intent:intent" : { "intent:id": "b9a13232-525e-4d8c-be21-cd65e3436035", "intent:actions" : [ { "order" : 2, "allow" : {} } ], "intent:subjects" : [ { "order":1 , "end-point-group" : {"name":"10.0.0.2"} }, { "order":2 , "end-point-group" : {"name":"10.0.0.3"}} ] } }' +---- + +.Verification + +---- + mininet> pingall + Ping: testing ping reachability + h1 -> h2 X X + h2 -> h1 h3 X + h3 -> X h2 X + h4 -> X X X +---- + +* Update an Intent + +---- +curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8181/restconf/config/intent:intents/intent/b9a13232-525e-4d8c-be21-cd65e3436034 -d '{ "intent:intent" : { "intent:id": "b9a13232-525e-4d8c-be21-cd65e3436034", "intent:actions" : [ { "order" : 2, "block" : {} } ], "intent:subjects" : [ { "order":1 , "end-point-group" : {"name":"10.0.0.1"} }, { "order":2 , "end-point-group" : {"name":"10.0.0.2"}} ] } }' +---- + +.Verification + +---- + mininet> pingall + Ping: testing ping reachability + h1 -> X X X + h2 -> X h3 X + h3 -> X h2 X + h4 -> X X X +---- + +NOTE: Old actions and hosts are replaced by the new action and hosts. + +* Delete an Intent + +---- +curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://localhost:8181/restconf/config/intent:intents/intent/b9a13232-525e-4d8c-be21-cd65e3436035 +---- + +.Verification +---- + mininet> pingall + Ping: testing ping reachability + h1 -> X X X + h2 -> X X X + h3 -> X X X + h4 -> X X X +---- + +NOTE: Ping between two hosts can also be done using MAC Address + +---- +curl -v --user "admin":"admin" -H "Accept: application/json" -H "Content-type: application/json" -X PUT http://localhost:8181/restconf/config/intent:intents/intent/b9a13232-525e-4d8c-be21-cd65e3436035 -d '{ "intent:intent" : { "intent:id": "b9a13232-525e-4d8c-be21-cd65e3436035", "intent:actions" : [ { "order" : 2, "allow" : {} } ], "intent:subjects" : [ { "order":1 , "end-point-group" : {"name":"6e:4f:f7:27:15:c9"} }, { "order":2 , "end-point-group" : {"name":"aa:7d:1f:4a:70:81"}} ] } }' +---- diff --git a/manuals/user-guide/src/main/asciidoc/nic/nic-user.adoc b/manuals/user-guide/src/main/asciidoc/nic/nic-user.adoc index ff5b41d30..861ba41e1 100644 --- a/manuals/user-guide/src/main/asciidoc/nic/nic-user.adoc +++ b/manuals/user-guide/src/main/asciidoc/nic/nic-user.adoc @@ -92,3 +92,7 @@ console CLI commands are available. * intent:show - display the details of a specific intent * intent:delete - removes an intent from the system + +=== NIC Usage Examples + +include::NIC_How_To_configure_VTN_Renderer.adoc[How to configure VTN Renderer] \ No newline at end of file -- 2.36.6