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
13
votes
2 answers

tcp flags in iptables: What's the difference between RST SYN and RST and SYN RST ? When to use ALL?

I'm working on a firewall for a virtual dedicated server and one of the things I'm looking into is port scanners. TCP flags are used for protection. I have 2 questions. The rule: -p tcp --tcp-flags SYN,ACK,FIN,RST SYN -j DROP First argument…
Kris
  • 1,367
  • 3
  • 15
  • 17
13
votes
4 answers

TCP monitoring on a server: comparing netstat vs lsof?

I'm monitoring the TCP stack on a server hoping to generically infer problems with application on the box. My first inclination is to measure the number of sockets in all reported states (LISTEN,ESTABLISHED,FIN_WAIT2,TIME_WAIT, etc) and detect some…
ericslaw
  • 1,572
  • 2
  • 13
  • 15
13
votes
5 answers

Does the TCP source port have to be unique per host?

I've learned that a TCP connection is identified by the tuple (source IP, source port, destination ip, destination port). Theoretically, it should thus be possible to have a client from host1:port1 connect to server1:port1 and at the same time…
lxgr
  • 562
  • 2
  • 6
  • 20
12
votes
2 answers

Extreme UDP packet loss at 300Mbit (14%), but TCP > 800Mbit w/o retransmits

I have a linux box I use as the iperf3 client, testing 2 identically equipped Windows 2012 R2 server boxes with Broadcom BCM5721, 1Gb adapters (2 ports, but only 1 used for the test). All machines are connected via a single 1Gb switch. Testing UDP…
Evgeniy Berezovsky
  • 861
  • 1
  • 8
  • 27
12
votes
4 answers

Is there a way to see what is actually filtering TCP port communication?

nmap -p 7000-7020 10.1.1.1 Will output all the filtered ports Starting Nmap 6.40 ( http://nmap.org ) at 2015-03-04 12:18 EET Nmap scan report for 10.1.1.1 Host is up (0.00091s latency). PORT STATE SERVICE 7000/tcp filtered…
Eduard Florinescu
  • 851
  • 5
  • 24
  • 39
12
votes
2 answers

Difference between tcp recv buffer and tcp receive window size?

The command shows the tcp receive buffer size in bytes. $ cat /proc/sys/net/ipv4/tcp_rmem 4096 87380 4001344 where the three values signifies the min, default and max values respectively. Then I tried to find the tcp window size using tcpdump…
pradeepchhetri
  • 2,698
  • 6
  • 37
  • 47
12
votes
3 answers

Is it possible for a TCP connection to remain open when the client has disconnected?

We have a server application which is facing TCP exhaustion problems at around 4000 connections. This will occur every 3 or 4 weeks (approximately). The vendor, which has created this server application tells us after examining the output of netstat…
Josh Smeaton
  • 1,340
  • 2
  • 19
  • 31
12
votes
13 answers

How to discover the MAC address of machines in a network?

How do I discover the MAC address of machines in a network? I need to discover the machines that are available just with only BIOS installed (no operating system). And I need to find the MAC address of machines that are up.
sarav
12
votes
9 answers

ping alternative for tcp?

It's a common task to check network 'quality' - latency, number of dropped packets etc. But 'ping' has a number of drawbacks: - It uses ICMP. Many ISP has different shapers for ICMP and TCP traffic, so 'ping' will show 10ms latency, but TCP…
grigoryvp
  • 3,655
  • 11
  • 39
  • 59
11
votes
2 answers

How to set up a persistent TCP gender-changer proxy?

I have a provider (A) that wants to send us data through an incoming TCP connection. Unfortunately the consuming service (B) cannot receive inbound TCP connections. Also it does not have a static IP, another requirement. One way to solve this would…
dtech
  • 633
  • 2
  • 10
  • 27
11
votes
3 answers

How does anycast work with tcp?

TCP, being stateful, should require subsequent packets to reach the same server. (Stateless) HTTP runs on top of TCP, and CDN's can use anycast. So how does TCP work with anycast? What if the syn and the ack go to different servers? I think I've…
Filip Haglund
  • 371
  • 4
  • 11
11
votes
1 answer

How to send 0x80 byte to a tcp port using netcat or similar tool?

I'm trying to make a Memcached server respond as if I were using a binary protocol. If possible just command line answers pls, no code snippet in any programming language.
user120858
11
votes
1 answer

TCP congestion control for low-latency 10GbE -> 1GbE network?

I have a server with a 10GbE connection to a switch, and 10 clients each with a 1GbE connection to the same switch. Running nuttcp in parallel on each of the clients, I can push 10 TCP streams of data to the server simultaneously at close to wire…
Nemo
  • 344
  • 1
  • 8
11
votes
4 answers

Why is creating a new TCP connection regarded as expensive?

I do not understand why creating a new TCP connections is considered an expensive task. Basically setting up a new connection refers to performing TCP's 3-way handshake. So that's sending two packets and receiving one. Considering that thousands of…
user132452
11
votes
2 answers

How to find process which uses most bandwidth

How can I find the process which uses most bandwidth on a Linux PC? With iftop it's possible to find which connections produce most bandwidth, but how to find the process?
knittl
  • 312
  • 3
  • 11