1 ==== How to configure VTN Renderer
3 The section demonstrates allow or block packets of the traffic within a VTN Renderer, according to the specified flow conditions.
5 The table below lists the actions to be applied when a packet matches the condition:
6 [options="header",cols="20%,80%"]
9 |Allow | Permits the packet to be forwarded normally.
10 |Block | Discards the packet preventing it from being forwarded.
15 * Before execute the follow steps, please, use default requirements. See section <<_default_requirements,Default Requirements>>.
19 Please execute the following curl commands to test network intent using mininet:
23 To provision the network for the two hosts(h1 and h2) and demonstrates the action allow.
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"}} ] } }'
28 To provision the network for the two hosts(h2 and h3) and demonstrates the action allow.
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"}} ] } }'
35 As we have applied action type allow now ping should happen between hosts (h1 and h2) and (h2 and h3).
38 Ping: testing ping reachability
45 ====== Update the intent
47 To provision block action that indicates traffic is not allowed between h1 and h2.
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"}} ] } }'
54 As we have applied action type block now ping should not happen between hosts (h1 and h2).
57 Ping: testing ping reachability
64 NOTE: Old actions and hosts are replaced by the new action and hosts.
66 ====== Delete the intent
68 Respective intent and the traffics will be deleted.
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
75 Deletion of intent and flow.
78 Ping: testing ping reachability
85 NOTE: Ping between two hosts can also be done using MAC Address
87 To provision the network for the two hosts(h1 MAC address and h2 MAC address).
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"}} ] } }'