Learn Where IP Addresses Come From
The core requirement of any IP-based network is that all computers on the network have a unique IP address. If a PC doesn’t have an IP address, the IP protocol has no way to ship packets to that PC. There are only three ways for a PC to get an IP address:
· You can give it one manually. This is usually unnecessary.
· The PC can request an IP address from a configuration server somewhere on the network.
· If there is no configuration server on the network, Windows can give itself an IP address.
One way or another, each PC must obtain an IP address or your network is dead in its tracks.
Requesting an IP address from a DHCP Server
Windows can tell when there’s a network cable plugged into its network port and whether other PCs are connected to that cable. When it finds a connection to other PCs (via cable or some other physical link), Windows looks for a special server called a Dynamic Host Configuration Protocol (DHCP) server. Most networks have a DHCP server somewhere. It can be on one of the PCs in the network, or it can be inside a router connected to that network. When your PC connects to the Internet, via dial-up or broadband, your Internet service provider’s network has a DHCP server, and that DHCP server is what answers Windows’s call.
In response to that call, the DHCP server sends back an IP address known to be available and not a duplicate of one belonging to any other PC on the network. It sends a few other things back as well, things that Windows needs to configure itself for networking, but the IP address is the most important item Windows receives from a DHCP server.
Getting an IP Address from APIPA
If Windows calls out to the nearest DHCP server and no DHCP server responds, it waits for awhile to be sure, and then it invokes a subsystem called Automatic Private IP Addressing (APIPA). APIPA chooses an IP address from a block of IP addresses set aside for Windows to use when no DHCP server is available. An address generated by APIPA will always look like this: 169.254.x.x, where the xs represent a number from 0 to 255. (There are a couple of excluded values.) Remember that APIPA will not kick into play unless Windows detects a cable connected to its network port with at least one PC accessible through the cable. A lone PC connected to nothing will not trigger APIPA.
One way or another, when Windows detects that it’s connected to at least one other PC via a physical link of some kind, it will obtain an IP address, and then it’s ready to rock.