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
163
votes
9answers
96k 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 ...
57
votes
10answers
99k 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?
12
votes
2answers
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 ...
2
votes
2answers
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) ...
6
votes
2answers
2k 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 ...
0
votes
1answer
874 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 ...
40
votes
3answers
119k 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 ...
11
votes
1answer
11k 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. ...
11
votes
1answer
450 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, ...
7
votes
3answers
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 ...
5
votes
2answers
5k 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?
1
vote
2answers
250 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 ...
13
votes
2answers
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 ...
0
votes
1answer
105 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 ...
18
votes
3answers
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 ...
10
votes
3answers
14k 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?
13
votes
1answer
114k 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
27
votes
8answers
23k 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 ...
15
votes
7answers
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 ...
13
votes
3answers
32k 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 ...
8
votes
4answers
11k 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 ...
4
votes
1answer
19k 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?
10
votes
2answers
25k 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 ...
9
votes
4answers
13k 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 ...
3
votes
1answer
2k 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 ...
10
votes
4answers
34k 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. ...
9
votes
3answers
19k 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 ...
8
votes
5answers
648 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 ...
7
votes
1answer
41k 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(...
2
votes
2answers
435 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 ...
0
votes
2answers
133 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 ...
0
votes
2answers
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?
7
votes
1answer
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 ...
3
votes
1answer
651 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 ...
3
votes
1answer
5k 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 ...
2
votes
1answer
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 ...
2
votes
2answers
525 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 ...
1
vote
2answers
97 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 ...
1
vote
1answer
114 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 ...
0
votes
1answer
48 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 ...
0
votes
1answer
111 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?
0
votes
2answers
540 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 ...
-1
votes
1answer
73 views

Why the pseudo-header is not transmitted with the UDP datagram?

I have read from E. Comer - Internetworking with TCP/IP 4th edition that "The purpose of using a pseudo-header is to verify that the UDP datagram has reached its correct destination. The key to ...