Migrate ALTO user docs to rst
[docs.git] / manuals / user-guide / src / main / asciidoc / nic / NIC_How_To_configure_VTN_Renderer.adoc
1 ==== How to configure VTN Renderer
2
3 The section demonstrates allow or block packets of the traffic within a VTN Renderer, according to the specified flow conditions.
4
5 The table below lists the actions to be applied when a packet matches the condition:
6 [options="header",cols="20%,80%"]
7 |===
8 | Action | Function
9 |Allow | Permits the packet to be forwarded normally.
10 |Block | Discards the packet preventing it from being forwarded.
11 |===
12
13 ===== Requirement
14
15 * Before execute the follow steps, please, use default requirements. See section <<_default_requirements,Default Requirements>>.
16
17 ===== Configuration
18
19 Please execute the following curl commands to test network intent using mininet:
20
21 ====== Create Intent
22
23 To provision the network for the two hosts(h1 and h2) and demonstrates the action allow.
24 ----
25 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"}} ] } }'
26 ----
27
28 To provision the network for the two hosts(h2 and h3) and demonstrates the action allow.
29 ----
30 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"}} ] } }'
31 ----
32
33 ====== Verification
34
35 As we have applied action type allow now ping should happen between hosts (h1 and h2) and (h2 and h3).
36 ----
37  mininet> pingall
38  Ping: testing ping reachability
39  h1 -> h2 X X
40  h2 -> h1 h3 X
41  h3 -> X h2 X
42  h4 -> X X X
43 ----
44
45 ====== Update the intent
46
47 To provision block action that indicates traffic is not allowed between h1 and h2.
48 ----
49 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"}} ] } }'
50 ----
51
52 ====== Verification
53
54 As we have applied action type block now ping should not happen between hosts (h1 and h2).
55 ----
56  mininet> pingall
57  Ping: testing ping reachability
58  h1 -> X X X
59  h2 -> X h3 X
60  h3 -> X h2 X
61  h4 -> X X X
62 ----
63
64 NOTE: Old actions and hosts are replaced by the new action and hosts.
65
66 ====== Delete the intent
67
68 Respective intent and the traffics will be deleted.
69 ----
70 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
71 ----
72
73 ====== Verification
74
75 Deletion of intent and flow.
76 ----
77  mininet> pingall
78  Ping: testing ping reachability
79  h1 -> X X X
80  h2 -> X X X
81  h3 -> X X X
82  h4 -> X X X
83 ----
84
85 NOTE: Ping between two hosts can also be done using MAC Address
86
87 To provision the network for the two hosts(h1 MAC address and h2 MAC address).
88 ----
89 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"}} ] } }'
90 ----