简体   繁体   中英

Understanding DPDK pktgen's destination addressing

I have two Emulab servers, both configured for DPDK. One (call it the client) runs pktgen ; the other (call it the server) runs l2fwd .

On the client side, I see the following in the pktgen output:

    Src/Dest Port     :         1234 / 5678
    Pkt Type:VLAN ID  :     IPv4 / TCP:0001
    Dst  IP Address   :         192.168.1.1
    Src  IP Address   :      192.168.0.1/24
    Dst MAC Address   :   00:00:00:00:00:00
    Src MAC Address   :   a0:36:9f:08:1c:28

According to l2fwd 's output, the server is receiving packets from the client.

I think I'm missing something about how addressing works here; the server's DPDK-enabled interface should not have an IP address (I never assigned it one). The client seems not to have a Dst MAC for its packets.

How is the server getting these packets? Is the client just broadcasting to the network? Shouldn't the IP address be FF:FF:FF:FF:FF:FF, then?

Answering your questions:

the server's DPDK-enabled interface should not have an IP address (I never assigned it one)

No, it should not. But l2fwd stands for OSI Layer 2 forwarding, ie switching. Switching does not need any IPs to work.

The client seems not to have a Dst MAC for its packets.

From the output, the destination MAC is all zeros. You can change it with set mac <portlist> <mac> CLI command.

How is the server getting these packets? Is the client just broadcasting to the network? Shouldn't the IP address be FF:FF:FF:FF:FF:FF, then?

I guess, in your case it is an unknown unicast + promiscuous mode on server. Switch in the middle does not have address 00:00:00:00:00:00 in its MAC table, so it is flooding the unknown unicast to all the ports (except the source and within VLAN).

Server receives this frame because it puts the port into the promiscuous mode, so NIC accept all the frames, not just addressed to the NIC's MAC.

Hope this answers your questions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM