question

pouya avatar image
pouya asked jkho commented

When I generate UDP traffic with STC4.42, in wireshark I see BAD UDP Letgth. Why ?

When I generate UDP traffic with STC4.42, in wireshark I see BAD UDP Letgth. Why ?

I attched packet editor and wireshark screenshot.

captureudpstc 4.42wire
wireshark.jpg (208.3 KiB)
packeteditor.jpg (81.0 KiB)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jkho avatar image
jkho answered jkho commented

The frame configuration doesn't appear to have an actual UDP header configured. Setting the IPv4 protocol field value to UDP will not automatically add the UDP header into the frame configuration.

From the packet capture, the data after the IPv4 header is the fill pattern. Hence, the UDP frame length decoded by wireshark is incorrect.

2 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

pouya avatar image pouya commented ·

In STC how I can add/edit UDP or TCP header to packets?

Can you explain more about second sentence, is wiresharak decoding incorrect?

0 Likes 0 ·
jkho avatar image jkho pouya commented ·

In the StreamBlock editor in the Frame tab (the picture you posted of the editor), click on "Add Header(s)" under the "Actions" section on the left hand side. The list of available headers will show up including TCP or UDP (should be under the IP category, if I remember correctly).

Wireshark is correctly identifying the field length as bad based on the expectation that an actual UDP header is after the IPv4 header in the frame. It expects a UDP header to be present since the protocol field in the IPv4 header is set to UDP. The correct value of the UDP length field should be size of the UDP header + payload.

1 Like 1 ·
kseggelke avatar image
kseggelke answered pouya commented

What test module is been used in the test? Is the frame length of the packet modified or fixed? Please provide STC config.

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

pouya avatar image pouya commented ·

I use CM1G on a SPT-N11U. The frame length is fixed 1024, or 512 .

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.