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

1591 questions
207
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,027
  • 6
  • 25
  • 25
128
votes
7 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,383
  • 2
  • 9
  • 5
84
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
  • 979
  • 1
  • 7
  • 5
72
votes
8 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,069
  • 1
  • 12
  • 16
68
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,111
  • 24
  • 71
  • 99
65
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
  • 3,927
  • 9
  • 35
  • 41
58
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
  • 685
  • 1
  • 5
  • 8
51
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
  • 611
  • 1
  • 6
  • 6
50
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
  • 8,947
  • 1
  • 31
  • 45
50
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
  • 673
  • 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,798
  • 4
  • 21
  • 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
35
votes
4 answers

Do DNS queries always travel over UDP?

I've spent a bit of time researching this topic and can't seem to find an exact answer, so I'm fairly confident it's not a duplicate, and while my question is based on a security need, I think it's still safe to ask here but let me know if I need to…
Caderade
  • 353
  • 1
  • 3
  • 5
35
votes
1 answer

Random TCP RST's on certain websites, what's going on?

Short version: One Windows Server 2012 machine on my network is getting persistent but intermittent TCP RSTs when connecting to certain websites. Dunno where they're coming from. Check out the wireshark log for my analysis & questions. Long…
Morty
  • 293
  • 3
  • 7
1
2 3
99 100