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
netconf_mount.xml<node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> <node-id>vofwl01fwl003f</node-id> <host xmlns="urn:opendaylight:netconf-node-topology">10.0.200.90</host> <port xmlns="urn:opendaylight:netconf-node-topology">22</port> <username xmlns="urn:opendaylight:netconf-node-topology">vyatta</username> <password xmlns="urn:opendaylight:netconf-node-topology">vyatta</password> <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only> <!-- non-mandatory fields with default values, you can safely remove these if you do not wish to override any of these values--> <reconnect-on-changed-schema xmlns="urn:opendaylight:netconf-node-topology">false</reconnect-on-changed-schema> <connection-timeout-millis xmlns="urn:opendaylight:netconf-node-topology">20000</connection-timeout-millis> <max-connection-attempts xmlns="urn:opendaylight:netconf-node-topology">0</max-connection-attempts> <between-attempts-timeout-millis xmlns="urn:opendaylight:netconf-node-topology">2000</between-attempts-timeout-millis> <sleep-factor xmlns="urn:opendaylight:netconf-node-topology">1.5</sleep-factor> <!-- keepalive-delay set to 0 turns off keepalives--> <keepalive-delay xmlns="urn:opendaylight:netconf-node-topology">120</keepalive-delay>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
validate_results{ "node": [ { "netconf-node-topology:between-attempts-timeout-millis": 2000, "netconf-node-topology:connection-timeout-millis": 20000, "netconf-node-topology:host": "10.0.200.46", "netconf-node-topology:keepalive-delay": 120, "netconf-node-topology:max-connection-attempts": 0, "netconf-node-topology:password": "vyatta", "netconf-node-topology:port": 22, "netconf-node-topology:reconnect-on-changed-schema": false, "netconf-node-topology:sleep-factor": 1.5, "netconf-node-topology:tcp-only": false, "netconf-node-topology:username": "vyatta", "node-id": "vofwl01fwl003f" } ] }- 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.toolconfig output{ "interfaces": { "vyatta-interfaces-dataplane-v1:dataplane": [ { "address": [ "192.168.20.100/24" ], "tagnode": "dp0s5" }, { "address": [ "192.168.10.100/24" ], "tagnode": "dp0s4" }, { "address": [ "dhcp" ], "tagnode": "dp0s3" } ], "vyatta-interfaces-loopback-v1:loopback": [ { "tagnode": "lo" } ] } }operational 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.tooloperational output{ "interfaces": { "statistics": { "interface": [ { "addresses": [ { "address": "10.0.200.46/24" } ], "admin-status": "up", "duplex": "full", "name": "dp0s3", "oper-status": "up", "receive-statistics": { "bytes": 26900, "dropped": 16, "errors": 0, "multicast": 223, "oversized-packets": 0, "packets": 223 }, "speed": 10000, "transmit-statistics": { "bytes": 273693, "carrier-errors": 0, "collisions": 0, "dropped": 0, "errors": 0, "packets": 305 }, "type": "dataplane" }, { "admin-status": "down", "name": "dp0s6", "oper-status": "down", "receive-statistics": { "bytes": 0, "dropped": 0, "errors": 0, "multicast": 0, "oversized-packets": 0, "packets": 0 }, "transmit-statistics": { "bytes": 0, "carrier-errors": 0, "collisions": 0, "dropped": 0, "errors": 0, "packets": 0 }, "type": "dataplane" }, { "addresses": [ { "address": "192.168.10.100/24" } ], "admin-status": "up", "duplex": "full", "name": "dp0s4", "oper-status": "up", "receive-statistics": { "bytes": 106618, "dropped": 9, "errors": 0, "multicast": 2484, "oversized-packets": 0, "packets": 2484 }, "speed": 10000, "transmit-statistics": { "bytes": 42234, "carrier-errors": 0, "collisions": 0, "dropped": 0, "errors": 0, "packets": 995 }, "type": "dataplane" }, { "addresses": [ { "address": "192.168.20.100/24" } ], "admin-status": "up", "duplex": "full", "name": "dp0s5", "oper-status": "up", "receive-statistics": { "bytes": 18706, "dropped": 8, "errors": 0, "multicast": 422, "oversized-packets": 0, "packets": 422 }, "speed": 10000, "transmit-statistics": { "bytes": 61108, "carrier-errors": 0, "collisions": 0, "dropped": 0, "errors": 0, "packets": 1411 }, "type": "dataplane" }, { "admin-status": "up", "name": "lo", "oper-status": "up", "receive-statistics": { "bytes": 1328, "dropped": 0, "errors": 0, "multicast": 0, "oversized-packets": 0, "packets": 15 }, "transmit-statistics": { "bytes": 1328, "carrier-errors": 0, "collisions": 0, "dropped": 0, "errors": 0, "packets": 15 }, "type": "loopback" } ] }, "vyatta-interfaces-dataplane-v1:dataplane": [ { "address": [ "192.168.20.100/24" ], "admin-status": "up", "duplex": "auto", "ip": { "gratuitous-arp-count": 1, "rpf-check": "disable" }, "ipv6": { "vyatta-ipv6-rtradv-v1:dup-addr-detect-transmits": 1 }, "mtu": 1500, "oper-status": "up", "speed": "auto", "tagnode": "dp0s5", "vlan-protocol": "0x8100", "vyatta-vrrp-v1:vrrp": { "start-delay": 0 } }, { "address": [ "192.168.10.100/24" ], "admin-status": "up", "duplex": "auto", "ip": { "gratuitous-arp-count": 1, "rpf-check": "disable" }, "ipv6": { "vyatta-ipv6-rtradv-v1:dup-addr-detect-transmits": 1 }, "mtu": 1500, "oper-status": "up", "speed": "auto", "tagnode": "dp0s4", "vlan-protocol": "0x8100", "vyatta-vrrp-v1:vrrp": { "start-delay": 0 } }, { "admin-status": "down", "oper-status": "down", "tagnode": "dp0s6" }, { "address": [ "dhcp" ], "admin-status": "up", "duplex": "auto", "ip": { "gratuitous-arp-count": 1, "rpf-check": "disable" }, "ipv6": { "vyatta-ipv6-rtradv-v1:dup-addr-detect-transmits": 1 }, "mtu": 1500, "oper-status": "up", "speed": "auto", "tagnode": "dp0s3", "vlan-protocol": "0x8100", "vyatta-vrrp-v1:vrrp": { "start-delay": 0 } } ], "vyatta-interfaces-loopback-v1:loopback": [ { "tagnode": "lo" } ] } }- 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
Related articles