== Packet Cable MultiMedia (PCMM) === Checking out the Packetcable PCMM project git clone https://git.opendaylight.org/gerrit/p/packetcable.git The above command will create a directory called "packetcable" with the project. === System Overview These components introduce a DOCSIS QoS Service Flow management using the PCMM protocol. The driver component is responsible for the PCMM/COPS/PDP functionality required to service requests from PacketCable Provider and FlowManager. Requests are transposed into PCMM Gate Control messages and transmitted via COPS to the CMTS. This plugin adheres to the PCMM/COPS/PDP functionality defined in the CableLabs specification. PacketCable solution is an MD-SAL compliant component. .System Overview image::pcmm-architecture.png["System Overview",width=500] === Dependency Map .Dependency Map image::pcmm-depends-map.png["Dependency Map",width=500] === Packetcable Components packetcable is comprised of three OpenDaylight bundles .Table of Bundle and Components [options="header"] |======================= | Bundle|Description | packetcable-model | Contains the YANG information model for flows and nodes | packetcable-provider | Provider hosts the model processing, RESTCONF, API implementation, and brokers requests to consumer | packetcable-driver | Driver manages PCMM Gate message over COPS for flows and CMTS connections | packetcable-consumer | Consumer is the codec for for transforming the model of nodes and flows to COPS Gate messages |======================= See link:https://git.opendaylight.org/gerrit/gitweb?p=packetcable.git;a=tree;f=packetcable-model/src/main/yang[YANG Model] === Download and Install Current instructions ==== Download link:http://nexus.opendaylight.org/content/groups/staging/org/opendaylight/integration/distribution-karaf/0.2.0-Helium/distribution-karaf-0.2.0-Helium.zip[Download] http://nexus.opendaylight.org/content/groups/staging/org/opendaylight/integration/distribution-karaf/ ==== Unzip [source, text] ---- unzip distribution-karaf-0.2.0-Helium.zip ---- ==== Run Karaf [source, text] ---- cd distribution-karaf-0.2.0-Helium/bin/ ./karaf ---- === Preparing to Work with the Packetcable PCMM Service ==== Minimum install procedure [source, text] ---- opendaylight-user@root>feature:install odl-packetcable-all ---- ==== Useful Features to Start with PCMM [source, text] ---- opendaylight-user@root>feature:install odl-restconf odl-l2switch-switch odl-dlux-core odl-mdsal-apidocs odl-packetcable-all ---- ==== Auto Starting a Series of Bundles using Karaf Edit etc/org.apache.karaf.features.cfg ‘featuresBoot' [source, text] ---- # # Comma separated list of features to install at startup # featuresBoot=config,standard,region,package,kar,ssh,management,odl-restconf,odl-l2switch-switch,odl-dlux-core,odl-mdsal-apidocs,odl-packetcable-all ---- ==== Starting Karaf as System Service ---- cd distribution-karaf-0.2.0-Helium/ sudo bin/start ---- ===== Accessing the Karaf Console [source, text] ---- ssh -p 8101 karaf@localhost ---- ===== Add These Directives to Your Operating System Profile to Change the Karaf Startup Parameters for Troubleshooting [source, text] ---- export KARAF_DEBUG=true export JAVA_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" ---- ===== Tell a Bundle to Log Debug [source, text] ---- log:set org.opendaylight.packetcable ---- ==== Management UI http://localhost:8181/dlux/index.html |======================= | user | admin | password | admin |======================= Sign in .Sign in to Dlux UI image::pcmm-dlux-login.png["Dlux Login",width=500] Manage Flows .View and Manage Flows in Dlux image::pcmm-dlux-flows.png["Dlux Flows",width=500] Manage Nodes .View and Manage Nodes in Dlux image::pcmm-dlux-nodes.png["Dlux Nodes",width=500] === Explore and exercise the PacketCable REST API http://localhost:8181/apidoc/explorer/index.html === RESTCONF API Explorer http://localhost:8181/apidoc/explorer/index.html Add a CMTS to Opendaylight Inventory .Add CMTS using RESTCONF Explorer image::pcmm-apidoc-explorer.png["Add CMTS using RESTCONF Explorer",width=500] === Postman link:https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en[Configure the Chrome browser] Download and import sample link:https://git.opendaylight.org/gerrit/gitweb?p=packetcable.git;a=tree;f=packetcable-client[packetcable collection] for Postman. .Postman Collection for Packetcable PCMM image::pcmm-postman.png["Postman",width=500] === Custom Testsuite Most of the tests for RESTCONF can be adapted for PCMM and service flow testing. The following list of Packetcable client testing. Browse this folder for tests and examples used for testing. ==== restconfapi.py Scripted series of packetcable actions testing compliance. Other flows can be formulated and added to create a regression test of what kind of flows are interesting for use cases. ==== flow_config_perf_pcmm.py For load testing there is this nice tool that could be repurpose to load test a CMTS. === Using Wireshark to Trace PCMM To start wireshark with privileges issue the following command: [source, text] ---- sudo wireshark & ---- Select the interface to monitor. Use the Filter to only display COPS messages by applying “cops” in the filter field. .Using Wireshark to View COPS image::pcmm-wireshark.png["Wireshark",width=500] === Debugging and Verifying DQoS Gate (Flows) on the CMTS Below are some of the most useful CMTS commands to verify flows have been enabled on the CMTS. ==== Cisco link:http://www.cisco.com/c/en/us/td/docs/cable/cmts/cmd_ref/b_cmts_cable_cmd_ref.pdf[Cisco CMTS Cable Command Reference] === Find the Cable Modem [source,text] ---- 10k2-DSG#show cable modem D MAC Address IP Address I/F MAC Prim RxPwr Timing Num I State Sid (dBmv) Offset CPE P 0010.188a.faf6 0.0.0.0 C8/0/0/U0 offline 1 0.00 1482 0 N 74ae.7600.01f3 10.32.115.150 C8/0/10/U0 online 1 -0.50 1431 0 Y 0010.188a.fad8 10.32.115.142 C8/0/10/UB w-online 2 -0.50 1507 1 Y 000e.0900.00dd 10.32.115.143 C8/0/10/UB w-online 3 1.00 1677 0 Y e86d.5271.304f 10.32.115.168 C8/0/10/UB w-online 6 -0.50 1419 1 Y ---- ==== Show PCMM Plugin Connection [source,text] ---- 10k2-DSG#show packetcabl ? cms Gate Controllers connected to this PacketCable client event Event message server information gate PacketCable gate information global PacketCable global information 10k2-DSG#show packetcable cms GC-Addr GC-Port Client-Addr COPS-handle Version PSID Key PDD-Cfg 10k2-DSG#show packetcable cms GC-Addr GC-Port Client-Addr COPS-handle Version PSID Key PDD-Cfg 10.32.0.240 54238 10.32.15.3 0x4B9C8150/1 4.0 0 0 0 ---- ==== Show COPS Messages [source,text] ---- debug cops details ---- ==== Use CM Mac Address to List Service Flows [source,text] ---- 10k2-DSG#show cable modem D MAC Address IP Address I/F MAC Prim RxPwr Timing Num I State Sid (dBmv) Offset CPE P 0010.188a.faf6 --- C8/0/0/UB w-online 1 0.50 1480 1 N 74ae.7600.01f3 10.32.115.150 C8/0/10/U0 online 1 -0.50 1431 0 Y 0010.188a.fad8 10.32.115.142 C8/0/10/UB w-online 2 -0.50 1507 1 Y 000e.0900.00dd 10.32.115.143 C8/0/10/UB w-online 3 0.00 1677 0 Y e86d.5271.304f 10.32.115.168 C8/0/10/UB w-online 6 -0.50 1419 1 Y 10k2-DSG#show cable modem 000e.0900.00dd service-flow SUMMARY: MAC Address IP Address Host MAC Prim Num Primary DS Interface State Sid CPE Downstream RfId 000e.0900.00dd 10.32.115.143 C8/0/10/UB w-online 3 0 Mo8/0/2:1 2353 Sfid Dir Curr Sid Sched Prio MaxSusRate MaxBrst MinRsvRate Throughput State Type 23 US act 3 BE 0 0 3044 0 39 30 US act 16 BE 0 500000 3044 0 0 24 DS act N/A N/A 0 0 3044 0 17 UPSTREAM SERVICE FLOW DETAIL: SFID SID Requests Polls Grants Delayed Dropped Packets Grants Grants 23 3 784 0 784 0 0 784 30 16 0 0 0 0 0 0 DOWNSTREAM SERVICE FLOW DETAIL: SFID RP_SFID QID Flg Policer Scheduler FrwdIF Xmits Drops Xmits Drops 24 33019 131550 0 0 777 0 Wi8/0/2:2 Flags Legend: $: Low Latency Queue (aggregated) ~: CIR Queue ---- ==== Deleting a PCMM Gate Message from the CMTS [source,text] ---- 10k2-DSG#test cable dsd 000e.0900.00dd 30 ---- ==== Find service flows All gate controllers currently connected to the PacketCable client are displayed [source,text] ---- show cable modem 00:11:22:33:44:55 service flow ???? show cable modem ---- ==== Debug and display PCMM Gate messages [source,text] ---- debug packetcable gate control debug packetcable gate events show packetcable gate summary show packetcable global show packetcable cms ---- ==== Debug COPS messages [source,text] ---- debug cops detail debug packetcable cops debug cable dynamic_qos trace ---- === Arris Pending === RESTCONF API for Packetcable PCMM ==== CMTS CMTS can be read, created, updated and deleted by a user having the correct role. An ID is used to identify where to read or save the CMTS node. ===== Read [cols="h,5a"] |=== | URL | /restconf/config/opendaylight-inventory:nodes/node/[id]/packetcable-cmts:cmts-node/ | Method | GET | Request Body | // include::cmts-get-request.json.adoc[] [source,json] ---- {} ---- | Response Body | // include::cmts-get-response.json.adoc[] [source,json] ---- {} ---- | Return Codes | 201 |=== ===== Create [cols="h,5a"] |=== | URL | /restconf/config/opendaylight-inventory:nodes/node/[id]/packetcable-cmts:cmts-node/ | Method | PUT | Request Body | // include::cmts-put-response.json.adoc[] [source,json] ---- { "packetcable-cmts:cmts-node": { "port": "3918", "address": "10.200.90.3" } } ---- | Response Body | [source,json] ---- {} ---- | Return Codes | 201 |=== ===== Delete [cols="h,5a"] |=== | URL | /restconf/config/opendaylight-inventory:nodes/node/[id]/packetcable-cmts:cmts-node/ | Method | DELETE | Request Body | // include::cmts-delete-request.json.adoc[] [source,json] ---- {} ---- | Response Body | [source,json] ---- {} ---- | Return Codes | 201 |=== ==== Flows Flows can be read, created, updated and deleted by a user having the correct role. A CMTS ID is used to identify which CMTS node to read or save the flow. Note: The Table ID is not used. ===== Read [cols="h,5a"] |=== | URL | /restconf/config/opendaylight-inventory:nodes/node/[cmts id]/table/0/flow/[flow id] | Method | GET | Request Body | // include::flow-get-request.json.adoc[] [source,json] ---- {} ---- | Response Body | // include::flow-get-response.json.adoc[] [source,json] ---- { "flow": { "cookie": "101", "cookie_mask": "255", "flow-name": "FooXf7", "hard-timeout": "1200", "id": "256", "idle-timeout": "3400", "installHw": "false", "instructions": { "instruction": { "apply-actions": { "action": { "order": "0", "traffic-profile": "best-effort" } }, "order": "0" } }, "match": { "ethernet-match": { "ethernet-type": { "type": "34525" } }, "ip-match": { "ip-dscp": "60", "ip-ecn": "3", "ip-protocol": "6" }, "ipv6-destination": "fe80:2acf:e9ff:fe21::6431/94", "ipv6-source": "1234:5678:9ABC:DEF0:FDCD:A987:6543:210F/76", "tcp-destination-port": "8080", "tcp-source-port": "183" }, "priority": "2", "strict": "false", "table_id": "2" } } ---- |=== ===== Create [cols="h,5a"] |=== | URL | /restconf/config/opendaylight-inventory:nodes/node/[cmts id]/table/0/flow/[flow id] | Method | PUT | Request Body | // include::flow-put-response.json.adoc[] [source,json] ---- { "flow": { "barrier": "false", "flow-name": "FooXCableFlowCrazyTrafficProfileFBesteffort1", "id": "115", "installHw": "false", "instructions": { "instruction": { "apply-actions": { "action": { "traffic-profile": "best-effort", "be-authorized-envelope": { "traffic-priority":"0", "reserved0":"0", "reserved1":"0", "request-transmission-policy":"0", "maximum-sustained-traffic-rate":"0", "maximum-traffic-burst":"3044", "maximum-reserved-traffic-rate":"0", "traffic-rate-packet-size-maximum-concatenated-burst":"0", "assumed-minimum-reserved":"1522", "required-attribute-mask":"0", "forbidden-attribute-mask":"0", "attribute-aggregation-rule-mask":"0", }, "be-reserved-envelope": { "traffic-priority":"0", "reserved0":"0", "reserved1":"0", "request-transmission-policy":"0", "maximum-sustained-traffic-rate":"0", "maximum-traffic-burst":"3044", "maximum-reserved-traffic-rate":"0", "traffic-rate-packet-size-maximum-concatenated-burst":"0", "assumed-minimum-reserved":"1522", "required-attribute-mask":"0", "forbidden-attribute-mask":"0", "attribute-aggregation-rule-mask":"0", }, "be-committed-envelope": { "traffic-priority":"0", "reserved0":"0", "reserved1":"0", "request-transmission-policy":"0", "maximum-sustained-traffic-rate":"0", "maximum-traffic-burst":"3044", "maximum-reserved-traffic-rate":"0", "traffic-rate-packet-size-maximum-concatenated-burst":"0", "assumed-minimum-reserved":"1522", "required-attribute-mask":"0", "forbidden-attribute-mask":"0", "attribute-aggregation-rule-mask":"0", } "order": "0" } }, "order": "0" } }, "match": { "ethernet-match": { "ethernet-type": { "type": "2048" } }, "ipv4-destination": "10.0.0.1/24" }, "priority": "2", } } ---- | Response Body | [source,json] ---- {} ---- | Return Codes | 201 |=== ===== Delete [cols="h,5a"] |=== | URL | /restconf/config/opendaylight-inventory:nodes/node/[cmts id]/table/0/flow/[flow id] | Method | DELETE | Request Body | // include::flow-delete-request.json.adoc[] [source,json] ---- {} ---- | Response Body | // include::flow-delete-request.json.adoc[] [source,json] ---- {} ---- | Return Codes | 201 |=== ==== Specifications and References The packetcable-driver was written to the link:http://www.cablelabs.com/wp-content/uploads/specdocs/PKT-SP-MM-I05-091029.pdf[PacketCable Specification Multimedia Specification PKT-SP-MM-I05-091029]