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
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
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
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
2 votes
2 answers
1k views

Why do transport layer do data chunking. If there is fragmentation in Network Layer

I just curiously wanted to know about the question regarding L4, L3 Data Chunks, IP Fragmentation : Data chunking happened at Layer 4(Transport, TCP), and Fragmentation at Layer 3(Network, ipv4) ...
user avatar
6 votes
2 answers
3k views

What is the reason for the different order of the Source and Destination in a L2 header?

A TCP/UDP header (Layer 4) lists the Source Port, then the Destination Port: An IP header (Layer 3) lists the Source IP, then the Destination IP: An Ethernet header (L2) and a WiFi Header (L2) lists ...
user avatar
  • 14k
0 votes
1 answer
1k views

TCP Handshaking Meaning of RST

I am trying to implement TCP handshaking but receive RST instead of ACK: No. Time Source Destination Protocol Length Info 62 24.622012890 192.168.0.147 ...
user avatar
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
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
7 votes
3 answers
4k views

How does NAT decide which connections are inbound, and which are outbound?

I'm building a P2P application that needs to be able to access nodes behind a NAT. This NAT does not allow inbound connections, therefore the nodes outside the network cannot reach out to the nodes ...
user avatar
  • 73
5 votes
2 answers
6k views

How does a layer-2 switch work with UDP?

If UDP and/or TCP send packets via IP to an Internet Protocol Address, how can a layer-2 switch forward these? Is this possible or do you need a layer-3 switch?
user avatar
  • 614
1 vote
2 answers
380 views

Which port determines the protocol?

If we have a common protocol port on both ends.. say source point is 443 and destination port is 80 (hypothetical situation, I know this combination of ports probably makes no sense).. how do we ...
user avatar
  • 13
13 votes
2 answers
30k 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
0 votes
1 answer
151 views

Confused with packet reordering

I was reading a textbook which says about TCP protocol "Selective Repeat": We have assumed that packets cannot be reordered within the channel between the sender and receiver. This is ...
user avatar
  • 401
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
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
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
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
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
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
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
4 votes
1 answer
20k views

Why only after 3-duplicate ACK retransmission takes place in TCP?

Is there any reason of choosing "3" only for retransmission. why not 2 or 4 or any other number?
user avatar
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
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
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
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
3 votes
1 answer
3k views

What is the need for transport Layer?

In 5-layer model. Why we need additional transport layer? I read these two points Users who interact with software have no control over the sub-net; Transport Service can provide a more reliable ...
user avatar
  • 515
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
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
7 votes
1 answer
42k views

Troubleshooting "TCP Zero Window" Issues

I'm currently having a problem troubleshooting a trading application. Let me give a simple diagram of the current network setup (Gov't Stock Exchange Network Router)X-->(256kbs Leased Line)<--X(...
user avatar
  • 111
2 votes
2 answers
464 views

Should all sent segments be requeued after a TCP retransmission timeout expires?

I am developing a TCP implementation and could not find a clarification to this in the relevant RFCs (793, 1122, 5681, 6298). When the retransmission timer expires, the first segment which has once ...
user avatar
2 votes
1 answer
139 views

Why does TCP need more than just one port?

With TCP you listen to some port (say port 80) and then when an incoming connection pops up, you accept it, establishing the connection over a new port. Why is this necessary? Why can't you just keep ...
user avatar
1 vote
1 answer
207 views

how data are fragmented based on MTU and MSS?

just to be clear.. if a sender wants to send a data of 1800bytes ( assuming MTU be 1500bytes so MSS = 1500-40 (taking min ip and tcp header) = 1460bytes) Then there will be three segments 750 + 750 + ...
user avatar
  • 13
1 vote
2 answers
1k views

How is UDP used in multimedia system inspite of being connectionless

We know that UDP does not care about segment (packet) in-order and their arrival on the destination.Then how on YouTube or VoIP (skype) are we able to stream videos? If a packets is lost (doesn't ...
user avatar
0 votes
2 answers
3k views

What will happen at server side if it received 2 SYN packet from the same client application?

A server moves to SYN_RECV state once it gets a SYN packet from a client application. What will happen at server side if it received 2 SYN packet from the same client application?
user avatar
  • 11
0 votes
2 answers
170 views

If you're behind a firewall and all the ports are blocked, how is your browser able to access the internet? [closed]

I'm behind a router and I'm able to run game servers on my home computer after forwarding ports or using the DMZ feature on the router. However, I still don't understand the underlying technology as ...
user avatar
7 votes
1 answer
4k views

How do Endpoints in a TCP conversation determine their MSS?

I understand the MSS is the Maximum Segment Size, which is the size of the Payload TCP will send. I also understand that a "receiving" MSS value is suggested by both parties in a TCP conversation ...
user avatar
  • 14k
4 votes
1 answer
676 views

What happens in SACK when there are multiple gaps in the received packets?

Suppose a client has received 0 to 500, 900 to 1100 and 1300 to 2000 how will ACK and SACK look like? Does it look like this ACK: 500 SACK:900-1100 and then it asks for the packets 1100 to 1300 in new ...
user avatar
  • 353
3 votes
1 answer
6k views

What is the value of EstimatedRTT at first time?

Although this question might be marked as duplicated! I'm asking again because other question's answers like this couldn't help me. So please consider the case and don't mark it as duplicate and ...
user avatar
2 votes
1 answer
7k views

Iperf results on UDP Bandwidth

I am currently testing iperf with a view to automating some testing servers for our company. To do this I am using an iperf server in the cloud which is well connected and is only 5 hops away from ...
user avatar
2 votes
2 answers
542 views

single connection over multiple internet connections

Hi not sure where to ask this thought this would be the best place, i was just wondering if it was at all possible to have a single connection get the benefit of multiple internet connections. For ...
user avatar
  • 23
1 vote
1 answer
194 views

I have issue with MSS and window size [duplicate]

I made a short example because I have tried understanding the difference between MSS and window size in tcp header when we consider a sender and a receiver. So let's say sender and receiver use the ...
user avatar
  • 113
1 vote
2 answers
117 views

How TCP connections between origin and node servers over a BGP Anycast gets established?

Server A and B have the same IP address with anycast. Server B connects to the origin server that is very close to server A and very far away from server B, since server A is closer, the response will ...
user avatar
0 votes
1 answer
100 views

How UDP checksum get IP address to make pseudo header in transport layer?

We know that UDP checksum's pseudo header contains the most important parts of the IP header, that is, source and destination address, protocol number and data length. I hope that the concept of IP ...
user avatar
0 votes
1 answer
127 views

What steps must be accomplished in each layer of the TCP/IP model to connect a website?

What steps must be accomplished in each layer of the TCP/IP model to connect a website?
user avatar
0 votes
2 answers
649 views

Is TCP's MSL value equivalent to IP's TTL value?

Definition of MSL according to RFC 793: Maximum Segment Lifetime, the time a TCP segment can exist in the internetwork system. Arbitrarily defined to be 2 minutes. Definition of TTL according to ...
user avatar
  • 113