Skip to main content
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 ...
Jeff Wheeler's user avatar
  • 5,469
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 ...
Ron Maupin's user avatar
  • 99.6k
35 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 ...
Kind Contributor's user avatar
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 ...
Zac67's user avatar
  • 84.5k
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 ...
jonathanjo's user avatar
  • 16.2k
23 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 ...
Kevin's user avatar
  • 346
22 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 ...
Eddie's user avatar
  • 15k
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 ...
Austin Hemmelgarn's user avatar
14 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 ...
Slartibartfast's user avatar
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 ...
Ron Maupin's user avatar
  • 99.6k
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 ...
Steffen Ullrich's user avatar
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 ...
Ron Maupin's user avatar
  • 99.6k
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, ...
Zac67's user avatar
  • 84.5k
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 "...
Ron Trunk's user avatar
  • 67.5k
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, ...
Josh's user avatar
  • 211
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 ...
JFL's user avatar
  • 19.7k
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 ...
Ron Maupin's user avatar
  • 99.6k
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 ...
Ron Maupin's user avatar
  • 99.6k
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 ...
Ron Trunk's user avatar
  • 67.5k
9 votes

What do TCP/UDP add to "raw ip"?

IP can transmit data just fine, the problem is what happens when that data gets to the other end. The only identification information is the IP addresses of the hosts and a protocol number. Neither of ...
Peter Green's user avatar
  • 13.3k
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----...
Luciano Afranllie's user avatar
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 ...
Peter Green's user avatar
  • 13.3k
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 ...
Ron Maupin's user avatar
  • 99.6k
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 ...
avistein's user avatar
8 votes
Accepted

What is the transport protocol used in wget?

By default, wget uses HTTP to retrieve files. Which means wget uses TCP/80... unless you specify HTTPS, in which case it uses TCP/443.
Eddie's user avatar
  • 15k
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 ...
Peter Green's user avatar
  • 13.3k
8 votes
Accepted

When would one use UDP over TCP?

This is a frequently asked question. The answer below is one of the best answers from another site. https://stackoverflow.com/questions/1099672/when-is-it-appropriate-to-use-udp-instead-of-tcp In ...
Joey Miller's user avatar
8 votes

Why is a TCP Socket identified by a 4 tuple?

In the UDP protocol, a socket is uniquely identified by the source IP and the source port. In the TCP protocol, the socket is uniquely identified by the source IP, source port, destination IP, and ...
jonathanjo's user avatar
  • 16.2k
8 votes
Accepted

Is a datagram from an upper network layer converted 1:1 to one of the lower layer?

A single TCP segment is always converted to a single IP packet by adding IP header, which is in turn converted to a single Ethernet frame by adding Ethernet header (and footer). In other word, a ...
Ron Maupin's user avatar
  • 99.6k
8 votes
Accepted

Which one is right, UDP has 508 or 512 bytes payload limits?

You are confusing a couple of things. MTU is Maximum Transmission Unit, and it is a value of the data-link (layer-2) protocol on a specific medium. IP, neither IPv4 nor IPv6 has an MTU. They both have ...
Ron Maupin's user avatar
  • 99.6k

Only top scored, non community-wiki answers of a minimum length are eligible