219
votes
Accepted
Why do we need a 3-way handshake? Why not just 2-way?
Break down the handshake into what it is really doing.
In TCP, the two parties keep track of what they have sent by using a Sequence number. Effectively it ends up being a running byte count of ...
61
votes
Accepted
Does UDP do anything at all?
Interesting perspective and question!
Yes, most of what UDP does is supply a standard means for multiple applications to co-exist using the same IP address, by defining the concept of UDP ports.
The ...
47
votes
Does UDP do anything at all?
UDP is a transport protocol, like TCP. That means it provides a protocol for an application to use IP. Like TCP, UDP has addressing (ports) to which applications bind so that datagrams destined to ...
29
votes
Accepted
Is a TCP server limited to 65535 clients?
The short answer is no, that's not the limit.
A TCP Port field is 2x bytes and holds a quantity of 65536. This number limits the amount of addresses a server can have. But this doesn't limit the ...
27
votes
Is a TCP three-way handshake required for an HTTP POST?
If you are asking in a general sense, then the answer is most definitely "yes", any HTTP method (like POST) requires a TCP connection, and the only way to initiate a TCP connection is to use ...
27
votes
Why do we need a 3-way handshake? Why not just 2-way?
The three-way handshake is necessary because both parties need to synchronize their segment sequence numbers used during their transmission. For this, each of them sends (in turn) a SYN segment with ...
26
votes
Accepted
How can a TCP window size be allowed to be larger than the maximum size of an ethernet packet?
The TCP window size is generally independent of the maximum segment size which depends on the maximum transfer unit which in turn depends on the maximum frame size.
Let's start low.
The maximum frame ...
24
votes
Why do we need a 3-way handshake? Why not just 2-way?
In order for the connection to work, each side needs to verify that it can send packets to the other side. The only way to be sure that you got a packet to the other side is by getting a packet from ...
24
votes
Accepted
acknowledgment by TCP does not guarantee that the data has been delivered
This part of the RFC is about passing responsibility over to the operating system or whatever is the next stage of the process. It's fundamentally concerned with the separation of layers.
An ...
22
votes
Accepted
Does TCP open a new connection for every packet that is sent?
One of my buddies is saying that TCP will be a problem for this gateway because it is going to establish a new connection for every message it sends (not kafka but the underlying transportation ...
18
votes
Accepted
What does TCP DUP ACK mean?
There can be several things going on - the most common would be the use of TCP Fast Retransmission which is a mechanism by which a receiver can indicate that it has seen a gap in the received sequence ...
14
votes
Raw IP communication?
[summarizing the question]
Can I communicate with raw IP datagrams, without a transport layer?
Short answer:
Yes, but:
It's an exceptionally strange way to build an application (you'd have to tell ...
14
votes
Does UDP do anything at all?
I would encourage you to look at how higher level protocols that utilize UDP actually use it. Classic and well documented examples are DNS (in most cases at least, it's possible to do DNS over TCP but ...
14
votes
Does the destination port change during TCP three-way handshake?
No, a TCP connection is uniquely identified by both source and destination IP and TCP (port) addresses. Changing any one of those will break the TCP connection (or prevent it from forming in the ...
13
votes
Accepted
Is there a way to ignore client's TCP FIN and keep TCP connection?
Does that make any sense?
No.
The FIN is send because the sender decided that it wants to close the connection. Even if you would change the recipient that it will ignore the FIN the sender side of ...
13
votes
Accepted
Why do FTP and SMTP not use IP?
TCP and UDP are layer 4 (transport) protocols. They always use IP as the layer 3 (network) protocol.
The text you quote is just plain wrong.
You may notice that the page you reference was marked ...
13
votes
Accepted
Do these 2 packets belong to the same tcp socket?
First, TCP does not care about single packets. If these are just data packets without any previous connection establishment than they will be simply dropped, no sockets involved. So I'm assuming that ...
12
votes
Accepted
Is a TCP three-way handshake required for an HTTP POST?
Both HTTP GET and HTTP POSTS use TCP. If you are asking whether a POST also requires a 3-way TCP handshake (syn-synack-ack), it does just like any other TCP connection. The TCP handshake is required ...
12
votes
Accepted
How exactly does TCP react to a retransmission timeout?
What happens at the time-out is actually pretty clear from the drawing... The congestion window size drops back to its original value of 1 and slow start is run again.
The specifics of how a TCP ...
11
votes
Accepted
What happens when SYN and FIN flags in TCP headers are both set to 1?
In normal TCP behavior, they should never both be set to 1 (on) in the same packet. There are many tools that exist that let you craft TCP packets, and the typical response to a packet with SYN and ...
11
votes
Accepted
Window Size and ACK Number
I teach TCP, and I often run into people who were mis-taught that the ACK is only sent when the Window Size is reached. This is not true. (To be really transparent, I too taught this incorrectly ...
11
votes
Accepted
How do Endpoints in a TCP conversation determine their MSS?
1. What goes into setting the MSS?
In the question you referenced it stated this, the MSS is derived directly from MTU. A typical Ethernet MTU will 1500, but IP and TCP headers must also be taken ...
11
votes
Accepted
How to know whether a protocol uses TCP or UDP
You asked a good question. Don't let anyone tell you otherwise.
Regrettably, there is no rule of thumb for the types of protocols that use TCP verses the types of protocols that use UDP.
The ...
11
votes
Accepted
Port Numbers related doubt
User applications use random ephemeral ports for outgoing connections. TCP port 80 is only the server side's default port for WWW.
A TCP socket connection consists of source IP, source port, ...
11
votes
Does the destination port change during TCP three-way handshake?
We know that port 80 is just a welcoming port, when the web server reveives a http request, it create a new connection port(let's say 5000)
That's not correct for the HTTP protocol. Some protocols, ...
11
votes
Accepted
Where are 0 TCP/UDP ports banned?
IANA has reserved both TCP and UDP port 0. See the IANA Service Name and Transport Protocol Port Number Registry. IANA is the Internet Assigned Numbers Authority, so all internet numbers, including ...
10
votes
Accepted
Is rerouting possible in UDP?
This is not the hosts that decide which route a packet will follow, each router in the path make it's own decision.
(Actually, the originating host could use the IP strict source option to force the ...
10
votes
Does TCP open a new connection for every packet that is sent?
My understanding is that when you establish a TCP connection, that
connection remains open until it is timed out by the application or
forcibly closed by either the server or client.
From the ...
10
votes
acknowledgment by TCP does not guarantee that the data has been delivered
From the RFC perspective, the "end user" is the application. There's no guarantee that the application got the data, just that the TCP process received it.
From your NOC perspective, the network is ...
9
votes
Accepted
What is the difference between an untagged port and a tagged port?
This all comes about because different vendors often choose to use different terminology or in some cases the same terminology for different concepts.
What Cisco calls a trunk port is also known as a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
transport-protocol × 205tcp × 138
layer4 × 103
protocol-theory × 88
udp × 35
ip × 19
networking × 17
network × 13
ipv4 × 11
routing × 10
rfc × 10
ethernet × 9
osi × 9
internet × 7
cisco × 6
nat × 6
congestion × 6
layer3 × 5
ipv6 × 4
ip-address × 4
network-core × 4
packet-loss × 4
router × 3
vlan × 3
layer2 × 3