Questions tagged [tcp]

For questions about Transmission Control Protocol (TCP), a transport protocol used to encapsulate data across a network for reliable communication.

Filter by
Sorted by
Tagged with
171 votes
9 answers
102k views

Why do we need a 3-way handshake? Why not just 2-way?

The TCP 3-way handshake works like this: Client ------SYN-----> Server Client <---ACK/SYN---- Server Client ------ACK-----> Server Why not just this? Client ------SYN-----> Server ...
user avatar
  • 1,823
67 votes
5 answers
464k views

PING port number?

Yesterday interviewer ask me what is port number for ping and which protocol ping use TCP/UDP. After interview I search on internet and found different results someone says ICMP uses Port 7, someone ...
user avatar
  • 1,260
59 votes
10 answers
100k views

Why only port 80 for web services?

Why isn't it sensible to dedicate more than one TCP/IP port to http? Although admittedly naive, isn't it intuitive to think that server performance could somehow be increased?
user avatar
44 votes
7 answers
15k views

Does UDP do anything at all?

It's my understanding that TCP has logic for ensuring reliable communication, but UDP just naively sends information along the channel set up for it using IP and things in lower layers. Does UDP ...
user avatar
  • 559
43 votes
3 answers
125k views

What is the difference between MSS and MTU?

I'm confused as to the difference between maximum segment size and a maximum transmission unit. Can someone please explain in relation to layers 2 and 3? If I had a packet of 800 bytes in the ...
user avatar
28 votes
7 answers
7k views

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

TCP provides reliability at transport layer while UDP does not. So, UDP is fast. But, a protocol at application layer can implement reliable mechanism while using UDP. In this sense, why isn't UDP ...
user avatar
  • 501
27 votes
8 answers
27k views

Why does DHCP use UDP and not TCP?

DHCP uses UDP as its transport protocol. DHCP messages that a client sends to a server are sent to well-known port 67 (UDP—Bootstrap Protocol and DHCP). DHCP Messages  that a server sends to a client ...
user avatar
  • 509
23 votes
4 answers
11k views

Does physical distance affect download speed?

I just had an argument with a colleague of mine and thought I'd just reach out to the experts on this. Here's the scenario. We were using a website that measures your connection's speed. We tested ...
user avatar
  • 331
22 votes
1 answer
21k views

How multiple client connections are made to single web server?

Actually I am learning Computer Networks and while at it, I am confused in how a web server maintains multiple connections? Simply to state, I learned trough some googling is that sockets handles a ...
user avatar
  • 361
20 votes
5 answers
4k views

Why is Packet Size Limited?

I was reading: this answer to "Maximum packet size for a TCP connection", where it says: The absolute limitation on TCP packet size is 64K (65535 bytes), but in practicality this is far ...
user avatar
  • 303
20 votes
1 answer
11k views

Is a TCP server limited to 65535 clients?

There are 65535 TCP port numbers, does that mean only 65535 clients can connect to a TCP server? One might think that this places a hard limit on the number of clients that a single computer/...
user avatar
19 votes
5 answers
4k views

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

The TTL (Time to Live) is an 8-bit field in the IPv4 header. It can take any value from 0 to 255. If this means that the packet can take a maximum of 255 hops (routers) on its way to its destination, ...
user avatar
19 votes
3 answers
9k views

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

I know that both TCP and UDP are built on top of IP, and I know the differences between TCP & UDP, but I'm confused about what exactly "raw ip" is. Would it be fair to say that TCP & UDP both ...
user avatar
17 votes
3 answers
3k views

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

Why does one say fragmentation is bad and must be avoided due to performance issues when in reality fragmentation intrinsically occurs within the communication ? Example: User1 wants to send 100 000 ...
user avatar
  • 319
15 votes
8 answers
25k views

Does TCP open a new connection for every packet that is sent?

This might be a silly question but a me and few buddies have been discussing the potential limitations of TCP. We have an application that is going to listen for clients (think of a gateway) and route ...
user avatar
15 votes
7 answers
16k views

TCP acceleration over satellite or high latency networks [closed]

