Content Top
DAL Computer Help » Articles » General » IP addressing, DNS and DHCP for beginners

IP addressing, DNS and DHCP for beginners

IP addressing, DNS and DHCP for beginners Rate This Article
Posted By: D-A-L | Date Added: 18-10-2007 08:36 AM | Views: 1090


IP addressing, DNS and DHCP for beginners
by Nathan Forrest


Hi! We hope that you enjoyed our recent seven-part series on improving your PC's performance. We are now bringing you articles on other topics that we feel could help you in the day-to-day use of your home or small business PC. The articles are written by myself, Nathan Forrest of Future Systems (Sussex). I've been helping out as a moderator on the free computer support forums at www.d-a-l.com since they first opened and I have 15 years' experience of residential and small business IT.


Previous articles that you might also be interested in:




IP addressing, DNS and DHCP for beginners
If you ever need to troubleshoot connection problems with a home network (which includes wireless broadband) or a small business network, you'll probably get stuck rather quickly if you don't understand the basics of how devices on your network communicate. This week, we hope to give you a basic understanding of 3 important principles relating to the configuration and maintenance of a home or small business network. These are IP addressing, DNS and DHCP.

IP addressing
In the old days, most PCs were given names such as "Bob" and "Sally" or "Workstation1" and "Workstation2". If PCs needed to communicate with each other on a network, they would send a message around the network (known as a broadcast) asking each of the PCs what their name was until they found the PC that they wanted to communicate with. This was OK within the limits of a small to medium sized network.

However, once PCs and servers needed to communicate over the Internet, simply referring to them as "Bob" and "Sally" wasn't specific enough as there would be lots of PCs and servers with the same name. Instead, they needed a unique reference, an Internet Protocol (IP) address. This is similar to the post code or zip code for your home (when combined with the house number) - it uniquely identifies your building. An IP address is a unique number that is different for each PC or server such as 83.143.234.15 or 211.23.204.134. Although there are many rules about how the IP address is formed, the most noticeable and basic rules are.
    • There must be 4 banks (or 'octets') of numbers
    • The numbers must be separated by dots
    • Each octet can be 1, 2 or 3 digits
    • Each first 3 octets must have a value of 255 or less
    • The last octet must have a value between 1 and 254


Several ranges of IP addresses are reserved for local area networks (LANs), e.g. an internal small business network or your home connection between your desktop PC, laptop and broadband router. Most home networks will use the 192.168.x.x reserved address range, where the 'x' represents a number between 0 and 255.

The most common usage is 192.168.0.x. So, for example, a home wireless broadband router will normally automatically give itself an IP address of 192.168.0.1 and it will expect other devices on the network to be 192.168.0.2, 192.168.0.3, 192.168.0.4, etc.

Note that all devices need to have the same first three numbers in the IP address in order to be able to communicate on a typical home or small business network.

DNS
Did you know that, when you view a web site, the URL that you use (e.g. http://www.microsoft.com) is actually just the "friendly" name for that web site, similar to the "Bob" and "Sally" examples that we used earlier? In order to find that web site, your PC actually needs to know the IP address for the web server on the Internet that is hosting that web site. It's not surprising really. If you addressed an envelope to "Peter and Sarah", you wouldn't expect the postman to knock on every door in the area, asking if this was the right house to find Peter and Sarah - you would at least include the post code or zip code. Similarly, the IP address will help your PC find a web site much more directly.

The match between a web site URL and IP address is part of the function of the Domain Name System (DNS) standard. Within your own local area network, DNS can also be used to match the computer name "Bob" to the IP address 192.168.0.5, for example.

Of course, with new web sites sprouting up all over the world every few minutes and IP addresses being changed frequently, it is unrealistic to think that your PC could maintain its own list of URLs and computer names matched to IP addresses (a DNS database). Instead, your PC can find out the IP address for a web site by asking a special server on the Internet called a DNS server.

The DNS server stores the DNS information for all web sites and hands out the correct, up-to-date information to anyone that asks for information about one of the DNS records. In fact, to improve performance, there are actually thousands of DNS servers all over the world, spreading the load between them and providing a more "local" service so that communication happens very quickly.


More than 99% of all Internet communication relies on DNS. This also applies to email and FTP communication as well as web traffic. Even an email address such as Fred@Microsoft.com will be associated with an IP address for the destination email server before the message can be delivered.

On a business network, there will usually be a server providing the DNS service for all local area network addresses. In other words, if your PC needs to get some information from a PC called "Bob", then it will ask the server on the network how to find "Bob". The server will give the IP address for "Bob" based on the information that it holds in its DNS database.

In a home network, the router will usually provide DNS functionality.
If your PC asks for an external IP address, e.g. for the web site www.microsoft.com, the internal network server or router will realise that that cannot be found in the local DNS database because it is not within the local network. It will, therefore, forward the request on to a DNS server on the Internet and, once it has been given the IP address, the local server will then pass that information back to your PC.

DHCP
So we now understand that an IP address has to be unique within a local area network. Every device has to be configured with its own individual address. In a home network, this isn't much of a hassle because there will only be a few devices that you need to set up with different addresses. However, on a business network, this can be a real hassle for the IT administrator. Imagine working for a company as big as Microsoft or Intel and having to make sure that every single device on the network gets a different IP address! How would Bill in the United States office know that Dave in the United Kingdom office was about to use the next available IP address for the PC that he had just added to the network?

On a medium to large business network, the only practical way to handle IP addressing is to have it managed automatically. This is where Dynamic Host Configuration Protocol (DHCP) saves the day! DHCP is a network service that automatically hands out an IP address to any device that joins the network. The information about the IP addresses handed out (the DHCP "leases") is stored in the DHCP database so that a DHCP server always knows which addresses are still available. Information about which addresses have been given out is usually passed to the DNS server so that the DNS database is also kept up-to-date.

The "chat" between PCs and DHCP / DNS servers
When a PC is set to automatically obtain an IP address and it is connected to a local area network (wirelessly or through a cable), it sends a broadcast around the network to look for a DHCP server. Once it has registered with the DHCP server, the server usually tells the PC where it can find a DNS server on the network.

In a home network, the conversation goes a little like this:

Client: "Hello, are there any DHCP servers out there?"
Router: "Yes, I'm a DHCP server. Would you like an address?"


(image courtesy of Ramzi Hashisho)

Client: "Yes please"
Router: "What's your name?"
Client: "My name is WorkstationXYZ"
Router: "OK, let me look in my cached records. Oh yes - I see that you have previously been 192.168.0.37. That address is still available. Would you like it again?"
Client: "Yes please"
Router: "OK, there you go. I'm now updating my DHCP database to say that I've given 192.168.0.37 to WorkstationXYZ and am renewing the DHCP lease for another x number of days. I'll make sure that no other device is given that address. I can also now advise you that you don't need to look around for a different DNS server on this network - you can use me for that as well. I'll update my DNS database so that, if anyone else looks for you as WorkstationXYZ, I'll tell them that you can be found at 192.168.0.37".
Client: "Great. Now I can find other computers and servers and they can find me. Thanks!".



Nathan Forrest - Future Systems ( Sussex )
http://www.futuresystems-sussex.co.uk





This article may not be copied or distributed in part or in full from this site and is copyright D24 Media Limited.

Comments
No comments have been submitted yet.
Comment on this Article

» Newsletter
Free Computer Tips

* required

*



Powered by VerticalResponse

All times are GMT +1. The time now is 12:40 PM.

Bottom Corner