Questions tagged [tcp]
For questions about Transmission Control Protocol (TCP), a transport protocol used to encapsulate data across a network for reliable communication.
50
questions
184
votes
9
answers
112k
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
...
3
votes
2
answers
2k
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)
...
61
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?
14
votes
1
answer
14k
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. ...
13
votes
2
answers
5k
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
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 ...
45
votes
3
answers
130k
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 ...
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 ...
11
votes
1
answer
618
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
3
answers
5k
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
2
answers
7k
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?
2
votes
1
answer
478
views
Message formatting and encapsulation
I've gotten confused when reading about encapsulation and the OSI and TCP/IP models. I first read about message formatting and encapsulation and the diagram I read showed:
Destination | Source
and ...
1
vote
2
answers
646
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 ...
0
votes
1
answer
336
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 ...
31
votes
8
answers
35k
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 ...
20
votes
3
answers
10k
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 ...
18
votes
1
answer
146k
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
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 ...
15
votes
3
answers
35k
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 ...
13
votes
3
answers
18k
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?
12
votes
4
answers
41k
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.
...
12
votes
4
answers
22k
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 ...
11
votes
2
answers
28k
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 ...
10
votes
3
answers
23k
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
4
answers
17k
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 ...
8
votes
6
answers
4k
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 ...
8
votes
5
answers
738
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
1
answer
44k
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(...
7
votes
1
answer
5k
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 ...
5
votes
2
answers
22k
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?
4
votes
1
answer
756
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
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 ...
3
votes
1
answer
7k
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 ...
3
votes
1
answer
5k
views
How to understand the sequence number of segments in TCP termination process in TCP/IP Illustrated, Volume 1: The Protocols (2nd Edition)?
I read about TCP/IP Illustrated, Volume 1: The Protocols (2nd Edition) 13.2 TCP Connection Establishment and Termination, and the following picture shows the TCP connection and termination process, ...
2
votes
2
answers
566
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 ...
2
votes
1
answer
10k
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
2
answers
617
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 ...
2
votes
1
answer
249
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 ...
1
vote
2
answers
2k
views
How to calculate the Maximum Segment Size (MSS)?
This page says the following:
TCP controls this maximum size, known as Maximum Segment Size (MSS),
for each TCP connection. For direct-attached networks, TCP computes
the MSS by using the MTU size of ...
1
vote
1
answer
259
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 ...
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 ...
1
vote
1
answer
455
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 + ...
1
vote
1
answer
378
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 ...
1
vote
2
answers
158
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 ...
0
votes
2
answers
310
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
2
answers
4k
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?
0
votes
1
answer
3k
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 ...
0
votes
1
answer
165
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
2
answers
848
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
1
answer
426
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 ...