A Guide to Windows Network Adapters and DNS Configuration

Overview

In Windows networking, setting up DNS settings and managing network adapters are crucial chores. Understanding how to work with network adapters and DNS configuration is essential whether you need to resolve connectivity problems or enhance network performance. We’ll look at some fundamental commands in this post to discover connected network adapters and set up DNS on a Windows 10 computer. You may fix connectivity problems, improve network performance, and tailor your DNS settings to your requirements by using these instructions. Any Windows network administrator must be familiar with network adapters and DNS settings, and these commands offer a solid place to start for your networking tasks.

Finding Connected Network Adapters

To find connected network adapters on your Windows machine, you can use the Get-NetAdapter command in PowerShell. This command displays all network adapters on your computer, including physical and virtual ones.

To filter the results to show only physical adapters that are currently up, you can use the following command:

Get-NetAdapter -physical | where status -eq 'up'

This command shows the network adapters that are up and running, including their names, interfaces, MAC addresses, and other properties.

If you want to display only the names of the physical adapters that are up, you can use the following command:

(Get-NetAdapter -physical | where status -eq 'up').name

This command displays only the names of the physical adapters that are up.

To filter the active adapter, use the below command.

$adapter = (Test-NetConnection).InterfaceAlias
$adapter

Configuring DNS Settings

DNS (Domain Name System) is a critical component of networking that maps domain names to IP addresses. By default, Windows uses the DNS servers configured by your Internet Service Provider (ISP). However, you can also configure custom DNS servers to improve network performance or bypass ISP restrictions.

To display the current DNS configuration for a specific network adapter, you can use the netsh command. For example, to show the DNS configuration for an Ethernet adapter, you can use the following command:

netsh interface ip show dnsservers "Ethernet"

This command displays the DNS servers configured for the Ethernet adapter.

If you want to change the DNS servers for an Ethernet adapter, you can use the netsh command as well. For example, to set the DNS server to 8.8.8.8 (Google’s public DNS server), you can use the following command:

netsh interface ip set dns name="Ethernet0" static 8.8.8.8

This command sets the DNS server for the Ethernet adapter to 8.8.8.8. You can replace “Ethernet0” with the name of the Ethernet adapter you want to configure.

netsh interface ip set dnsservers name="Ethernet" source=dhcp

This command sets the DNS server for the Ethernet adapter to obtain the addresses automatically from the DHCP server. You can replace “Ethernet” with the name of the Ethernet adapter you want to configure.

Leave a Reply

Your email address will not be published. Required fields are marked *