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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 "...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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.
...
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 ...
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 ...
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 ...
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/...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
tcp × 914networking × 476
linux × 157
udp × 88
windows × 67
wireshark × 60
ip × 56
tcpip × 55
sockets × 50
port × 49
router × 38
http × 38
windows-7 × 37
iptables × 37
windows-10 × 32
firewall × 30
ubuntu × 24
tcpdump × 24
vpn × 23
netstat × 22
dns × 21
internet × 21
connection × 20
nat × 20
macos × 19