Logo

Static vs DHCP – CompTIA A+ 220-1101 – 5.8

<a class=”wp-block-button__link”Download PowerPoint
Show lesson content
Static vs DHCP – CompTIA A+ 220-1101 – 5.8
Let’s look at static and automatic IP addresses using DHCP.

Static vs Dynamic
Static configuration is when the administrator manually configures the network settings. Dynamic is when the network settings are automatically downloaded to the device. Static configuration needs to be reconfigured when the network changes. This makes it problematic with devices like laptops when they move between networks since each time, they will need the networking manually changed for each network.

Dynamic, in contrast, will detect the network has changed and request configuration for that network. Static networking will require the network administrator to keep records of each IP address that has been allocated on the network. Dynamic allows for centralized management of IP addresses; thus, the administrator is not required to keep records of which IP addresses are allocated.

Although you can use static or dynamic however you wish, generally static configuration is used for dedicated devices, for example, routers, switches, printers, or servers. As these devices don’t generally change networks and always use the same IP addresses, they are often statically assigned.

Dynamic IP addresses are generally used for users and their devices. Generally, these devices make up the majority of your network. Dynamic allows you to allocate IP addresses and deallocate them to be used with other devices when they are no longer required.

To start with, I will look at dynamic allocation.

DHCP
Dynamic Host Configuration Protocol or DHCP is the protocol that automatically configures networking for our devices. To use it, your operating system or device needs to be configured to automatically obtain network configuration, which is generally the default nowadays. In most cases, you just need to plug in your device or connect it to a wireless point, and DHCP will do the rest.

In this video, I will only have a quick look at DHCP; later in the course, I will look at DHCP in more detail. DHCP will allocate an IP address, subnet mask, default gateway, and DNS servers. These are the basic options that most administrators will configure. There are other options that can be configured. For example, you could configure proxy servers, boot from network options, plus a lot of different options. Generally, these types of options are configured on enterprise networks. Home DHCP devices generally don’t have these extra options since a home user generally does not use them. Let’s have a look at a home router and see what kind of DHCP server it implements.

Demonstration Router
In this demonstration, I will connect to a home router to have a look at how DHCP is set up. To start with, I need to get the IP address of the router. To do this, I will open the start menu and open a command prompt.

I will next run the command IPConfig. The information that I am interested in is the default gateway address. This is the IP address of my home router. I will next open my Edge browser. Once open, I will enter the IP address of the default gateway. This will take me to the login screen of the home router.

You will notice the address will change to the DNS address for the home router. Depending on which router you have, you may have a simple DNS name that you can use to access the router. This will change depending on which router you are using.

In this example, I have connected using HTTP rather than secure HTTP. Modern routers should support HTTPS, thus it is recommended to connect to the router using this to prevent eavesdropping on the communication. In this case, I am working on a test network, so I am not concerned about eavesdropping.

I will next enter the username and password to access the router. If you don’t know what this is and have never changed it, refer to the documentation supplied with the router for the default password. In some cases, the default password and username may be printed on a sticker on the router.

Once logged in, for this router, you will notice the WAN IP address at the top. On your router, the information may be in different locations. Essentially, what occurs is the router will allocate IP addresses to clients which will share this IP address.

To see more information about the DHCP configuration, I will select the option “LAN.” On this screen, you will notice the IP address of the router. Usually, you would not change this unless you had another device on the same network using the same IP address.

There are a lot of settings that can be configured. The ones that I am interested in are under the tab “DHCP Server.” Notice that there is a start and end address for an IP pool. This defines a pool of IP addresses that will be allocated to devices on the network.

There are some other options that can be configured on this screen. For example, you could configure a DNS server. If no DNS server is configured, the router will configure the devices with the DNS server that was provided by the ISP.

Now that we have had a look at how DHCP is configured on a router, let’s have a look at what happens when there is no DHCP server on the network, but the computer is still configured to get network configuration from the network.

Automatic Private IP Addressing (APIPA)
When no DHCP server is available on the network, some operating systems and devices will automatically assign the device an IP address. When this occurs, the IP address will be allocated from the range of 169.254.0.0 other than the first and last IP addresses, which are reserved. These addresses will only be assigned when no DHCP server is present or not providing IP addresses. The addresses are valid on the local subnet only and thus do not support routing.

On Windows, these addresses are called Automatic Private IP Addressing or APIPA. Other vendors call it Link-local addresses. If the device does not support it, the IP address will generally be set to all zeros.

To see the configuration on Windows for a network adapter, go to the search option and enter “network.” Select “View network connections” when it appears. This will show all the network adapters on the computer. On this computer, there is only one.

To see the properties of the network adapter, I just need to click the properties button. The properties screen will show the protocols and services that are bound to that network adapter. In this case, I am interested in “Internet Protocol Version 4.” Once selected, I will press the properties button to see the configuration.

You will notice that the IP address is set to automatically obtain, as is the DNS server. Currently, there is no DHCP server on the network, so I will next have a look at the current IP configuration of this computer.

To do this, I will do a search for command prompt and open a command prompt. Once the command prompt is open, to see the current network configuration, I will run the command IPConfig. This will show the current network configuration.

You will notice the current IP address starts with 169.254. Modern networks will generally always use DHCP. As soon as you see this address, you know that something has gone wrong. Even if the DHCP server is working, you will still get this IP address if the DHCP server is not able to allocate an IP address. For example, if the DHCP server has run out of IP addresses to allocate.

If you forget this IP address, notice also the subnet mask that is used. That is 255.255.0.0. A subnet mask this size rarely gets used for computer networks. Thus, when you see this subnet, think to yourself, could this be an APIPA address.

The last big hint that this is an APIPA address is that there is no IPv4 default gateway address. There is an IPv6 address which I will cover in the IPv6 video for this course, however you will notice the missing IPv4 default gateway address. So, don’t get fooled, when you see an IP address, that the DHCP server is working. Make sure the IP address is a valid IP address and not an APIPA address.

You may attend a helpdesk call with this problem. Usually, a reboot will fix the problem, but if this does not, the problem is most likely the DHCP server or a cabling problem. In this case I have fixed the DHCP server. To get the computer to request an IP address I will run the command IPConfig /renew.

Running this command will force the computer to contact the DHCP server and attempt to get an IP address. You will notice that the computer will now obtain an IP address and other network configuration allowing it to communicate on the network.

End Screen
That concludes this video on DHCP. In later videos I will have a close look at the inner workings of DHCP. I hope to see you in those videos. Until the next video, I would like to thank you for watching.

References
“The Official CompTIA A+ Core Study Guide (Exam 220-1101)” pages 177 to 179

Credits
Trainer: Austin Mason http://ITFreeTraining.com
Voice Talent: HP Lewis http://hplewis.com
Quality Assurance: Brett Batson http://www.pbb-proofreading.uk

Back to: CompTIA A+ 220-1101 and 220-1102 > Configuring Network Addressing and Internet Connections