What's the meaning of the tshark output fields? - tcp

Dear wireshark experts,
I got a tshark output image on ubuntu 16.04 after I ran the command curl www.baidu.com, as shown below. But I can't tell you the story from the output lines, because I can't find any mathematical relationships betweens the lines.
Could someone explain the meaning of each line, especially the field Ack and Win?
So appreciated in advance!

That's not related to tshark/wireshark, but generally to TCP protocol:
ACK (and SYN) are tcp flags being set during connection establishment
Win is also tcp parameter. see Window size

FrameNumber Timestamp Source-IP-Address -> Destination-IP-Address Protocol TCP-Source-Port TCP-Destination-Port [TCP-FLAGS] Protocol-Specific-Description
SYN/ACK/WIN are related to the TCP protocol which is used for reliable transmission on top of the unreliable IP network

Related

why does TCP over VXLAN in mininet stop sending after switching tunnel?

topology
This is my experimental setup in Mininet. VM1 and VM2 are separate Virtualbox VM instances running on my computer connected by Bridged adapter, and S1 and S2 are connected with vxlan forwarding.
Then I used D-ITG on H1 and H2 to generate traffic. I send TCP traffic from H1 to H2 and use wireshark to capture. During a 10sec TCP flow, I used a python script that changes the tunnel id of the first rule on S1 from 100 to 200.
If the packet/sec rate and payload size is small enough, the TCP session does not seem to be affected, but when I start sending around 100 packet/sec each with payload of 64 bytes, TCP stop sending after receiving a dup ACK. Here is the wireshark capture:
wireshark1
wireshark2
On the link between H1 and S1 I received ICMP destination unreachable (fragmentation needed).
After the two errors, TCP stopped sending. I understand that the "previous segment not captured" is caused by the fact that when I alter the S1 routing table, there is some down time and packets are dropped by the switch. However, I don't understand why TCP does not initiate retransmission.
This does not happen if I reduce the packet rate or the payload to a smaller amount, or if I use UDP. Is this an issue with the TCP stack, or maybe D-ITG? Or maybe it is an issue with the sequence numbers? Is there a range where if very previous packets are not ACKed, they will not be retransmitted?
This problem has been bothering me for a while, so I hope someone here can maybe provide some clarification. Thanks a lot for reading XD.
I suspected it may be a problem with mininet NICs, so I tried to disable TCP fragmentation offload, and it worked much better. I suppose that the virtual NICs in mininet in a VM could not handle the large amount of traffic generated by D-ITG, so using TCP fragmentation offload can overload? the NIC and cause segmentation errors.
This is just my speculation, but disabling TSO did help my case. Additional input is welcomed!

Wireshark not showing SNMP

I am having an issue with wireshark capture. The wireshark doesn't show SNMP protocol but as UDP and complaints as malformed packet.1: https://i.stack.imgur.com/EXcfN.jpg May I know the reason and solution for this issue.
Thanks and Regards,
Alexander.
Looks like your packet is cut out in the middle.
Notice that both the IP and the SNMP length field are indicating longer payload than there actually is (they are even marked red for that reason).
Somewhere in the way from the sender to wireshark the packet was cut short. could be because of a malfunctioning router, BER, or just corrupted pcap file.
Wireshark has a really hard time trying to dissect packets (remember it doesn't know the configurations on the end components), but it does it's best with heuristics defined by the community. A malformed packet not being dissected right is not surprising.
If you decide to change WS's heuristics on your PC you may as well do that using LUA plugins.

Wireshark : how to force to drop packets with LUA?

I'm am facing to an issue when sniffing on the loopback interface when using a JTAG debug probe, which uses a TCP socket. It completly flood the loopback, and freeze Wireshark after a few seconds.
As a workaround, I have made a dummy LUA dissector for this case (redlink-server protocol). Wireshark is no longer freezing, but it produces like 8Gb of packets in a few minutes...
(the plugin consists in an empty dissector function, add register this dissector for TCP port 3490)
Is there a simple way to delete those packets from dump file not to overflow my RAM ?
Tanks by advance
Thomas.
You can apply a capture filter, not a display filter, to avoid capturing the traffic. In your case, the capture filter to exclude the unwanted traffic would be not tcp port 3490.
Refer to pcap-filter for more information on capture filters, as well as the Wireshark User Guide, Section 4.10. Filtering while capturing.

Obligatory options for tcp syn

I'm writing a soft for a microchip that will send some data via Ethernet and I've encountered a problem. I'm sending a TCP SYN segment and I have no answer from the server.
Everything looks fine, the only one difference between packets that gain answer and my ones is that my packets have no options (the pool described as optional). Are there some options that should be defined for SYN to work properly?
(If anyone know how to copy a packet from wireshark in a nice form I'll show you my packet.)
Make sure that your tcp header padding bytes are set to all 0's or 0xff
As cxxl mentioned in a comment the problem was incorrect TCP checksum.

determine network packet structure

There is an old program a member of this online community made for everyone to use, but he is no longer around and no longer supports it. I wanted to help the community by extending it's features somewhat. To do that, I need to know how data is sent from it. How can I capture the network traffic it sends, and determine what it's sending?
WireShark is your friend. Available for UNIX and Windows.
Wireshark is a network packet analyzer. A network packet analyzer will
try to capture network packets and tries to display that packet data
as detailed as possible.
Wireshark User's Guide
#Kerrek SB's Tip: use tcpdump -s0 -w /tmp/data -i eth3 or so to create the dump file, and analyze it with Wireshark later as an unprivileged user.

Resources