networking
Any difference between socket connection and tcp connection?
TCP/IP is a protocol stack for communication, a socket is an endpoint in a (bidirectional) communication. A socket need not be TCP based, but it is quite often the case. The term socket is also often used to refer to the API provided by the operating system that allows you to make a connection over … Read more
Docker Container Networking with Docker-in-Docker
There are pros and cons for both DinD and bind mounting the Docker socket and there are certainly use cases for both. As an example, check out this set of blog posts, which does a good job of explaining one of the use cases. Given your example docker-in-docker setup above, you can access Apache httpd … Read more
What is the difference between IPoIB and TCP over InfiniBand?
InfiniBand adapters (“HCAs”) provide a couple of advanced features that can be used via the native “verbs” programming interface: Data transfers can be initiated directly from userspace to the hardware, bypassing the kernel and avoiding the overhead of a system call. The adapter can handle all of the network protocol of breaking a large message … Read more
Can Multiple Vagrant VMs communicate by VM hostname?
Cheat the dns resolution with https://github.com/adrienthebo/vagrant-hosts ?
How can I use TCPDump on Unix to view messages sent to a specific multicast address?
I believe this should be enough for a specific group: tcpdump -i eth0 -s0 -vv host 239.255.255.250 All multicast traffic: tcpdump -i eth0 -s0 -vv net 224.0.0.0/4
How can I determine network and broadcast address from the IP address and subnet mask?
Let’s write both in binary: 130.45.34.36 = 10000010.00101101.00100010.00100100 255.255.240.0 = 11111111.11111111.11110000.00000000 A bitwise AND between the two would give us the network address: 10000010.00101101.00100010.00100100 (ip address) AND 11111111.11111111.11110000.00000000 (subnet mask) = 10000010.00101101.00100000.00000000 = 130.45.32.0 (the resulting network address) A bitwise OR between the network address and the inverted subnet mask would give us the broadcast … Read more
How does Port Number really work in TCP?
I know this is late, but since the thread is still on the internet, and because it’s a common question with very few authoritative answers on the web, it deserves a more complete and concise explanation for those who may stumble into it, even at this late date. You open a browser to pull up … Read more
Why does a SYN or FIN bit in a TCP segment consume a byte in the sequence number space?
It’s not particularly subtle – it’s so that the SYN and FIN bits themselves can be acknowledged (and therefore re-sent if they’re lost). For example, if the connection is closed without sending any more data, then if the FIN did not consume a sequence number the closing end couldn’t tell the difference between an ACK … Read more
What port does httpclient use?
There are always two ports involved in a connection – one at the server, and another at the client. The server-side port is specified (and is known to the client) via the HTTP URL (the default is 80 for HTTP connections and 443 for HTTPS) and is specified after the hostname using hostname:port notation. On … Read more