G3100 Router
t5403cg
Newbie

Recently updated to the G3100 router. 

I no longer can use my windows local hosts file to override an IP supporitng a URL.  It appears the G3100 DNS resolution process does not use the local host file of the windows desktop machine.  

Does anyone have a solution on how I can override IPs using the windows 10 local hosts file?

Thanks.

0 Likes
1 Solution

Correct answers
Re: G3100 Router
smith6612
Community Leader
Community Leader

The HOSTS file in Windows only controls DNS resolution for the local machine which it resides on. For example this is what you'd expect to see in a bone stock Windows HOSTS file:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

Entries will be structured by IP Address followed by the hostname or DNS name you want associated with an AP. For example, if I wanted to point Google.com to the IP Address 8.8.8.8 I would structure my file to look something like this.

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

8.8.8.8      google.com

On the computer where I made this change, "google.com" will always resolve to the IP Address 8.8.8.8 as the PC will check the contents of the HOSTS file for an entry first, prior to asking DNS, WINS, or doing NetBIOS Resolution of a name.

With that said, if you use HOSTS files to point to various computers on your network, chances are good that your PCs changed IP addresses if they're using DHCP. Just need to update the files. But also with that said, the HOSTS file doesn't control what IP address your computer gets. That is handled by DHCP (you can control this via the router's administrator pages) or on the device itself via the network card preferences.

Now another reason for things to break is if you're using a "Fully Qualified Domain Name" for your devices. For example, office-pc.fios.home . Older FiOS routers used a different "domain name" compared to the G3100. If you're accessing a machine by the name "office-pc", and it is not in NETBIOS by that name, the machine is going to ask DNS to search "fios.home" for that name by querying DNS for "office-pc.fios.home" . Systems need to register themselves into the router's DNS Server (there is a setting in the WIndows network preferences to control this) in order for this to work, and the router's DNS server needs to support accepting these registration requests (which is typically done during the DHCP process. If you're using Static, this may not happen, so you have to create a manual DNS Entry in the router).

Now if you are relying on NETBIOS Strictly, this is done via Broadcast. When you get a new router, PC firewalls will default to "Public" mode upon seeing the new router. Make sure your firewall is set to "Private" or "Home" otherwise NETBIOS name resolution will not work.

Hope this makes sense.

View solution in original post

Re: G3100 Router
Cang_Household
Community Leader
Community Leader

I am not understanding your question.

NetBios name should be resolved anyway by a broadcast. If you are unable to resolve it that way, then the host with the name may be having issues.

Re: G3100 Router
smith6612
Community Leader
Community Leader

The HOSTS file in Windows only controls DNS resolution for the local machine which it resides on. For example this is what you'd expect to see in a bone stock Windows HOSTS file:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

Entries will be structured by IP Address followed by the hostname or DNS name you want associated with an AP. For example, if I wanted to point Google.com to the IP Address 8.8.8.8 I would structure my file to look something like this.

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

8.8.8.8      google.com

On the computer where I made this change, "google.com" will always resolve to the IP Address 8.8.8.8 as the PC will check the contents of the HOSTS file for an entry first, prior to asking DNS, WINS, or doing NetBIOS Resolution of a name.

With that said, if you use HOSTS files to point to various computers on your network, chances are good that your PCs changed IP addresses if they're using DHCP. Just need to update the files. But also with that said, the HOSTS file doesn't control what IP address your computer gets. That is handled by DHCP (you can control this via the router's administrator pages) or on the device itself via the network card preferences.

Now another reason for things to break is if you're using a "Fully Qualified Domain Name" for your devices. For example, office-pc.fios.home . Older FiOS routers used a different "domain name" compared to the G3100. If you're accessing a machine by the name "office-pc", and it is not in NETBIOS by that name, the machine is going to ask DNS to search "fios.home" for that name by querying DNS for "office-pc.fios.home" . Systems need to register themselves into the router's DNS Server (there is a setting in the WIndows network preferences to control this) in order for this to work, and the router's DNS server needs to support accepting these registration requests (which is typically done during the DHCP process. If you're using Static, this may not happen, so you have to create a manual DNS Entry in the router).

Now if you are relying on NETBIOS Strictly, this is done via Broadcast. When you get a new router, PC firewalls will default to "Public" mode upon seeing the new router. Make sure your firewall is set to "Private" or "Home" otherwise NETBIOS name resolution will not work.

Hope this makes sense.