Last time we looked at the theory behind IP addresses, subnet masks and name resolution, and we ended the installment with a practical guide on how to change your network settings. This time we take that knowledge and extend it by introducing things like DHCP, Network Locations, Ping and much more.
Be sure to check out the previous articles in this Geek School series on Windows 7:
- Introducing How-To Geek School
- Upgrades and Migrations
- Configuring Devices
- Managing Disks
- Managing Applications
- Managing Internet Explorer
- IP Addressing Fundamentals
And stay tuned for the rest of the series all week long.
The Dynamic Host Configuration Protocol is used to assign IP addresses to devices on the fly, as opposed to setting the IP address of the device manually like we did in the last article. In fact, you probably use DHCP all the time but just aren’t aware of it, for example when you take your laptop to a coffee shop that has free Wi-Fi. DHCP is useful in many scenarios. Let’s take a look at a few.
- With the number of mobile devices we use on the rise, we find ourselves constantly needing to connect to different networks. For example, you need to connect your phone to your Wi-Fi at home and to the Wi-Fi at work. Without DHCP we would have to change the IP address on our phone every time we got home, or to work.
- Large companies can benefit from DHCP. Can you imagine having to go around and set 1500 IP addresses, only to have the Network and Communication team come to inform you that because of a bad design decision you need to change the IP addresses on all those work stations?
DHCP uses a four step process, commonly known as DORA, to assign an IP address.
- Discover – When you connect a DHCP enabled device to the network, it broadcasts a message to all nodes on the network (technically this is called a DHCPDiscover packet), asking if any one on the network is a DHCP server.
- Offer – If a DHCP Server receives the DHCPDiscover packet, it looks in its scope (a fancy name for the list of addresses that it is allowed to give to devices) for an available address which it then in turn sends back to the requester in a DHCPOffer packet.
- Request – When your device receives the DHCPOffer packet it sends a message back to the DHCP server requesting the offered address.
- Acknowledge – The DHCP server then give your client the go ahead to use the IP address using a DHCPAck packet.
Setting up a DHCP server is beyond the scope of this series, but in order to make sure that your clients are configured to use DHCP, open the properties of your network card and confirm that it is set to obtain an IP address automatically.
APIPA (Automatic Private IP Addressing)
A Windows 7 computer that is configured to use DHCP can automatically assign itself an IP address if a DHCP server is not available. For example, this could occur on a network without a DHCP server or on a network if a DHCP server is temporarily down for maintenance.
The Internet Assigned Numbers Authority has reserved 169.254.0.0-169.254.255.255 for Automatic Private IP Addressing. As a result, APIPA provides an address that is guaranteed not to conflict with any devices on your network.
After the network adapter has been assigned an IP address, the computer can communicate with any other computer that is connected to the same networks and that is also configured for APIPA. When troubleshooting, if a DHCP enabled computer has an APIPA address it is often a sign that it can’t connect to the DHCP server.
The first time that you connect to a network, you must assign it a network location. This allows you to maintain different Firewall profiles and network settings for different networks. For example, you may want to be able to discover devices on your home network but you certainly don’t want to be able to discover devices connected to the Wi-Fi at McDonald’s.
There are four network locations:
- Home Network – Assign this profile to a network when you know and trust the people and devices on the network. Network discovery is turned on for home networks, which allows you to see other computers and devices on the network and allows other network users to see your computer.
- Work Network – Assign this profile to small office networks. Network discovery is turned on for Work Networks by default.
- Public Network – Assign this profile to a network that you might connect to in a public place such as an internet cafe or an airports. Network discovery is turned off by default.
- Domain Network – This is the only network profile that you can’t assign to a network. It is automatically assigned to you when you join an Active Directory domain.
Below you can see the Windows Firewall with Advanced Security MMC console, which shows you that there is a different Firewall profile for each network location.
Most of our time is spent troubleshooting problems on existing network infrastructure rather than setting up new networks. The following are the command line tools you will need to get acquainted with in order to troubleshoot network connectivity effectively.
PING (Packet InterNet Groper)
If there is one tool you need to remember from this troubleshooting section, its PING. The PING utility uses ICMP echo requests to test connectivity between you and another node on the network. The syntax of the command is simply ping followed by the IP address or hostname of the node you want to test connectivity to.
We use tracert, pronounced trace root, to track network traffic as it traverses the network. It is useful for determining where the point of failure in a network lies. The syntax of the command is is simply tracert followed by the IP address or hostname of the node you want connect to.
The NSLookup command queries a DNS server for machine name and address information. To use NSLookup type nslookup followed by a host name or IP address.
When used alone, IPConfig tells you basic information about your network interfaces, such as their IP address and subnet mask. However, there are a few hidden gems.
- Using IPConfig with the /all switch shows you verbose information about your network interfaces.
- Using IPConfig with the /release switch forces your network card to release its IP address, you would then use IPConfig with the /renew switch to request a new IP from the DHCP server.
Netstat is used to view port information on your machine. For example, you can see if there is any application listening on a specific port. Whenever I have had to use NetStat, I have found it useful to use the –ano switch.
One of the cool new features in Windows 7 is the Homegroup feature that allows easy sharing of files between machines. Today we take a look at how to add a new Windows 7 machine to an existing Homegroup. To start using the Homegroup feature we need to create one first. On the the computer that is going to be hosting the Homegroup type homegroup into the search box in the Start Menu and hit Enter.
In order create a Homegroup, you have to have your Network Location set to Home or you will get an error as shown below.
To change your network location, click on the What is a network location hyperlink and then change your network location to Home.
When the configuration is complete you will be asked what you want to share with other people in the Homegroup. Select what you want to share as needed.
Once the Homegroup has been created you will be given a password. Write this down in a safe place as you will need to enter it on the other machines for them to be able to join your Homegroup.
Now head over to the PC you want to join to the Homegroup and again type Homegroup into the Start Menu. This time click on the Join button.
Then enter the homegroup password.
That’s all there is to it. You now have two computers linked together via a Homegroup. To view member of the group and what they are sharing, open explorer and select Homegroup on the left hand side.
- The only void, in terms of network, left to fill is IPv6. So hit up Wikipedia and find out how if differs from the IPv4 information we covered in the last lesson.
If you have any questions you can tweet me @taybgibb, or just leave a comment.
- › Geek School: Learning Windows 7 – Wireless Networking
- › Geek School: Learning Windows 7 – Remote Administration
- › Geek School: Learning Windows 7 – Windows Firewall
- › Geek School: Learning Windows 7 – Remote Access
- › Geek School: Learning Windows 7 – Backup and Recovery
- › Geek School: Learning Windows 7 – Resource Access
- › Geek School: Learning Windows 7 – Monitoring, Performance and Keeping Windows Up To Date
- › Stop Shutting Down Your Windows PC