If you use a broadband connection to the Internet, you'll probably have a switch/router appliance connecting your small LAN to the cable or DSL modem. These inexpensive devices allow your LAN to share a single Internet connection (that is, a single IP address) on the Internet, while providing for separate addresses for each computer on the LAN. DHCP (the Dynamic Host Configuration Protocol) allows the router/switch to automatically configure your computer with the network addressing information it needs when it boots up. When you add a new computer to the LAN, you need to be sure that it's configured to use DHCP. Otherwise , if you've configured a static address on the computer, you need to be sure that the following are true:
You can check your computer configuration easily. For Windows 2000, for example, follow these steps to configure your computer to use DHCP:
Another possible cause of the problem is that you are using an address that is not in the same network or subnet as the other computers. It doesn't matter if all the cables are connected to the hub or switch and each computer's network card if you have misconfigured IP addresses or subnet masks. For example, a computer with an IP address of 10.10.10.1 is not going to talk to a computer with an address of 140.176.222.1, no matter how long you try, unless you go through a router that has been configured to pass this information. The network adapter card detects the data you try to send back and forth, but because the protocol stack knows that it's destined for a different network, those packets are ignored and never passed up to the Application level. Figure 54.3 shows an example of using a switch/router to connect to the Internet through a cable or DSL modem. Figure 54.3. Connect to the Internet using a cable or DSL modem and a router/switch. Note that the IP address for Computer C is not valid on the LAN and can't pass through the switch/router.
In this example, the Internet service provider (ISP) has assigned an IP address to your connection (140.176.200.123). Because you have more than one computer, you went to the local computer store and bought a small switch/router designed to work with broadband connections. Note that the switch/router is plugged into the broadband modem using one port, and plugged into your LAN using another port. To keep track of both connections, the switch/router uses a different address on the port that connects to your LAN. In this example, the IP address is 10.10.10.1. The switch/router uses the address range of 10.10.10.0 through 10.10.10.254 to allocate IP addresses to computers on the LAN. This means that Computer C has an invalid address, which was configured as a static address. Yet, when computer A (10.10.10.2) on your network wants to send or receive data to or from the Internet, the switch/router knows that the IP address of the Internet server is different from the LAN address (the 10.10.10.0 address space). Thus, Computer A knows that it must send the data packet to the default gateway, which is the switch/router (10.10.10.1). When the switch/router receives the data packet, it substitutes its own valid Internet address (140.176.200.123) in the packet header and sends it to the Internet through the broadband modem. When a response is received back from the Internet connection, the switch/router removes the 140.176.200.123 address from the packet header and puts Computer A's address (10.10.10.2) in the header so that it can be delivered to Computer A. The important thing to keep in mind here is that addresses used inside the network are not valid on the Internet. The switch/router must use sleight of hand to act as a "man in the middle" for you so that, although you have multiple computers on your LAN, the switch/router makes the cable or DSL modem think you have only one. The switch/router keeps track of which computer on the LAN sends out requests and makes sure that packets are routed back to the correct computer.
When Computer A wants to talk to Computer B, it compares the address of Computer B (10.10.10.3) with its own address. Because the address falls in the same network address space, it doesn't send the packet to the default gateway. Instead, it just broadcasts a packet on the LAN knowing that Computer B will see the packet and pick it up. So far, everything is working as it's supposed to. However, let's suppose you just brought a computer from work to your home office (Computer C) and plugged it into your network. At work, the computer had been configured with a static address of 123.111.221.43. When you try to send or receive data from Computer C, nothing happens because of the following:
The point is that if your switch/router allows for DHCP and you set up each computer to use DHCP, things should work just as you expect. If you try to mix and match computers with different subnets on the same LAN, you're going to have trouble.
|