Why DHCP Ain’t as Good as it Used to Be

rj31x jack wiring

phone-37856_1920Why DHCP ain’t as good as it used to be.

DHCP used to be the go-to protocol when setting up computers and printers.

These days you may want to use static IPs for printers and maybe even computers if you user RDP (Remote Desktop Protocol).

DHCP (Dynamic Host Configuration Protocol) allows a server to hand out IPs and network information to devices joining your network. Often this is handled by a router. The router may be built into your cable modem on a home network.

Every device on your network requires a unique IP so that the requests for network and web resources get routed correctly.

The alternative is to set up static IPs, in which case, you manually enter pertinent information like the gateway (router), DNS servers, and a static IP that is not in the DHCP IP pool or previously assigned.

DHCP is much simpler especially is you have lots of devices coming and going. In fact, it is easier to enter a static IP after first reviewing a CMD prompt of ipconfig for the DHCP assigned values.

On a domain, this is best done by the server.

System

For our discussion, we will assume a small single server (server) but the principles apply to most DHCP servers.

Windows Server 2008 R2 Standard
DC (domain controller) for corp.domain.com
AD (Active Directory)
connected to the Internet via a cable router.

DNS--maskedVital Information

The vital pieces of information that DHCP must supply on a domain are the IP, gateway router, DNS servers, and domain.

DHCP scope options
003 router -192.168.0.1
006 DNS servers – 192.168.0.253 (our DC)
015 domain name – corp.domain.com

address pool : 192.168.0.50 -192.168.0.99

Typically we save a few IPs for static machines like servers, routers, and printers. For our system, we will reserve IPs below 192.168.0.50. For larger networks you may need multiple scopes and/or wider ranges.

The domain name should match the domain name in DNS forward lookup zone. You can find DNS & DHCP sections in Server Manager. Expand sections and right-click to select properties to  find & edit information.

Troubleshooting DHCP

For our demo system, we are assuming that server was in another domain prior (domain.com) to becoming DC (domain controller) for corp.domain.com. Since DNS forwarder shows corp.domain.com as the domain we will edit our DHCP name accordingly.

Our demo system also had a bogus router 0.0.0.0 so we delete the information and add our gateway 192.168.0.1.

These sorts of problems occur when the server goes from member server to domain controller of another domain.

In Conclusion

DHCP is still very useful so you will want to take advantage of it as much as possible.

Tip: Even if you use static IPs you may want to look at something that’s already on your network to see how DHCP set it up.

Slow Loading Websites & Resources

Network Issues

Slow Loading Websites & Resources

DNS (Domain Name System) is a service that translates website & computer names to ips (i.e., Internet Protocol addresses) so you can use friendly domain names like Google.com & Randy-laptop.

On a Windows domain this service is handled by the DC (Domain Controller).

IPs – IPv4

Note that every device on your network should have a unique ip. A duplicate ip causes confusion. Only the 1st device to secure an ip will be able to access the network.

