Lots of people get confused by things like DHCP, IP addresses, Subnets, DNS and all the other jargon related to networks. So what is it all about?
Every device on your LAN (Local Area Network) has an internal IP address. These typically start 192.168.x.x. IP addresses starting 192 are called Class C networks and normally have up to 254 devices in them. So you could have 192.168.1.1-254 or 192.168.0.1-254 or 192.168.200.1-254 etc. In other words the third octet (set of three numbers)can be anything between 1 and 254 but all the devices on your LAN will have the same third octet. What will differ is the fourth octet. This must be unique for every device on the network. Class C networks all start with 192. If you have more than 256 devices on your LAN, you may want to have a class B address. These start with 172 and you can have anything within the third and fourth octet. If you need a really big network, you can use a class A. These start with 10. and you can use anything in the second, third or fourth octet.
Class A 10.0.0.0 – 10.255.255.255 Up to16,777,214 addresses
Class B 172.16.0.0 – 172.31.255.255 Up to 65,534 addresses
Class C 192.168.0.0 – 192.168.255.255. Upto 254 addresses
The subnet mast sets out the size of the network, so the device knows what to do. For example, if you have a PC with IP address 192.168.1.10 and a subnet mask of 255.255.255.0, this means that the network range is 192.168.1.1-254. If you typed in 192.168.0.10, your device would immediately know it is not destined for your LAN and it would send the request on to the Gateway (router). The Gateway would then look at its own routing tables to see what to do with it. If it can see that it also handles 192.168.0.X IP addresses, it will pass it on to the relevant device. If not, it will pass it on to the Gateway it was given for the iSP.
This is normally just the IP address of the router. If you make a request for an IP address which is outside your LAN (as determined by the subnet mask), it is sent to the gateway.
The Domain Name System (DNS) is the way of translating between IP addresses (which computers speak and understand) and Domain names, such as www.bbc.co.uk, which people find easier to remember. When you type in www.bbc.co.uk, your computer will do a DNS lookup from the DNS servers it got from the router. If you have not changed these on your PC, they will often be the same as the router. The router will then have DNS servers which are those belonging to your ISP. ISP DNS servers can be annoying because they try to be helpful and you keep seeing pages such as BTs unknot DNS pages. They can also cause other network issues. The easiest to remember custom DNS servers are these belonging to google. These are 18.104.22.168 and a 22.214.171.124 (the second is a backup, incase the main one fails).
So what is DHCP? Dynamic Host Control Protocol is the process of the router handing out IP addresses. When a device joins a network, it will send out a broadcast, asking for an IP address. The router will respond with an IP, subnet mask, gateway and DNS servers. You can, if you know what you are doing, statically assign this information. This means your device will not ask for this information, you will have already have put it in. However, be aware that this information must be unique. If two devices on the same network have the same IP details, things will not work properly.
If you wish to set a static IP address, it is very important that this is out of the range of IP addresses the router hands out. You must go into the router's settings and look for the IP range.
I normally set the range to start from 192.168.1.10 and go to 192.168.1.169. I then know I can statically assign IP below 10 or above 170.
Some equipment does not allow you to set static IPs. What you can do is IP address reservation.
This is where you tell the router to always assign the same DHCP address to a particular device, based Upton its MAC address (unique network serial number).
We have already explained DHCP for your local area network. Your ISP will normally give you a DHCP based IP address for your router's public interface. This means every day or so, your IP will change. You may be able to request a static IP address but if not, there is an alternative, DynDNS. With DynDNS, you register for a free account at www.dyn.com and a free host name, such as xyzzy.mydns.com. You then put your Username, Password and host nae into the DYN settings on your router. When your IP address changes, your router updates xyzzy.mydns.com (or whatever you called it) with the new IP address. This means xyzzy.mydns.com will always point at your router's IP address. You can then set up a server behind your router and publish your own blog, web site etc.
Network Address Translation is the process you use to open services on your private network up to the World Wide Web. Say you have a web server running on a PC on your LAN. The webserver is on a static IP address of 192.168.1.10. Web sites normally run on port 80. So to get your web server visible, you need to go on to the NAT settings and set the following:
Incoming connections to port 80 -> Port 80 on 192.168.1.10
To see you website, you would now go to: xyzzy.mydns.com