DANOS Post Install Configuration
These steps will configure the DANOS vRouter as a vFW for ONAP
Step-by-step guide
- Create the Netconf Mount
- Create a netconf mount from SDNC to the DANOS vRouter
The following xml payload should be edited for your environment with the node-id , ip address and port (default is 22 ) and credentials from your enivronment
Here is the curl script to create the netconf mount. ReplaceĀ k8_host_ip with one of your host ip's and replace vofwl01fwl003f with your virtual machine name
curl to create netconf mount
curl -v -k --user "admin":"Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" -d @netconf_mount.danos.xml -H "Accept: application/xml" -H "Content-type: application/xml" -X PUT --trace trace.out https://<k8_host_ip>:30267/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vofwl01fwl003f
validate_mount
curl -v -k --user "admin":"Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" -H "Accept: application/json" -H "Content-type: application/json" -X GET https://52.251.126.116:30267/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vofwl01fwl003f | python -m json.tool
- Add the static ip addressed interfaces
add_interface.dp0s4.json
add_interface.dp0s4{ "vyatta-interfaces-dataplane-v1:dataplane": { "address": [ "192.168.10.100/24" ], "tagnode": "dp0s4" } }add_interface.dp0s5.json
add_interface.dp0s5.json{ "vyatta-interfaces-dataplane-v1:dataplane": { "address": [ "192.168.20.100/24" ], "tagnode": "dp0s5" } }add the interfaces (change k8_host_ip and vofwl01fwl003f for your environment)
add interfacescurl -v -k --user "admin":"Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" -d @add_interface.dp0s4.json -H "Accept: application/json" -H "Content-type: application/json" -X PUT --trace trace.out https://<k8_host_ip>:30267/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vofwl01fwl003f/yang-ext:mount/vyatta-interfaces-v1:interfaces/dataplane/dp0s4 curl -v -k --user "admin":"Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" -d @add_interface.dp0s5.json -H "Accept: application/json" -H "Content-type: application/json" -X PUT --trace trace.out https://<k8_host_ip>:30267/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vofwl01fwl003f/yang-ext:mount/vyatta-interfaces-v1:interfaces/dataplane/dp0s5validate the interfaces
validate_interfacescurl -v -k --user "admin":"Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" -H "Accept: application/json" -H "Content-type: application/json" -X GET https://<k8s_host_ip>:30267/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vofwl01fwl003f/yang-ext:mount/vyatta-interfaces-v1:interfaces | python -m json.tooloperational interfacescurl -v -k --user "admin":"Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" -H "Accept: application/json" -H "Content-type: application/json" -X GET https://<k8_host_ip>:30267/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vofwl01fwl003f/yang-ext:mount/vyatta-interfaces-v1:interfaces | python -m json.tool- Set the hostname to match the one assigned by ONAP
- e.g.: "hostname vofwl01fwlb7a9"
- Update the DCAE collector data
- ssh into the virtual router
- sudo su
create directory under /run/live and fileĀ /run/live/VES/dcae_collector.env
dcae_collector.env# either onap k8 dns name or k8 host external IP DCAE_COLLECTOR_IP=<k8s_host_ip> # DCAE_COLLECTOR_PORT 8443 or 30417 for externa nodeport DCAE_COLLECTOR_PORT=30417 # dp0s4 for standard configuration for unprotected network from png to fw PORT_TO_REPORT=dp0s4- Start the vpp_measurement_reporter client
- systemctl start vpp-measurement-reporter-danos
You can also run the program manually to see the HTTP 200 OK
Here is the exmaple VES Collector Output
VES collector output[ "{\"event\":{\"commonEventHeader\":{\"startEpochMicrosec\":1588088953863343,\"eventId\":\"mvfs00000001\",\"sequence\":0,\"domain\":\"measurementsForVfScaling\",\"lastEpochMicrosec\":1588088963863343,\"eventName\":\"vFirewallBroadcastPackets\",\"reportingEntityId\":\"No UUID available\",\"internalHeaderFields\":{\"collectorTimeStamp\":\"Tue, 04 28 2020 03:49:25 UTC\"},\"sourceName\":\"vyatta\",\"priority\":\"Normal\",\"version\":3,\"reportingEntityName\":\"vyatta\"},\"measurementsForVfScalingFields\":{\"measurementInterval\":10,\"measurementsForVfScalingVersion\":2,\"vNicPerformanceArray\":[{\"transmittedOctetsDelta\":0,\"receivedTotalPacketsDelta\":1001,\"vNicIdentifier\":\"dp0s4\",\"valuesAreSuspect\":\"true\",\"transmittedTotalPacketsDelta\":0,\"receivedOctetsDelta\":43043}]}}}" ]Here is the example DCAE EventĀ Output
DCAE Event Output"{\"closedLoopEventClient\":\"DCAE_INSTANCE_ID.dcae-tca\",\"policyVersion\":\"v0.0.1\",\"policyName\":\"DCAE.Config_tca-hi-lo\",\"policyScope\":\"DCAE\",\"target_type\":\"VM\",\"AAI\":{\"vserver.vserver-name\":\"vyatta\"},\"closedLoopAlarmStart\":1588089092309746,\"closedLoopEventStatus\":\"ONSET\",\"closedLoopControlName\":\"ControlLoop-vFirewall-48ee224b-3da4-40e0-afec-bfea68d36cfb\",\"version\":\"1.0.2\",\"target\":\"vserver.vserver-name\",\"requestID\":\"2bfbd9e1-0b2a-4843-a110-bb84f84514d8\",\"from\":\"DCAE\"}"
Related articles