Likewise many websites have a unique ip but this is not always the case. If your test website uses HTTP Secure(e,g, https://www.google.com)  then it has a unique website.

IPv4 is the easier protocol to deal with when accessing resources.

Applications

This article specifically applies to a Server 2008 R2 Standard single server domain with AD (Active Directory) but the principles can be applied to DNS servers everywhere.

A Server 2008 R2 Standard single server domain should point only to itself for DNS and not an external server. The rest of the domain should also point to this server. There should be no reason to have a forwarder in a single server domain but you might run across one if a server has been removed somehow.

Machines with static ips will have the local ip for the DNS server. Machines assigned ips via DHCP (Dynamic Host Configuration Protocol)  will get that ip from the DHCP server.

Troubleshooting Domain DNS

If your clients on the domain access computer resources like network shares & websites without issues then your DNS is working properly. If on the other hand it takes a long time for a website or network share to load then you may want to investigate DNS.

A simple way to troubleshoot DNS is to try accessing the ip rather than the FQDN (Fully Qualified Domain Name). Chances are you don’t know the ip of the resource but you can ping it from a CMD prompt.

The examples below we are pinging FQDN cisco.com   & Randy-laptop with the -4 flag set (return IPv4). Once we have the ip we can try accessing these resources.

In the case of cisco.com we put the ip 72.163.4.161 in our browser. If the page loads for the ip and not the FQDN then we have a DNS problem.

In the case of the network resource, we can try connecting with a net use command. Assuming you have permission to access the save share on Randy-laptop then the net use command should connect  drive X. If you can access the share via ip but not FQDN then we have issues with DNS.

Examples:

C:\Users\Randy>ping cisco.com -4

Pinging cisco.com [72.163.4.161] with 32 bytes of data:

C:\Users\Randy>ping Randy-laptop -4

Pinging Randy-Laptop [192.168.1.25] with 32 bytes of data:

Connecting to network share using ip:

C:\Users\Randy>net use x: \\192.168.1.25\save
The command completed successfully.

DNS Problem Forwarder

In our example we are going to assume that the network is slow and resources drag. Troubleshooting leads us to believe there is a DNS problem. Looking at the properties of our DNS we find a forwarder.

forwarder - slow loading websites

 

We know the forwarder should not be there so we remove it & restart the DNS service. This is more likely to occur when you remove a DNS server from your domain. It can also occur when you move your DC to a new domain leaving the old DNS server behind.

Why Network Troubleshooting Will Change Your Life

Network Troubleshooting

Why Network Troubleshooting Will Change Your Life.

OK maybe it won’t change your life but it will demand a considerable amount of your time until you get it running properly.

Windows domain best practice is to use the domain server/s for DNS & DHCP. While these features are typically enabled on routers they cause a lot of grief on a Windows domain. Routers may know where the main DNS servers are on the Internet but they have no idea where your network servers are.

Consequently, the router will start looking for your server on the Internet 1st and then start interrogating your network. That yields an unnecessary lag time for searches for machines that are on your network.

This article primarily addresses a single server domain but the principles are similar for larger environments.

DNS – Domain Name System

If you are experiencing a lag time trying to find or connect to your server using a  Fully Qualified Domain Name (FQDN) then your network may be misconfigured. Best practice is to have your DNS server reference itself and all the other PCs get their information from the local DNS server.

Since we are mainly focused on single-server domains then DNS will be on the domain controller.

Example:

domain – example.com

LAN – 192.168.0.xxx

gateway  – 192.168.0.1

server.example.com  – 192.168.0.2

DNS – 192.168.0.2

Once we setup the server static IP to use itself for DNS then the server won’t have any problems finding machines on the local network.

DHCP – Dynamic Host Configuration Protocol

The easy way to setup PCs on your network is to use DHCP. This tells the device where your DNS server, gateway are in addition to assigning an IP address from a pool.  For a home setup it’s easy enough to let the Internet router take care of these responsibilities. For a domain, however,  we want our server to handle DNS and DHCP too.

We will want to disable DNS & DHCP on the router (gateway) and add the roles to the server.

The DHCP server will issue is from our address pool and set the client PCs DNS to use the server ip for DNS.

Static ip Addresses

Machines like the server need static ips so that we always know what address it has. If you allow devices to use DHCP addresses then they may or may not get the same ip every time which can lead to more network problems for devices you connect to via an ip.

In our example, the server is at 192.168.0.2 on our Local Area Network (LAN). That means we had to assign an ip outside of the DHCP pool, subnet mask, gateway and DNS server (itself).

Best practice is to use a static ip for your server so we don’t end up with some sort of conflict. If other devices use static ips, then you will need to adjust the DNS on those devices if they are not set to your server.

 In Conclusion

Network troubleshooting may not change your life but it will definitely improve the quality of time you spend on your attached computers.