237
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 ...
48
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 ...
34
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 ...
29
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 ...
28
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
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 ...
25
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 ...
19
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 ...
15
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
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 ...
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
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 versus the types of protocols that use UDP.
The decision ...
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
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 ...
11
votes
Accepted
Can two different applications bind the same port on a host if they use different protocols?
Think of it this way: TCP is one street, UDP is another street, and port numbers are the addresses of the houses (ports) on the streets, just as they are layer-4 addresses. Each street has the same ...
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
Can anyone explain to me the difference between the PSH and URG flags in TCP segment?
Jeremy Stretch has a good article on this.
This is where the PSH flag comes in. The socket that TCP makes available at the session level can be written to by the application with the option of "...
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, ...
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 ...
10
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 ...
9
votes
Accepted
How does NAT decide which connections are inbound, and which are outbound?
TCP is a connection-oriented protocol, and it can only communicate through connections.
Before you start programming using TCP, it would be helpful to first understand how TCP works, and you should ...
9
votes
Accepted
TCP's three-way handshake and Denial of Service attack
why attackers just do the first step of 3-way handshake? why don't they just complete all three steps of 3-way handshake to be fully connected with the server just like normal users so it is going to ...
9
votes
Can anyone explain to me the difference between the PSH and URG flags in TCP segment?
Suppose the receiving buffer has already some data to be processed by the application. A segment with the PSH flag set to 1 is sent now. The sending buffer will not wait to be filled, instead, it will ...
9
votes
Where are 0 TCP/UDP ports banned?
TL;DR: RFC870
Port zero has been included in the "Network Wide Standard Functions" range since RFC433 in 1972, but has never been assigned.
https://www.rfc-editor.org/rfc/rfc433.html
Here ...
8
votes
Why do we need a 3-way handshake? Why not just 2-way?
TCP connection is bidirectional. What this means is that it actually is a pair of one-way connections. The initiator sends SYN, the responder sends ACK: one simplex connection begins. "Then" the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
transport-protocol × 221tcp × 145
layer4 × 103
protocol-theory × 91
udp × 37
networking × 21
ip × 19
network × 16
routing × 11
ipv4 × 11
osi × 10
rfc × 10
ethernet × 9
congestion × 9
internet × 7
nat × 6
cisco × 5
layer3 × 5
router × 4
ipv6 × 4
ip-address × 4
network-core × 4
packet-loss × 4
checksum × 4
vlan × 3