SEARCH

How-To Geek

Geek School: Learning Windows 7 – Networking

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:

And stay tuned for the rest of the series all week long.

DHCP

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.
  • RequestWhen 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.

image

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.

Network Locations

image

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.

image

Troubleshooting Tools

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.

ping 192.168.0.254

image

Tracert

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.

tracert google.com

image

NSLookup

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.

image

IPConfig

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.

image

NetStat

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.

image

Homegroups

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.

image

In order create a Homegroup, you have to have your Network Location set to Home or you will get an error as shown below.

image

To change your network location, click on the What is a network location hyperlink and then change your network location to Home.

image

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.

image

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.

image

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.

image

Then enter the homegroup password.

image

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.

image

Homework

  • 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.

Taylor Gibb is a Microsoft MVP and all round geek, he loves everything from Windows 8 to Windows Server 2012 and even C# and PowerShell. You can also follow him on Google+

  • Published 03/13/13

Comments (5)

  1. steambc

    Don’t they make any kind of printer-friendly versions of these articles? I want to avoid the extra work of careful selecting, copying and pasting into a Word document and then printing.

  2. Ray

    If I’m not mistaken, Homegroup is not available on PC’s running WinXP.

  3. Ryan

    @Ray: Correct, Homegroup is not an option with XP. I can’t recall if it was on Vista (Vista pissed me off enough to move to a fully-linux environment until 7 came out).

  4. Ryan

    Update: Now that I think about it, Homegroup was NOT a Vista option. With Vista, you had to have a login password set on the local account, if you want to share across computers. This was for security, but was annoying to a LOT of users.

    Homegroup got around that by generating a sharing-only password on the share itself, so local users didn’t need it to merely turn on their computer.

  5. David

    I should give homegroup another try, it initially turned me off when I saw how it was trying to push the whole “library” concept on me. :P

Enter Your Email Here to Get Access for Free:

Go check your email!