Questions tagged [tcp]

TCP stands for Transmission Control Protocol and is one of the core protocols of the Internet Protocol Suite. TCP complements the Internet Protocol (IP), and therefore the entire suite is commonly referred to as TCP/IP.

TCP is just one communications protocol on the web. Others include:

  • User Datagram Protocol (UDP)
  • Internet Control Message Protocol (ICMP)
  • Hypertext Transfer Protocol (HTTP)
  • Post Office Protocol (POP3)
  • File Transfer Protocol (FTP)
  • Internet Message Access Protocol (IMAP)

TCP on Wikipedia

1636 questions
222
votes
3 answers

What is the difference between Unix sockets and TCP/IP sockets?

It's from this answer: https://stackoverflow.com/questions/2482411/is-this-pdo-bug-fixed-now/2482424#2482424 When the host is "localhost", MySQL Unix clients use a Unix socket, AKA Unix Domain Socket, rather than a TCP/IP socket for the connection,…
apache
  • 3,227
  • 7
  • 27
  • 25
132
votes
8 answers

How to forcibly close a socket in TIME_WAIT?

I run a particular program on linux which sometimes crashes. If you open it quickly after that, it listens on socket 49201 instead of 49200 as it did the first time. netstat reveals that 49200 is in a TIME_WAIT state. Is there a program you can…
Rehan
  • 1,423
  • 2
  • 10
  • 5
98
votes
3 answers

How do high traffic sites service more than 65535 TCP connections?

If there is a limit on the number of ports one machine can have and a socket can only bind to an unused port number, how do servers experiencing extremely high amounts (more than the max port number) of requests handle this? Is it just done by…
alh
  • 1,119
  • 1
  • 8
  • 5
74
votes
9 answers

How passively monitor for tcp packet loss? (Linux)

How can I passively monitor the packet loss on TCP connections to/from my machine? Basically, I'd like a tool that sits in the background and watches TCP ack/nak/re-transmits to generate a report on which peer IP addresses "seem" to be experiencing…
nonot1
  • 1,099
  • 1
  • 12
  • 16
70
votes
4 answers

What is the "slash" after the IP?

In Amazon EC2, where I set "security groups", It says: Source: 0.0.0.0/0 And then it gives an example of: 192.168.2.0/24 What is "/24"? I know what port and IP is.
Alex
  • 8,471
  • 26
  • 75
  • 99
69
votes
6 answers

How to capture ack or syn packets by Tcpdump?

I want to use a filter rule to capture only ack or syn packets. How do I do this?
larry
  • 4,037
  • 9
  • 36
  • 42
59
votes
8 answers

What does "TTL expired in transit" mean on a ping attempt?

We get the message “TTL expired in transit” when we try to ping to a server in a different network segment. When we run tracert, 4 ip addresses repeat themselves indefinitely: 14 60 ms 59 ms 60 ms xxx.xxx.xxx.2 15 83 ms 81 ms 82…
Leonardo
  • 695
  • 1
  • 5
  • 8
53
votes
9 answers

Why would a server not send a SYN/ACK packet in response to a SYN packet

Lately, we've become aware of a TCP connection issue that is mostly limited to mac and Linux users who browse our websites. From the user perspective, it presents itself as a really long connection time to our websites (>11 seconds). We've managed…
codemonkey
  • 631
  • 1
  • 6
  • 6
52
votes
10 answers

Windows TCP Window Scaling Hitting plateau too early

Scenario: We have a number of Windows clients regularly uploading large files (FTP/SVN/HTTP PUT/SCP) to Linux servers that are ~100-160ms away. We have 1Gbit/s synchronous bandwidth at the office and the servers are either AWS instances or…
SmallClanger
  • 9,127
  • 1
  • 32
  • 47
51
votes
4 answers

How do I make cURL use keepalive from the command line?

I'm trying to verify that HTTP persistent connections are being used during communication with a Tomcat webserver I've got running. Currently, I can retrieve a resource on my server from a browser (e.g. Chrome) and verify using netstat that the…
Rob Hruska
  • 683
  • 1
  • 5
  • 10
48
votes
11 answers

What is the difference between UDP and TCP?

My router has two protocols (and a "both" option) that I can select when setting up port forwarding: UDP and TCP. What is the difference between these two protocols and when would you select one over the other in port forwarding?
Guy
  • 1,839
  • 5
  • 22
  • 28
47
votes
6 answers

Does HTTPS use TCP or UDP?

Does HTTPS use TCP or UDP?
Steven
  • 617
  • 2
  • 6
  • 7
42
votes
5 answers

Can TCP and UDP packets be split into pieces?

Can TCP packets arrive to receiver by pieces? For example, if I send 20 bytes using TCP protocol, can I be 100% sure that I will receive exactly 20 bytes at once, not 10 bytes then another 10 bytes or so? And the same question for UDP protocol. I…
iamnp
  • 521
  • 1
  • 4
  • 4
40
votes
1 answer

Will tcpdump see packets that are being dropped by iptables?

I have a firewall with these simple rules: iptables -A INPUT -p tcp -s 127.0.0.1/32 --dport 6000 -j ACCEPT iptables -A INPUT -p tcp -s 192.168.16.20/32 --dport 6000 -j ACCEPT iptables -A INPUT -p tcp --dport 6000 -j REJECT Now, suppose I am using…
Pablo Santa Cruz
  • 1,144
  • 4
  • 18
  • 25
36
votes
4 answers

Which is the default TCP connect timeout in Windows?

Which is the default TCP connect timeout in Windows? There is a registry key to configure it or it's set dynamically?
1
2 3
99 100