236
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 ...
33
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 ...
23
votes
Accepted
What do TCP/UDP add to "raw ip"?
IP is a Layer 3 protocol. TCP/UDP are Layer 4 protocols. They each serve different purposes.
Layer 3 is in charge of end to end delivery. Its sole function is adding whatever is necessary to a packet ...
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 ...
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
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
Why does NAT translate a source port?
First, I'm assuming you're focused on TCP. UDP has some differences, and I'm not as up-to-speed on that part.
I’m beginning to learn about nat and I was wondering why does NAT
translate a source ...
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
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
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
Accepted
At which layer does router operate?
Network address translation (NAT) is a feature of Router which is
required for routing traffic.
That is completely incorrect. NAT is a kludge (a clumsy, inefficient solution) designed to extend 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
Why is the last ACK needed in TCP four way termination
A -----FIN-----> B
FIN_WAIT_1 CLOSE_WAIT
A <----ACK------ B
FIN_WAIT_2
(B can send more data here, this is half-close state)
A <----FIN------ B
TIME_WAIT LAST_ACK
A -----ACK----...
9
votes
How multiple client connections are made to single web server?
Now, from googling what I got is, the server listens at port 80 for incoming requests.
Indeed, more specifically there is a special type of socket called a "listening" socket.
Normally a socket is ...
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
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 ...
8
votes
What layer of the OSI model does NAT work?
Nat is a cross-layer process. It involves at least layers 3 (IP) and 4 (TCP, UDP, etc). In some cases it can also involve layer 7 (application).
A one to one NAT needs at minimum to modify the IP ...
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
layer4 × 169tcp × 134
transport-protocol × 103
protocol-theory × 68
udp × 40
layer3 × 23
ip × 15
osi × 14
ipv4 × 13
layer2 × 12
nat × 10
rfc × 10
networking × 9
routing × 6
ethernet × 6
router × 5
network × 5
congestion × 5
checksum × 5
ipv6 × 3
ip-address × 3
internet × 3
packet-loss × 3
cisco × 2
packet-analysis × 2