【Trex试用】emu icmp功能测试

trex配置文件
trex_cfg.yaml

  • port_limit : 2
    version : 2
    #List of interfaces. Change to suit your setup. Use ./dpdk_setup_ports.py -s to see available options
    interfaces : [“00:09.0”,“00:0a.0”]
    port_info : # Port IPs. Change to suit your needs. In case of loopback, you can leave as is.
    - ip : 10.1.1.2
    default_gw : 10.1.1.1
    - ip : 10.1.1.1
    default_gw : 10.1.1.2
    启动trex 服务
    ./t-rex-64 -i --software --emu
    启动trex-console
    ./trex-console
    trex>plugins load emu

加载profile
trex>emu_load_profile -f emu/simple_icmp.py -t --ns 1 --clients 3

Converting file to profile [SUCCESS]

Converting profile took: 3.53 [ms]

Removing old emu profile [SUCCESS]

Sending emu profile
[SUCCESS]

Sending profile took: 20.41 [ms]
26.36 [ms]

simple_icmp.py文件如下:在trex emu目录下

ping模拟的设备
trex>portattr -a
Port Status

 port       |          0           |          1           

----------------±---------------------±--------------------
driver | net_e1000_em | net_e1000_em
description | 82545EM Gigabit Et | 82545EM Gigabit Et
link status | UP | UP
link speed | 1 Gb/s | 1 Gb/s
port status | IDLE | IDLE
promiscuous | off | off
multicast | off | off
flow ctrl | none | none
vxlan fs | - | -
– | |
layer mode | IPv4 | IPv4
src IPv4 | 10.1.1.2 | 10.1.1.1
IPv6 | off | off
src MAC | 00:0c:29:49:2d:16 | 00:0c:29:49:2d:0c
— | |
Destination | 10.1.1.1 | 10.1.1.2
ARP Resolution | 00:0c:29:49:2d:0c | 00:0c:29:49:2d:16
---- | |
VLAN | - | -
----- | |
PCI Address | 0000:02:08.0 | 0000:02:07.0
NUMA Node | 0 | 0
RX Filter Mode | hardware match | hardware match
RX Queueing | off | off
Grat ARP | off | off
------ | |
trex>emu_show_all
Namespace #1 Information

Port | Vlan tags | Tpids | Plugins | #Clients
-----±----------±------±----------±--------
0 | - | - | arp, icmp | 3

Clients Information

   MAC        |  IPv4   | DG-IPv4 | MTU  |  Plugins  

------------------±--------±--------±-----±---------
00:00:00:70:00:03 | 1.1.1.3 | 1.1.1.1 | 1500 | arp, icmp
00:00:00:70:00:04 | 1.1.1.4 | 1.1.1.1 | 1500 | arp, icmp
00:00:00:70:00:05 | 1.1.1.5 | 1.1.1.1 | 1500 | arp, icmp

48.55 [ms]

trex>emu_icmp_ping -p 0 --mac 00:00:00:70:00:03

Starting to ping : [SUCCESS]

Progress: 100.00%, Sent: 5/5, Rcv: 0/5, Err: 0/5, RTT min/avg/max = 0.00/0.00/0.00 ms

Completed

参考https://www.cnblogs.com/liudf0716/p/15796785.html

收到的报文是0,RTT都是0,说明没有收到ping的回复报文,需要排查是什么原因

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值