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
141
votes
9answers
77k 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 ...
55
votes
10answers
97k 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 somehow 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 ...
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 ...
36
votes
3answers
109k 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
363 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, ...
1
vote
2answers
433 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) ...
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 ...
3
votes
3answers
3k views

Where do the layers of the OSI Model operate in the operating system?

The OSI model describes them as layers. But where do these layers actually operate in the operating system? For example, where and what actually does TCP? All these layers are described as using ...
13
votes
2answers
28k 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 ...
18
votes
3answers
8k 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
11k 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?
10
votes
1answer
84k 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
26
votes
8answers
13k 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 ...
8
votes
4answers
6k 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 ...
9
votes
2answers
23k 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 ...
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 ...
9
votes
4answers
28k 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. ...
8
votes
3answers
17k 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 ...
7
votes
4answers
542 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 ...
4
votes
2answers
4k 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 ...
6
votes
1answer
3k 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 ...
6
votes
2answers
5k 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 ...
5
votes
1answer
36k 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(...
3
votes
1answer
547 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
3k 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
2answers
435 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
302 views

Sequence numbers of segments in three way handshakes of TCP connection establishment or termination

I was trying to understand TCP connection establishment and termination steps from Forouzan's book. In third step of three way handshake of connection establishment, it says following The client ...