如何利用trex-emu中rtsp客戶端模組測試iptv功能
阿新 • • 發佈:2022-04-22
如何利用trex-emu中rtsp客戶端模組測試iptv功能
測試環境
採用虛擬機器搭建的環境,配置如下:
sudo cat /etc/trex_cfg.yaml ### Config file generated by dpdk_setup_ports.py ### - version: 2 interfaces: ['02:02.0', '02:03.0'] low_end: true stack: linux_based port_info: - ip: 10.10.10.2 default_gw: 10.10.10.1 - ip: 20.20.20.2 default_gw: 20.20.20.1 platform: master_thread_id: 0 latency_thread_id: 1 dual_if: - socket: 0 threads: [2,3]
測試步驟如下:
- 啟動trex-core和trex-console
sudo ./t-rex-64 -i -emu
sudo ./trex-console
啟動支援emu plugin功能的trex-core程式
啟動trex-console
- 新增ffmpeg伺服器端節點並啟動
trex> service trex(service)>plugins load ffmpeg trex(service)>plugins ffmpeg add_node -p 0 -m 00:0c:29:69:39:60 --ipv4 10.10.10.8 --ipv4-subnet 24 --dgv4 10.10.10.1 --mtu 1500
啟動trex-console後進入service模式;
載入ffmpeg模組
新增ffmpeg服務節點並啟動
- 載入emu plugin
trex(service)>plugins load emu Unloading plugin: emu Disconnecting from server at 'localhost':'4510' [SUCCESS] [SUCCESS] Connecting to RPC server on localhost:4510 [SUCCESS] Loading plugin: emu [SUCCESS]
- 啟用抓包功能
trex(service)>capture monitor start --tx 1 --rx 1 -v
*** Stopping old monitor to open new one. ***
Stopping capture monitor [SUCCESS]
Starting stdout capture monitor - verbose: 'high' [SUCCESS]
*** use 'capture monitor stop' to abort capturing... ***
trex(service)>
- 載入rtsp客戶端外掛功能
trex(service)>emu_load_profile -f emu/simple_rtsp.py -t --ns 1 --client 10 --server_ip 10.10.10.8 --server_port 8554 --uri rtsp://10.10.10.8:8554/upstream
Converting file to profile [SUCCESS]
Converting profile took: 1.33 [ms]
Removing old emu profile
[SUCCESS]
Sending emu profile
[SUCCESS]
Sending profile took: 17.24 [ms]
19.22 [ms]
trex(service)>