Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main > Live #2010

Merged
merged 5 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WSL/basic-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ To terminate the specified distribution, or stop it from running, replace `<Dist
## Identify IP address

- `wsl hostname -I`: Returns the IP address of your Linux distribution installed via WSL 2 (the WSL 2 VM address)
- `ip route show | grep -i default | awk '{ print $3}'`: Returns teh IP address of the Windows machine as seen from WSL 2 (the WSL 2 VM)
- `ip route show | grep -i default | awk '{ print $3}'`: Returns the IP address of the Windows machine as seen from WSL 2 (the WSL 2 VM)

For a more detailed explanation, see [Accessing network applications with WSL: Identify IP Address](./networking.md#identify-ip-address).

Expand Down
4 changes: 2 additions & 2 deletions WSL/enterprise.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Set up Windows Subsystem for Linux for your company
description: Resources and instructions on how to best use the Windows Subsystem for Linux in an Enterprise environment.
ms.date: 11/15/2023
ms.date: 08/16/2024
ms.topic: article
---

Expand Down Expand Up @@ -60,7 +60,7 @@ What is commonly referred to as an "image", is simply a snapshot of your softwar

To begin creating your WSL image, first [install the Windows Subsystem for Linux](./install.md).

Once installed, use The Microsoft Store for Business to download and install the Linux distribution that’s right for you. Create an account with the [Microsoft Store for Business](https://businessstore.microsoft.com/).
Once installed, use the [Microsoft Store](https://apps.microsoft.com/search?query=wsl&hl) to download and install the Linux distribution that’s right for you.

### Exporting your WSL image

Expand Down
54 changes: 52 additions & 2 deletions WSL/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Troubleshooting Windows Subsystem for Linux
description: Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
ms.date: 02/22/2024
ms.date: 08/08/2024
ms.topic: article
---

Expand Down Expand Up @@ -296,7 +296,6 @@ When using Mirrored networking mode (the experimental `networkingMode` set to `m

- UDP port 68 (DHCP)
- TCP port 135 (DCE endpoint resolution)
- UDP port 5353 (mDNS)
- TCP port 1900 (UPnP)
- TCP port 2869 (SSDP)
- TCP port 5004 (RTP)
Expand Down Expand Up @@ -331,6 +330,57 @@ It is recommended to stop the Network Manager service for WSL networking to be c
sudo systemctl disable network-manager.service
```

### Resolve .local names in WSL

To resolve hostnames to IP addresses within a local network without the need for a conventional DNS server, .local names are often used. This is achieved through the mDNS (Multicast DNS) protocol, which relies on multicast traffic to function.

**networkingMode set to NAT:**

Currently, this feature is not supported when DNS tunneling is enabled. To enable the resolution of .local names, we recommend the following solutions:

- Disable DNS tunneling.
- Use mirrored networking mode.

**networkingMode set to Mirrored:**

Note: You need to be on WSL build 2.3.17 or higher in order to have the functionality below.

Since Mirrored mode supports multicast traffic, the mDNS (Multicast DNS) protocol can be used to resolve .local names. Linux must be configured to support mDNS, as it does not do so by default. One way to configure it is using the following these two steps:

1) Install the "libnss-mdns" package

```Bash
sudo apt-get install libnss-mdns
```

*The "libnss-mdns" package is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) that provides hostname resolution via Multicast DNS (mDNS). This package effectively allows common Unix/Linux programs to resolve names in the ad-hoc mDNS domain .local.

2) Configure the `/etc/nsswitch.conf` file to enable the "mdns_minimal" setting in the "hosts" section. Example content of the file:

```Bash
cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat systemd
group: compat systemd
shadow: compat
gshadow: files

hosts: files mdns_minimal [NOTFOUND=return] dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
```

### DNS suffixes in WSL

Depending on the configurations in the .wslconfig file, WSL will have the following behavior wrt DNS suffixes:
Expand Down
Loading