What's the difference between "default gateway" and "preferred DNS server"?

TCP/IP Properties of a network connection in Windows Server 2003 has two different options, "Default gateway" and "Preferred DNS server".


Solution 1:

The default gateway is where all traffic destined for non-local networks goes to be routed to it's destination.

The preferred DNS server is the DNS server that will be used first for DNS name resolution.

Solution 2:

A default gateway is the host that your server will use when trying to connect to anything that's not on the same network as it is. You can manually set up routes that it will use to get to specific networks, but in the absence of those it'll use the default gateway, hence the name.

A preferred DNS server (or servers) are what your server will use to translate domain names (like serverfault.com) into IP addresses (like 69.59.196.212). You'll want to have at least two of these configured, so that you can still resolve DNS if one of them goes down. If your server is in an Active Directory domain, you'll want the first DNS server to be the Domain Controller.

Solution 3:

What is Default Gateway?

A default gateway is the interface address of a router and a router's job is to intercommunicate different IP networks. The default gateway works as a gateway for IP address of a network to communicate with the IP address of another IP network.

What is DNS?

DNS resolves domain name such as Google.com into IP address such as 202.22.22.22. Normally there are two types of DNS resolution, Internal DNS and External DNS. Internal DNS works for internal Domain name resolution such as if we have multiple domain entries using windows Server, windows server will resolve those entries locally as those servers are present on same network.

However when we browse the Internet, we need external DNS resolution, for which we must know that how can we reach or communicate to external DNS which is actually IP address of a different network. Now we need router to route our packet from internal network to external network for domain name resolution. Now we type IP address of DNS server so that our computer can resolve DNS requests using external IP address but as that IP address is out of our network scope, now we send our packet to router interface which is our gateway address, router routes our packet to the DNS server IP address where our DNS request gets resolved and comes back same route of default gateway.

Therefore a DNS cannot work without a Gateway address as the packet has to be routed outside our networks scope.

Without a default gateway a computer cannot reach to DNS server as DNS is an address of different network.

Solution 4:

Don't confuse a 'gateway' with being a DNS server (at times it can be) but most times it will not be, your gateway may provide you with DHCP (home router) while at the same time forward your DNS requests to your ISPs DNS server (making it seem @ home like your gw + dns are one in the same).

For the office / work env it usually shows up broken up, a gw, and a dns server (or more).