如何利用trex-emu中rtsp客户端模块测试iptv功能

如何利用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]

测试步骤如下:

  1. 启动trex-core和trex-console
sudo ./t-rex-64 -i -emu
sudo ./trex-console

启动支持emu plugin功能的trex-core程序

启动trex-console

  1. 添加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服务节点并启动

  1. 加载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]
  1. 启用抓包功能
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)>
  1. 加载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)>
posted @ 2022-04-22 14:13  staylight  阅读(225)  评论(0编辑  收藏  举报