Skip to main content
50 votes
Accepted

How are source ports determined and how can I force it to use a specific port

How are local ports determined The port number is chosen by the TCP implementation software from a range of port numbers called Ephemeral Ports. The exact mechanism for choosing the port number and ...
DavidPostill's user avatar
  • 159k
34 votes

Why don't we have a usable IP address in 127.0.0.0?

In IPv4, the first address of a subnet is reserved for...unclear reasons, really, but most likely because very long ago it used to be the "broadcast" address. (Later, the last address became ...
grawity_u1686's user avatar
29 votes
Accepted

Is it possible to force TCP to find another path to the host?

Is it possible that the route is somehow cached? If so, is it possible to reset this cache? No, only the first hop (i.e. the route to your local gateway) is under control of the OS, but you have no ...
grawity_u1686's user avatar
27 votes

Is an ACK necessary when using reliable protocols like TCP? How much overhead / throughput penalty does it create?

Is an ACK necessary when using reliable protocols like TCP? Yes. the ACKs are the mechanism that makes TCP a reliable protocol. If ACKs were removed from the protocol, then TCP would no longer know if ...
DavidPostill's user avatar
  • 159k
16 votes
Accepted

ICMP packet with TCP?

According to the ICMP message type (3 "Destination Unreachable"), these are not monitoring but error packets (which is the most common use of ICMP). They do not use TCP, but they were caused ...
grawity_u1686's user avatar
15 votes
Accepted

Send TCP packets with Curl

You can send raw text with curl to any host:port as netcat would do, using the telnet protocol: curl telnet://192.168.0.170:59403 <<< someText
xtian's user avatar
  • 276
14 votes

Open a test TCP connection to a specified IP/Port

pkgmgr is now replaced by dism. Install telnet from command line (run it as administrator): dism /online /Enable-Feature /FeatureName:TelnetClient Then you can test TCP connection by: telnet ...
mixel's user avatar
  • 471
14 votes
Accepted

Practical (vs theoretical) max limit of TCP packet size

Ethernet has always been influential on TCP/IP packet sizes. Ethernet has a standard MTU of 1500 bytes, which, after typical IPv4 header overhead of 20 bytes and typical modern TCP header overhead of ...
Spiff's user avatar
  • 106k
14 votes
Accepted

Why is the TCP MSS (Maximum Segment Size) 1460 bytes?

1460 is not the maximum MSS. The MSS is calculated as the MTU minus the IP and TCP header sizes. On networks with higher path MTUs than 1500 (example: data center networks that use nonstandard 6k or ...
Spiff's user avatar
  • 106k
10 votes

Open a test TCP connection to a specified IP/Port

Late answer, but still a good one: PowerShell v3 Test-NetConnection google.com -Port 80 Will actually perform a TCP test and provide results: TcpTestSucceeded : True I do need to note that ...
Unknown Variable's user avatar
10 votes

How are source ports determined and how can I force it to use a specific port

David Postill's answer is perfectly right. I would like just to add to it, by stressing that changing the ephemeral port range in Linux is so simple, that the OP has an affirmative answer. You ...
MariusMatutiae's user avatar
10 votes
Accepted

How does HTTP Keepalive handle multiple requests along with EOF from same origin?

When we don't use keep alive, the client's OS sends EOF flag (end of file) to indicate the server that the a file has been completed transmitted No, it doesn't. The end of an HTTP request is detected ...
grawity_u1686's user avatar
9 votes

How can I see 127.0.0.1 traffic on Windows using Wireshark?

To keep this current, as hsluoyz said, install npcap http://wiki.wireshark.org/CaptureSetup/Loopback When installed on Windows Vista or later (including Win7, Win8 and Win10) with option "...
KCD's user avatar
  • 500
9 votes

Why is my UDP so slow?

As Nick answered, iPerf uses a default of 1Mbit/sec for UDP. In order to use the same bandwidth as TCP while performing a UDP test, simply provide -b flag with the value of 0. iperf3 --udp -b 0 -f ...
Sufiyan Ghori's user avatar
9 votes

Why do computers have 65,535 TCP ports?

"Why do computers have 65535 TCP ports?" Computers do not have ports. The concept of "ports" to which you're referring is strictly related to the TCP and UDP protocols of the TCP/IP networking stack. ...
Damiano Verzulli's user avatar
9 votes

How to send binary data in netcat to an already established connection?

Note: while following this solution, type commands in a single shell session (or use a single script) unless said otherwise. This is because it uses variables and file descriptors, they are not ...
Kamil Maciorowski's user avatar
9 votes
Accepted

Do socket and buffer mean the same thing?

A socket is a broader concept than a buffer. A socket has two buffers and some other information associated with it. In the context of sockets programming, a socket is your app's interface to one TCP ...
Spiff's user avatar
  • 106k
9 votes
Accepted

Iptables Fail to block inbound from specific ip

A packet being routed rather than received by a local process traverses the filter/FORWARD chain and not the filter/INPUT chain, even if this is caused by the use of NAT. So the current blocking rules ...
A.B's user avatar
  • 6,006
8 votes
Accepted

What prevents unsolicited internet packets from using up my monthly data limit?

My home router can use port-forwarding to act as a server, so I assume all internet packets sent with my public IP address as a destination are hitting it (and just not getting any response from my ...
grawity_u1686's user avatar
6 votes

How to check the TCP congestion control algorithm flavour in Ubuntu

Adding to @grawity answer, it is possible to check all TCP congestion control algorithms available with the following command: sysctl net.ipv4.tcp_available_congestion_control A list of some of the ...
Guy Avraham's user avatar
6 votes

How to connect to `tcp://192.168.202.112:11053` by command line?

Use netcat for arbitrary TCP and UDP connections. It is dedicated for this purpose. It can also listen on a port. nc -v 192.168.202.112 11053 Windows Netcat implementation for Windows: https://nmap....
amra's user avatar
  • 161
6 votes
Accepted

How does TCP handle multiple requests targeted to one port?

TCP doesn't really define what a "request" looks like; as a transport protocol it only provides a duplex data stream (no different from data transfer over a serial port) and leaves it up to the ...
grawity_u1686's user avatar
6 votes

What does TCP packet [P.] flag means in tcpdump's output?

What exactly this [P.] Flag It is a PUSH flag. Tcpflags are some combination of S (SYN), F (FIN), P (PUSH), R (RST), U (URG), W (ECN CWR), E (ECN-Echo) or `.' (ACK), or `none' if no flags are set. ...
DavidPostill's user avatar
  • 159k
6 votes
Accepted

Capture only TCP SYN-ACK packets with tcpdump

Based on looking at the pcap-filter man page and especially the examples at the end I would suggest that the correct filter syntax to match packets which have at least both SYN and ACK are set would ...
Steffen Ullrich's user avatar
6 votes

Why don't we have a usable IP address in 127.0.0.0?

In the IPv4 specifications, the lowest address in any IPv4 network is reserved as the network address which has a distinct purpose from the broadcast address which is normally the highest address in ...
penguin359's user avatar
5 votes

What is the difference between :::: and 0.0.0.0 from the netstat -an output?

:: and 0.0.0.0 have the same meaning but in completely different context. They are not the same. At the server side both are used to denote "no particular address" if you binding processes (not ...
Gote Guru's user avatar
  • 161
5 votes

How do I kill a process that is dead but listening?

I've tried all solutions commented above and not one worked for me. I've kept researching and I got this answer, which is a combination using @Michael comment and this link https://serverfault.com/...
kato2's user avatar
  • 151
5 votes

How do I kill a process that is dead but listening?

saw similar issue when root cause was some child process created inheriting the ports, parent process crashed, while child process still holding the port. Resolution was to identify the child process ...
MSE's user avatar
  • 151

Only top scored, non community-wiki answers of a minimum length are eligible