Skip to main content
Share Your Experience: Take the 2024 Developer Survey
81 votes
Accepted

Why does DHCP use UDP and not TCP?

DHCP cannot use TCP as the transport protocol because TCP requires both end-points to have unique IP addresses. At the time a host is required to use DHCP, it does not have an IP address it can source ...
Mario Jost's user avatar
  • 1,709
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,493
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.8k
47 votes

Why isn't UDP with reliability (implemented at Application layer) a substitute of TCP?

TCP is about as fast as you can make something with its reliability properties. If you only need, say, sequencing and error detection, UDP can be made to serve perfectly well. This is the basis for ...
jonathanjo's user avatar
  • 16.3k
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

How is 8 bits sufficient for the TTL in an IP header?

Even when sending packets across continents, a TTL of 255 is more than enough - there simply aren't more routers involved. Running a quick test (from Germany) shows 17 hops to the US and 18 to Japan. ...
Zac67's user avatar
  • 84.9k
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.9k
29 votes
Accepted

Why does one say IP fragmentation is bad and to be avoided when in reality data always needs to be fragmented for MTU compatibility?

Fragmentation is resource intensive in a router, and it slows packet forwarding. Today, we use PMTUD to determine the smallest MTU in the path so that packets are properly sized prior to sending. ...
Ron Maupin's user avatar
  • 99.8k
28 votes
Accepted

Why is Packet Size Limited?

Why we don't just send one single packet? why we need to split content into multiple pockets (ignoring size limit). That would just lead back to circuit-switched networks like the original PSTN (...
Ron Maupin's user avatar
  • 99.8k
26 votes

Why does DHCP use UDP and not TCP?

Since the source has no IP address (0.0.0.0) and the destination is everyone (255.255.255.255), it's hard to see how you would identify a particular session. But even if you could, what would be the ...
Ron Trunk's user avatar
  • 67.7k
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.3k
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

Why in TCP the first data packet is sent with "sequence number = initial sequence number + 1" instead of "sequence number = initial sequence number"?

This "bump the sequence# forward by 1 for SYN and FIN flags" is sometimes referred to as the "Phantom Byte" -- since no actual byte of data is sent, but the presence of the SYN or ...
Eddie's user avatar
  • 15k
21 votes

Why does DHCP use UDP and not TCP?

There are multiple reasons why TCP wouldn't work for DHCP(v4.) First of all, TCP is connection-oriented. A TCP connection is defined between two particular hosts. However, when a DHCP client first ...
reirab's user avatar
  • 469
20 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 ...
rnxrx's user avatar
  • 6,114
18 votes
Accepted

TCP and Go-Back-N

To add to the previous answer: A "Cumulative ACK" implies that all the bytes sent by the sender (so far) have been received correctly by the receiver. In order words, when the sender receives an ACK ...
thomassawyer's user avatar
18 votes

Ping port number?

I'd like to give you an additional answer especially to this part of the question: ... someone says ICMP uses Port 7 Port 7 (both TCP and UDP) is used for the "echo" service. If this service is ...
Martin Rosenau's user avatar
17 votes

How Does A Layer 2 Switch Differentiate Between Different Networks?

A (layer-2) switch doesn't care at all about the IP networks you run through it. however, no normal traffic can occur between two nodes on two different networks. That is correct. Different IP ...
Zac67's user avatar
  • 84.9k
15 votes
Accepted

Is MSS negotiated or exchanged during the 3 way handshake

It is NOT considered a negotiation, it is a statement of an known maximum, and there is not back and forth. It can be different bidirectionally. So one TCP flow can have a different MSS each way. RFC ...
zevlag's user avatar
  • 622
15 votes
Accepted

Why does FTP passive mode use a range of ephemeral ports as opposed to a single well known port?

That's how the FTP protocol was designed to work in the passive mode. It was probably not a good idea, as I do not think that this model was ever repeated again in any other protocol (and that's true ...
Martin Prikryl's user avatar
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
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 ...
Ron Trunk's user avatar
  • 67.7k
14 votes
Accepted

Is a FIN only segment legal?

All the research of half an hour says that FIN-only is never legitimate. http://www.whitehats.ca/main/members/Seeker/seeker_tcp_header/seeker_tcp_header.html Packets should never contain just a ...
Marc 'netztier' Luethi's user avatar
14 votes

Why maximum length of IP, TCP, UDP packet is not suit?

IP protocol build on Ethernet or something, Why an IP packet can be 65535 bytes when Ethernet can only send 1500 bytes? Ethernet is one of several physical layers which can be used to to transport IP ...
Steffen Ullrich's user avatar
14 votes
Accepted

Can throughput exceed the bandwidth of a network

The bandwidth is the number of bits that can be sent on a link in one second. The throughput is the amount of data that is sent, and that will need to subtract the protocol overhead from the bandwidth,...
Ron Maupin's user avatar
  • 99.8k
14 votes

Could IPv6 make NAT / port numbers redundant?

IPv6 does not have a NAT standard as IPv4 does (NAT breaks the end-to-end premise of IP, and IPv6 was designed to restore that). There is an experimental RFC for IPv6 NAT, but it is a one-to-one NAT ...
Ron Maupin's user avatar
  • 99.8k
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.8k
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 ...
Steffen Ullrich's user avatar
12 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.8k

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