Posts

Showing posts with the label Networking

A simplified version of Kubernetes Network for developing on Windows and WSL and Docker Desktop

Image
Pictures always help. We can use this one to put together a basic description of how the Windows, WSL2 Linux distributions, and Docker on WSL and Kubernetes talk to each other over localhost. We’ll cover why you got to do things like port-forwarding or proxy with a Kubernetes network. There is asymmetric behavior between the different components. I'm sure somebody knows the magical explanation.  Click to enlarge Video Walkthrough Magical localhost networking with Docker WSL2 Windows and Linux Heavily Edited Video Transcript You have a Windows host with its ethernet adapter. Each Linux WSL2 instance has an eth0 network adapter. The Windows host and WSL instances are attached to a private network on the Ethernet Switch (WSL) Then you have the localhost adapter. WSL makes it look like localhost is visible to all WSL instances and to the Windows host.  A port on WSL2 127.0.0.1 is also available on any other WSL2 instance and from the Windows host all on 127.0.0.1.  ...

Address Pools and Interfaces for Docker and WSL and Windows

Image
Docker Desktop and WSL2 integration on Windows 10/11 "just works" in many situations but feels like magic. I needed a map of the networks and names to understand why I needed proxies, port forwarders, and projected ports. May this be useful to you also :-) The Windows 10/11 machine in this diagram is known as Z820. This diagram is an outside-looking-in topology. There are multiple networks and different name resolutions for the same names depending on where you are in the network. In some places, the same hostname is resolved to different IPs if you use DNS vs the host table, /etc/hosts Click to Enlarge This diagram is a simplified version of the previous one with the WSL network and associated Linux installations removed. Click to Enlarge Video YouTube Windows WSL2 Docker Node Pool and Desktop Networks and Names The Six Networks in this diagram The network IP ranges in the diagram above are those of the default Docker / WSL installations and can be adjusted via various mech...

Browsers open extra connections in anticipation of additional requests

Image
Browsers can open extra connections or pre-stage open connections to improve the user experience.  You can see this if you build your own web server for IoT devices or monitor the connections and not just the requests.  These pre-staged connections do not show up in the browser developer tools. I was troubleshooting a connection timeout issue in a Python-based web server where there were sometimes suspicious connections that timed out.  All my testing was done via a browser rather than Postman so I decided to investigate if it was a browser issue or a problem with my service.  The developer tools console in Chrome did not  show the extra connection in the network traces. The Python web server generating the logs has a 10-second connection timeout. A single browser action appears to generate two inbound connection requests but only one HTTP request. The 2nd inbound connection appears to be timing out if the user doesn't click on or initiate any additional browser...

Raspberry Pi could not connect to Internet on FIOS but could reach all local nodes and DNS

Image
I have a Raspberry Pi network monitor that lost access to the Internet. DNS worked but everything else was blocked. Local network connectivity worked fine in both directions. It took me a couple of hours to identify the FIOS firewall issue. What Didn't Work Raspberry Pi could not curl or ping Internet services. Raspberry Pi could not get updates O/S re-installation What Worked Other machines on the local network could retrieve resources from the Internet via browser and command line. Other machines on the local network could ssh into the Raspberry Pi. Other machines on the local network could ping the Raspberry Pi. Raspberry Pi could ping the local machine. Raspberry Pi initiated DNS lookup worked Raspberry Pi traceroute to 8.8.8.8 or www.google.com would timeout Raspberry Pi /etc/dhcpcd.conf was unchanged. Raspberry Pi /etc/resolv.conf had the two needed rows in it Other Info This ran for two years without issue. Raspberry Pi IP issued via DHCP.  Other DHCP devices had no issues. ...

Virtual Machine Networking: NAT or Bridged?

VMWare and other desktop or embedded hypervisors create virtual networks that the virtual machines connect to when running on the hosting software.  These virtual networks provide network connectivity from the guest machines through the host machine out to the general LAN/WAN.  There are two main modes. NAT:   The host puts the virtual machines on their own private network and acts as a network gateway for that virtual network.  Guest machines can communicate over the shared network and communicate to the WAN/Internet through the host machine.  Guest machines consume none of the physical network's address space because they are connected on the hosts "virtual network". Guest network interfaces can be configured using DHCP, provided by the host, or with fixed IP addresses to simulate a stable server environment.  Fixed IP addresses are handy when the virtual machines need to communicate with each other. VMWare typically uses the host network's VMnet8...