What viable companies, products or options are out there today for TCP Acceleration over satellite or high latency IP networks? The average satellite RTT is upwards from 600ms (depends on the ...
user avatar
  • 2,527
14 votes
1 answer
2k views

Why BGP implements its own keepalive instead of using tcp keepalive?

BGP doesn't use TCP keepalive, it uses its own keepalive mechanism. My question is why can't bgp turn-on the SO_KEEPaLIVE of TCP and live happily? why does it not use tcp keepalive and implement its ...
user avatar
  • 1,095
14 votes
1 answer
126k views

What does TCP DUP ACK mean?

In Wireshark, I see TCP duplicate ACK packets sent from the receiver to the sender. What does it mean? Does it imply packet loss? Thank you
user avatar
  • 163
14 votes
1 answer
6k views

Troubleshooting low Metro Ethernet TCP throughput

Background We rented a few layer 2 leased lines, i.e. you have one big pipe at the datacenter and the remote sites have smaller pipes. Inside the layer 2 network you can do whatever you like. Probably ...
user avatar
  • 1,173
13 votes
6 answers
13k views

How does BGP work over TCP?

As far as I know we are using routing protocols to achieve Layer 3 connectivity, I am confused with the fact that BGP works over TCP which is L4. How can L4/TCP be established without prior L3 ...
user avatar
  • 375
13 votes
3 answers
3k views

acknowledgment by TCP does not guarantee that the data has been delivered

In RFC 793 there is a part about the acknowledgment of TCP segments: When the TCP transmits a segment containing data, it puts a copy on a retransmission queue and starts a timer; when the ...
user avatar
  • 473
13 votes
1 answer
12k views

How can a TCP window size be allowed to be larger than the maximum size of an ethernet packet?

I know that TCP window sizes can be scaled to over 64KB, but looking at an ethernet packet datagram, such as this one: it looks like a layer 2 packet is limited in size to be much smaller than that. ...
user avatar
13 votes
4 answers
3k views

How can I formulate the communication latency in TCP/IP?

I have difficulty in deriving a mathematical model/equation to estimate the round trip latency between two nodes communicating using TCP/IP. The nodes are exchanging data based on HTTP protocol. In ...
user avatar
  • 233
13 votes
3 answers
31k views

Wifi TCP iperf throughput: 1 stream vs multiple streams?

In a WLAN iperf TCP throughput test, multiple parallel streams will give me higher throughput than 1 stream. I tried increasing the TCP window size, but I still cannot achieve the max throughput with ...
user avatar
  • 517
13 votes
2 answers
29k views

Open a range of TCP ports in Cisco IOS NAT

ip nat inside source static 192.168.1.10 10.10.10.9 route-map RANGE ! route-map RANGE permit 100 match ip address 102 ! access-list 102 permit tcp host 192.168.1.10 range 3000 3389 any The ...
user avatar
  • 131
13 votes
3 answers
33k views

What is the purpose of TIME WAIT in TCP connection tear down?

I found that the reason the active closer enters TIME WAIT is to make sure that the final ACK is not lost. But how does it know if the final ACK is lost? Will the passive closer resend the FIN and ...
user avatar
  • 233
12 votes
2 answers
4k views

How NAT / PortForwarding / TCP/IP works?

I recently read an article entitled how NAT works. Some things still remain unclear to me. I would be thankful if someone could explain. Below is the part of the article regarding DynamicNAT that is ...
user avatar
11 votes
3 answers
16k views

Is a TCP three-way handshake required for an HTTP POST?

I don't quite understand if i posting http form data from the browser to the server, does the protocol still need to make three-way handshake (syn-ack-data) or it only works for GET http requests?
user avatar
11 votes
4 answers
36k views

How to know whether a protocol uses TCP or UDP

Well I know that might sound a stupid question and I believe that the most proper answer will be like I will be able to tell as my experience builds up and I learn more and more about the protocols. ...
user avatar
  • 441
11 votes
2 answers
24k views

Trying to find out exact TCP overhead cost

Corresponding this topic: https://stackoverflow.com/questions/3613989/what-of-traffic-is-network-overhead-on-top-of-http-s-requests The maximum segment size (which does not include the TCP or IP ...
user avatar
  • 113
11 votes
1 answer
491 views

Is a FIN only segment legal?

It would be convenient to mark TCP segments with just the FIN flag set, as an intrusion (without tracking the reply). I have always assumed that a FIN without an ACK, while rude and rare, is legal, ...
user avatar
  • 169
10 votes
5 answers
3k views

Does the destination port change during TCP three-way handshake?

I'm learning networking programming in C and there is a question bothers me a lot, does the destination port change during TCP three-way handshake? Let's say I have a cilent application running on ...
user avatar
10 votes
3 answers
9k views

What happens when SYN and FIN flags in TCP headers are both set to 1?

In TCP header, what happens when both SYN and FIN flags are set to 1? Or, can both even be simultaneously set to 1 ?
user avatar
  • 203
10 votes
2 answers
3k views

How does nmap distinguish closed ports from filtered ports

Let's suppose we are doing a TCP connect scan. a nmap scan on google returns the following output : PORT STATE SERVICE 80/tcp open http 443/tcp open https However, if I try to ...
user avatar
  • 203
10 votes
4 answers
16k views

Can anyone explain to me the difference between the PSH and URG flags in TCP segment?

According to me when PSH flag is set, it indicates that data will have to be sent immediately to the wire and on receiving side the data has to be pushed to the application immediately. When URG flag ...
user avatar
10 votes
2 answers
5k views

Is TCP maximum segment size (MSS) "clamping" compatible with IPv6?

With IPv4, TCP MSS "clamping" (a network device editing the MSS value in a TCP header) can help when path maximum transmission unit discovery is not working. (e.g., when ICMP is being blocked ...
user avatar
10 votes
2 answers
26k views

Window Size and ACK Number

Copy-pasting from my lecturer's slides: • Receiver indicates the window size is 3000 • Transfer goes ahead • Acknowledge every 3000 bytes • Receiver increases window size to 4000 • 4000 bytes ...
user avatar
  • 359
10 votes
5 answers
6k views

Packet sizes in a TCP stream

I'm network traffic and wish to divide each TCP session into a series of requests and responses (the protocols I'm working with all work that way, like HTTP or SSL). I had a simple assumption (...
user avatar
  • 201
9 votes
3 answers
6k views

How HTTP is converted to TCP and then how TCP converted to IP?

I know that in Internet Protocol Stack there are actually three layer. They are Application, Internet and Transport. Let's say HTTP in Application layer will be converted to TCP in Transport layer and ...
user avatar
9 votes
3 answers
21k views

Traceroute Over TCP vs UDP

For what purpose would one wish to send traceroute over TCP rather than UDP? What advantages/disadvantages are there in doing so? I know that traceroute normally uses UDP ICMP "echo" packets while ...
user avatar
9 votes
4 answers
14k views

How would a firewall kill a TCP connection without RST or FIN? [closed]

Situation is like this: http client ----> corporate firewall ----> http server Due to a keepalive, server and client would keep TCP connections open and the client would use a connection pool ...
user avatar
  • 191
9 votes
2 answers
11k views

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

From many tutorials, I get follow knowledge(maybe I'm misunderstood) : maximum of an Ethernet packet is about 1500 bytes. maximum of an IP packet is about 65535 bytes. maximum of a UDP packet is ...
user avatar
  • 231
9 votes
2 answers
3k views

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

In FTP passive mode, I read that the server sends a random port number to the client where it can establish a data channel. Then client establishes a data channel from its random port number to this ...
user avatar
  • 411
9 votes
3 answers
6k views

How is tcp/ip implemented

Well, first of all I am new to networking. And I have studied the layered structure of tcp/ip protocol stack. I know that the layered structure is an abstract model, but I didn't know how the ...
user avatar
8 votes
6 answers
2k views

How Does A Layer 2 Switch Differentiate Between Different Networks?

I know that different IP-based networks can be connected to the same layer-2 switch. and I know each network's nodes can communicate just fine, however, no normal traffic can occur between two nodes ...
user avatar
  • 183
8 votes
6 answers
5k views

Could IPv6 make NAT / port numbers redundant?

From what I can tell, each process could get its own IP address, with loads of IP's to spare. What would the drawbacks be? Essentially, your host would become a router and each process is a host (in ...
user avatar
  • 213
8 votes
5 answers
5k views

Is rerouting possible in UDP?

So I am trying to understand routing for TCP and UDP segments. I have a couple of things that I am confused about: In TCP, is there any specification on how many packets would be dropped before a ...
user avatar
8 votes
4 answers
11k views

How is a TCP connection maintained over a changing IP address

I remember when I connected to the internet via the phone line and a 56kbps modem, changing ISPs was as simple as changing the phone number dialled by the modem. I remember that my IP address would ...
user avatar
  • 183
8 votes
5 answers
666 views

Why is the IP layer aware of higher layers in the network stack?

In the IP packet header there is an 8-bit Protocol field (at offset 9) that holds the "next level protocol", with assigned numbers given in RFC 790. For example, TCP is 6. My question is, why is the ...
user avatar
8 votes
4 answers
13k views

Why is a TCP Socket identified by a 4 tuple?

Newbie to networking here. I'm reading the Computer Networking (3rd edition) book, and in section 3.2 they are discussing multiplexing / demultiplexing for both UDP and TCP. In the UDP protocol, a ...
user avatar
  • 183

1
2 3 4 5
15