此产品的文档集力求使用非歧视性语言。在本文档集中,非歧视性语言是指不隐含针对年龄、残障、性别、种族身份、族群身份、性取向、社会经济地位和交叉性的歧视的语言。由于产品软件的用户界面中使用的硬编码语言、基于 RFP 文档使用的语言或引用的第三方产品使用的语言,文档中可能无法确保完全使用非歧视性语言。 深入了解思科如何使用包容性语言。
思科采用人工翻译与机器翻译相结合的方式将此文档翻译成不同语言,希望全球的用户都能通过各自的语言得到支持性的内容。 请注意:即使是最好的机器翻译,其准确度也不及专业翻译人员的水平。 Cisco Systems, Inc. 对于翻译的准确性不承担任何责任,并建议您总是参考英文原始文档(已提供链接)。
本文档介绍如何使用TSDuck工具包、VLC和cBR-8配置数字视频广播 — 电缆(DVB-C)实验场景。
Cisco 建议您了解以下主题:
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
本文档中介绍的场景(如下图所示)包括cBR-8作为iCMTS、用作带VLC的视频流处理器的Linux虚拟机(VM)和带TSDuck的Linux虚拟机。DVB-Symulcrypt加密系统被重新创建,其中cBR8充当同步器(SCS),而TSDuck VM充当授权控制消息生成器(ECMG)角色,就像它充当Nagra服务器一样。
充当流处理器的VM只发送本地存储的视频唇,该视频唇为模拟连续流而循环。cBR-8为此模拟配置了一个基于表的(静态)会话,并且没有机顶盒(STB)或调制解调器请求VoD流,它在流处理器上手动启动。
收到流后,cBR-8会尝试与已配置的ECMG服务器通信,以加密视频流,并交换上图中呼叫流中描述的消息。这些消息与TSDuck清除交换,这有助于分析消息和调试的内容。此外,TSDuck对发送的所有请求做出回复,而不检查参数的正确性,如ca-system-id、access-criteria等。
如果cBR-8无法与ECMG通信,则由于指令fail-to-clear,流将以明文形式发送出去。
在实例场景中,需要向STB发送授权管理消息(EMM),该消息授权接收方解密特定控制字(CW)。 EMM可通过cBR-8或通过单独的通道发送到接收器,TSDuck还具有模拟EMM生成器(EMMG)的功能
以下是如何在cBR-8上配置DVB视频会话的示例。访问标准通常由条件访问系统(CAS)提供,在本模拟例中,您可以生成随机十六进制数以及ca-system-id。
virtual-edge-input-ip是流的IP目标,在本例中,它不是真正的目标,但必须是用于从流处理器发送视频流的相同IP。
cable video encryption linecard 1/0 ca-system dvb scrambler dvb-csa dvb ecmg NAGRA_ELK id 1 mode tier-based type nagra ca-system-id 2775 3 auto-channel-id ecm-pid-source auto 48 8190 connection id 1 priority 1 10.48.88.12 3337 overrule min-cp-duration 300000 tier-based ecmg name NAGRA_ELK access-criteria c972bfd7701e6d28069ae85f5d701d63ac1aec4a fail-to-clear enable service-distribution-group SDG-ACDC-LAB-TEST1 id 1 onid 100 rf-port integrated-cable 1/0/3 virtual-carrier-group VCG-ACDC-LAB-TEST1 id 1 encrypt service-type narrowcast rf-channel 32-35 tsid 42496-42499 output-port-number 1-4 bind-vcg vcg VCG-ACDC-LAB-TEST1 sdg SDG-ACDC-LAB-TEST1 logical-edge-device LED-ACDC-LAB-TEST1 id 1 protocol table-based virtual-edge-input-ip 10.10.10.10 input-port-number 1 vcg VCG-ACDC-LAB-TEST1 active table-based vcg VCG-ACDC-LAB-TEST1 rf-channel 32 session vod1 input-port 1 start-udp-port 65 num-sessions-per-qam 1 processing-type remap start-program 1 ! controller Integrated-Cable 1/0/3 max-carrier 44 base-channel-power 40 rf-chan 32 35 type VIDEO frequency 850000000 rf-output NORMAL power-adjust 0.0 qam-profile 3
在此设备上,您只需从命令行安装VLC,然后启动本地存储的视频文件流。
您可以参阅官方文档。
安装VLC后,以下命令行显示如何启动名为cisco-tac-lab.mov的文件流,指定cBR-8上的目标IP和端口、tsid和端口,并循环视频以模拟连续流( — 重复):
cvlc cisco-tac-lab.mov —sout '#duplicate{dst=udp{mux=ts,dst=10.10.10:65,tsid=42496,port=65}}' — 重复和
从官方网站下载TSDuck:TSDuck,请参阅用户指南文档以安装和查找功能信息。
安装TSDuck后,可以在特定端口(-p)上运行ECMG功能,并使用详细选项(-v)和所需的调试级别(-d#)。
示例:
sudo tsecmg -p 3337 -v -d7
在cBR-8上配置视频会话后,可以验证会话是否已创建,因为这是基于表的配置,会话始终存在,并且不显示输入流:
acdc-cbr8-2#show cable video session all Session Output Frequency Streaming Sess Session Source UDP Output Input Output Input Output Encrypt Encrypt Low PMV Session Id Port Hz Type Type Ucast Dest IP/Mcast IP (S,G) Port Program State State Bitrate Bitrate Type Status Lat NUM Name ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1048576 1 850000000 Remap UDP 10.10.10.10 65 1 OFF ON 0 0 DVB Pending N - vod1.1.0.1.32.65
启动视频流后,您会看到该视频流以明文形式发送,如果ECMG尚未启动,则cBR-8上的指令“fail-to-clear”:
acdc-cbr8-2#show cable video sess logical-edge-device id 1 Session Output Frequency Streaming Sess Session Source UDP Output Input Output Input Output Encrypt Encrypt Low PMV Session Id Port Hz Type Type Ucast Dest IP/Mcast IP (S,G) Port Program State State Bitrate Bitrate Type Status Lat NUM Name ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1048576 1 850000000 Remap UDP 10.10.10.10 65 1 ACTIVE-PSI ON 15403951 15164562 DVB Clear N - vod1.1.0.1.32.65
当您也启动ECMG时,您可以看到视频会话现在已加密:
acdc-cbr8-2#sh cable video sess logical-edge-device id 1 Session Output Frequency Streaming Sess Session Source UDP Output Input Output Input Output Encrypt Encrypt Low PMV Session Id Port Hz Type Type Ucast Dest IP/Mcast IP (S,G) Port Program State State Bitrate Bitrate Type Status Lat NUM Name ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1048576 1 850000000 Remap UDP 10.10.10.10 65 1 ACTIVE-PSI ON 15353613 15476997 DVB Encrypted N - vod1.1.0.1.32.65
加密会话的详细信息:
acdc-cbr8-2#sh cable video sess logical-edge-device id 1 session-id 1048576 Session Name : vod1.1.0.1.32.65 Session Id : 1048576 Creation Time : Thu Dec 6 14:12:54 2018 Output Port : 1 TSID : 42496 ONID : 100 Number of Sources : 1 Destination IP : 10.10.10.10 UDP Port : 65 Config Bitrate : not specified Jitter : 100 ms Processing Type : Remap Stream Rate : VBR Program Number : 1 Idle Timeout : 2000 msec Init Timeout : 2000 msec Off Timeout : 60 sec Encryption Type : DVB Encryption Status : Encrypted Input Session Stats: ==================== State: ACTIVE-PSI, Uptime: 0 days 00:31:33 IP Packets: In 899927, RTP 0, Drop 0 TP Packets: In 6299489, PCR 6408, PSI 4424, Null 0 Unreference 2212, Discontinuity 0 Errors: Sync loss 0, CC error 795, PCR Jump 7, Underflow 215, Overflow 4, Block 0 Bitrate: Measured 16483732 bps, PCR 17930489 bps Output Session Stats: ===================== State: ON, Uptime: 0 days 00:31:33 TP Packets: In 6297330, PCR 6395, PSI 4416, Drop 12801, Forward 6280113, Insert 6029 Errors: Info Overrun 0, Info Error 0, Block 0, Overdue 54210, Invalid Rate 0, Underflow 0, Overflow 0 Bitrate: Measured 16433824 bps PAT Info: ========= Version 26, TSID 8724, len 16, section 0/0 Program 1: PMT 32 Input PMT Info: =============== Program 1, Version 28, PCR 100, Info len 0 PID 100: Type 27, Info len 6, (lang eng) Output PMT Info: ================ Program 1, Version 5, PCR 49, Info len 6, (CA SYS-ID 10101, PID 79) PID 49: Type 27, Info len 6, (lang eng) Output PID Map: =============== PID 32 -> 48 PID 100 -> 49
显示ECMG连接状态的命令:
acdc-cbr8-2#show cable video encryption dvb ecmg id 1 connection --------------------------------------------------------------------------------------------------------------------------------------------------- ECMG ECMG ECMG CA Sys CA Subsys PID Lower Upper Streams/ Open Streams/ Auto Chan Slot ECMG ECMG ID Name Type ID ID Source limit limit ECMG ECMG ID Connections Application --------------------------------------------------------------------------------------------------------------------------------------------------- 1 NAGRA_ELK nagra 0x2775 0x3 auto 48 8190 1 1 Enabled RP 1 Tier-Based ECMG Connections for ECMG ID = 1 ----------------------------------------------------------------- Conn Conn IP Port Channel Conn Open -ID Priority Address Number ID Status Streams ----------------------------------------------------------------- 1 1 10.48.88.12 3337 1 Open 1 -----------------------------------------------------------------
注意:一旦cBR-8接收到ECM,ECM将存储在缓存中,如果与ECMG的连接丢失,则缓存的ECM将用于加密,直到收到新的ECM。
由于启用了调试,您可以看到ECMG和SCS之间交换的所有消息(请参阅初始图中所示的呼叫流):
cisco@simulcrypt:~$ sudo tsecmg -p 3337 -v -d7 debug level set to 7 * Debug: setting socket reuse address to 1 * Debug: binding socket to 0.0.0.0:3337 * Debug: server listen, backlog is 5 * TCP server listening on 0.0.0.0:3337, using ECMG <=> SCS protocol version 2 * Debug: server accepting clients * Debug: received connection from 88.88.88.89:56102 * Debug: server accepting clients * 88.88.88.89:56102: 2018/12/06 14:38:35: session started * Debug: received message from 88.88.88.89:56102 channel_setup (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0001 ECM_channel_id = 0x0001 Super_CAS_id = 0x27750003 * Debug: sending message to 88.88.88.89:56102 channel_status (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0003 ECM_channel_id = 0x0001 section_TSpkt_flag = 1 AC_delay_start = 200 AC_delay_stop = 200 delay_start = 200 delay_stop = 200 transition_delay_start = -500 transition_delay_stop = 0 ECM_rep_period = 100 max_streams = 0 min_CP_duration = 10 lead_CW = 1 CW_per_msg = 2 max_comp_time = 100 * Debug: received message from 88.88.88.89:56102 stream_setup (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0101 ECM_channel_id = 0x0001 ECM_stream_id = 0x0001 ECM_id = 0x0001 nominal_CP_duration = 100 * Debug: sending message to 88.88.88.89:56102 stream_status (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0103 ECM_channel_id = 0x0001 ECM_stream_id = 0x0001 ECM_id = 0x0001 access_criteria_transfer_mode = 0 * Debug: received message from 88.88.88.89:56102 CW_provision (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0201 ECM_channel_id = 0x0001 ECM_stream_id = 0x0001 CP_number = 0 access_criteria (20 bytes) = C9 72 BF D7 70 1E 6D 28 06 9A E8 5F 5D 70 1D 63 AC 1A EC 4A CP = 0 CW (8 bytes) = 4E 0A 45 9D DC 10 4A 36 CP = 1 CW (8 bytes) = AB FF 00 AA 9C 4F 11 FC * Debug: sending message to 88.88.88.89:56102 ECM_response (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0202 ECM_channel_id = 0x0001 ECM_stream_id = 0x0001 CP_number = 0 ECM_datagram (188 bytes) = 47 5F FF 10 00 80 70 35 80 AA 03 00 30 00 10 00 08 4E 0A 45 9D DC 10 4A 36 00 11 00 08 AB FF 00 AA 9C 4F 11 FC 00 12 00 14 C9 72 BF D7 70 1E 6D 28 06 9A E8 5F 5D 70 1D 63 AC 1A EC 4A FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF * Debug: received message from 88.88.88.89:56102 channel_test (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0002 ECM_channel_id = 0x0001 * Debug: sending message to 88.88.88.89:56102 channel_status (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0003 ECM_channel_id = 0x0001 section_TSpkt_flag = 1 AC_delay_start = 200 AC_delay_stop = 200 delay_start = 200 delay_stop = 200 transition_delay_start = -500 transition_delay_stop = 0 ECM_rep_period = 100 max_streams = 0 min_CP_duration = 10 lead_CW = 1 CW_per_msg = 2 max_comp_time = 100 * Debug: received message from 88.88.88.89:56102 stream_test (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0102 ECM_channel_id = 0x0001 ECM_stream_id = 0x0001 * Debug: sending message to 88.88.88.89:56102 stream_status (ECMG<=>SCS) protocol_version = 0x02 message_type = 0x0103 ECM_channel_id = 0x0001 ECM_stream_id = 0x0001 ECM_id = 0x0001 access_criteria_transfer_mode = 0
在cBR-8上,您可以使用设置为调试或噪音级别的相应管理引擎平台跟踪排除加密问题(不要忘记在末尾恢复通知级别):
set platform software trace sup-veman rp active scs debug
cBR-8和ECMG之间正确交换消息的过程如下所示:
show platform software trace message sup-veman rp active reverse 12/07 15:34:43.963 [scs]: [47872]: (debug): ECMG Send channel_setup for channel_id 1 12/07 15:34:43.965 [scs]: [47872]: (debug): ECMG Received channel_status for channel_id 1 12/07 15:34:43.965 [scs]: [47872]: (info): ECMG Channel 0 setup to ip 10.48.88.12 port 3337 12/07 15:34:43.965 [scs]: [47872]: (debug): Open stream 1 12/07 15:34:43.965 [scs]: [47872]: (debug): ECMG Send stream_setup for channel_id 1, stream_id 1 12/07 15:34:43.965 [scs]: [47872]: (debug): ECMG Received stream_status for channel_id 1, stream_id 1 12/07 15:34:43.965 [scs]: [47872]: (info): ECMG Stream 1 setup to ip 10.48.88.12 port 3337 12/07 15:34:43.965 [scs]: [47872]: (debug): Request ECM for CP 0 12/07 15:34:43.965 [scs]: [47872]: (debug): ECMG Send CW_provision with 20 AC bytes for channel_id 1, stream_id 1 12/07 15:34:43.966 [scs]: [47872]: (debug): Received ECM_response for channel_id 1, stream_id 1 12/07 15:34:43.966 [scs]: [47872]: (debug): ECMGp: Forward ECM pkts to SCS 12/07 15:34:43.966 [scs]: [47872]: (debug): Received ECM for CP 0 12/07 15:34:56.015 [scs]: [47872]: (debug): ECMG Send channel_test for channel_id 1 12/07 15:34:56.016 [scs]: [47872]: (debug): ECMG Received channel_status for channel_id 1 12/07 15:35:18.039 [scs]: [47872]: (debug): ECMG Send stream_test for channel_id 1, stream_id 1 12/07 15:35:18.042 [scs]: [47872]: (debug): ECMG Received stream_status for channel_id 1, stream_id 1