Testing UDP port connectivity

There is no such thing as an “open” UDP port, at least not in the sense most people are used to think (which is answering something like “OK, I’ve accepted your connection”). UDP is session-less, so “a port” (read: the UDP protocol in the operating system IP stack) will never respond “success” on its own. … Read more

TCP/IP packets and datagrams

You are getting caught up in the details … packet and datagram are not exactly well defined terms. I also think that you are also looking at things backwards. In a conventional network: the link layer (e.g., 802.3 “Ethernet” or 802.11 “Wi-Fi”) presents frames to the network layer (e.g., IP, ICMP) The network layer assembles the frames into packets which are passed on to the next layer … Read more

What are examples of TCP and UDP in real life?

UDP: Anything where you don’t care too much if you get all data always Tunneling/VPN (lost packets are ok – the tunneled protocol takes care of it) Media streaming (lost frames are ok) Games that don’t care if you get every update Local broadcast mechanisms (same application running on different machines “discovering” each other) TCP: … Read more

UDP vs TCP, how much faster is it?

UDP is faster than TCP, and the simple reason is because its non-existent acknowledge packet (ACK) that permits a continuous packet stream, instead of TCP that acknowledges a set of packets, calculated by using the TCP window size and round-trip time (RTT). For more information, I recommend the simple, but very comprehensible Skullbox explanation (TCP … Read more

Does TCP send a SYN/ACK on every packet or only on the first connection?

It’s kinda like: SYN starts a connection; you’ll usually only see it when the connection’s being established. But all data being sent via TCP requires an ACK. Every byte sent must be accounted for, or it will be retransmitted (or the connection reset (closed), in severe cases). Actual connections aren’t usually exactly like the diagram above, though, … Read more