Network Management Tutorial

 
Ok, you brought your first router home a few months ago, plugged it into your cable or DSL modem, and plugged all the PC's in the house into it, and voila! Shared broadband connection.
 
Now, however, time has passed, more PC's have appeared, you've added a hub or switch or two, the cable company installed a new modem, you added a WiFi router so you can surf with your laptop while sitting on the back porch, your kid plugged in an XBox, you assigned a static IP address to one of your PC's so you can host games on it...and now everything is all screwed up.
 
Now you need to understand a little more about what's going on in your network so you can figure out what the heck is wrong with it.
 
Here's a little discussion of some of the various aspects of managing a home or small office network.
 
Basic network layout
Routers vs. hubs and switches
Why can't I have more than one router?
What's a packet?
What's an IP address?
Dynamic IP address assignment
Static IP address assignment
IP address ranges
Logging into your router
The router's local vs. Internet IP addresses
IP scanner
Uplink port on hubs
 
Part 2
Part 3

For a more detailed discussion of IP addresses and static and dynamic IP address assignment, plus a discussion of MAC addresses, domain names, and DHCP and DNS servers, see Part 2.

For a discussion and troubleshooting of a problem with a computer on a LAN that can't get to the Internet, see Part 3. This also describes step by step how to get to the popup in XP in which you can let your router assign an IP address to a computer automatically, or manually assign it a static IP yourself.

Basic network layout

If you're like most people who have two or more PC's sharing a broadband internet connection, you'll have a network that looks something like this:

Internet
|
modem
|
router
| | |
| |  ---PC
| |
|  ---PC
|
hub
| |
|  ---XBox
|
PC

The cable or DSL modem is just like the old dialup modems, except that it operates at much higher speeds. Its job is to modulate, or translate, the analog signals from your ISP (carried via cable or DSL) into digital signals your LAN can understand, and vice versa.

Although it's pretty fancy internally, in networking terms the modem is a pretty dumb device. All it does is this translation from one type of signal to another.

It's when we get to the router that things get interesting.

Routers vs hubs and switches

Don't confuse routers and gateways with hubs and switches. They look similar, and they all have a bunch of CAT5 ports on the back, but they are not the same thing.

Hubs are dumb devices that just allow you to hook several PC's or other devices to your router. All they do is take any traffic they see coming in from any PC to one of their ports and repeat it onto all their other ports, so everyone else can look at it and see if it's for them.

Switches (really these should be called "switching hubs") are the same as a hub except they are slightly smarter and as a result can be faster. They look inside the packets of incoming traffic, find the IP address of the destination PC, and repeat that packet only on the port to which the destination PC is connected. This reduces network traffic, making data transmission faster if there are several PC's talking at once.

On the other hand, routers (aka gateways) are smart devices which monitor the traffic on your network and decide which traffic needs to get forwarded along to the Internet. When your router sees something that has to go to the Internet, and then sends it out through its Internet port (aka WAN port) to your ISP, which in turn forwards it along to the destination.

A router also monitors traffic coming in from the Internet and routes the incoming packets to the appropriate PC on your LAN. Hence the name "router".

Note that when your router forwards a packet from a PC on your LAN to somewhere out on the Internet, it diddles with some stuff inside the packet. It'll use this extra data later when a response comes back to determine which PC on your LAN should receive the incoming packet. This is called Network Address Translation; routers that do this are called NAT routers.

Routers (and gateways) also have the ability to assign an IP address to each computer on your network. This is an essential function, because each PC (or other device, like a VoIP telephone adapter or a network printer) has to have a unique IP address so the router can route its traffic to it.

Why can't I have more than one router?

Recently someone I know plugged a Residential Gateway into his cable modem, and then plugged a router into the gateway. I wasn't surprised when he told me it didn't work. Unless you are willing to jump through some hoops, you want only one router (or gateway) in your network. But you can have many switches or hubs.

Think of it this way: your LAN is a classroom, the router is the teacher, and the PC's are the students.

You only want one teacher in the room.

The teacher makes the tests and assigns them to the students, one for each student. She writes the name of a student on each test, and passes them out.

Some of the students in the front row - the teacher's pets - each take a stack of tests and pass them out to the other students behind them. (These are like hubs; see below.)

If you get two teachers (routers) in the room, each writing names on tests and passing them out, you get a mess. Some people get two tests, others get none. Everybody's confused.

So when you're building a network, just have one teacher in the room.

What's a packet?

All data that travels around on networks (including your LAN and the Internet) is grouped together into batches of characters called a packet.

Each packet has a section called the header, which contains information like the IP address of the sending PC, the IP address of the destination PC, and a bunch of other stuff that routers use to get the packet to the right place.

The packet also has a data section, which contains the contents of an email you just sent out or the page you just requested from Google or whatever else is getting sent along.

Think of a packet as an envelope (the header) and its contents (the data).

What's an IP address?

Every computer, gaming box, VoIP adapter, network printer, and other networked device on your LAN has to have a unique IP address so other devices, including the router, can talk to it.

An IP address consists of four groups of numbers, separated by periods (aka dots). Here are a couple of examples:

192.168.1.1
209.198.87.24

Note that each group of numbers must be between 0 and 255.

On any network, somehow each device has to be assigned an IP address, either dynamically (by some outside entity whenever the device is booted) or statically (by you).

These days the standard method is dynamic assignment; only in special cases do you need to assign a static address.

For a more detailed discussion of IP addresses and static and dynamic IP address assignment, plus a discussion of MAC addresses, domain names, and DHCP and DNS servers, see Part 2.

Dynamic IP address assignment

Here's the way dynamic IP assignments work:

1. The router has a program inside it called the DHCP server. Any time the router is turned on, the DHCP server sits there waiting for any requests for an IP address assignment coming in from any of its LAN ports. It has designated a range of addresses, usually 192.168.1.100 through 192.168.1.150 or something like that, for use for this task.

2. When you boot a PC (or other device like a VoIP telephone adapter), it wakes up and sends out a message across the LAN saying "is there a DHCP server out there that can give me an IP address?"

3. The DHCP server inside the router, which is monitoring all LAN traffic, sees this message, looks in its list of available addresses, and picks one that isn't in use. It sends a message back to the PC saying, "ok, here's your new IP address, and by the way, here's the address of your gateway to the Internet." And it includes the IP address it's chosen for that PC and marks it as used in its list of available addresses. It also includes its own address as the PC's gateway to the Internet.

4. The PC stashes this information into its network connection info and happily goes to work.

For a more detailed discussion of IP addresses and static and dynamic IP address assignment, plus a discussion of MAC addresses, domain names, and DHCP and DNS servers, see Part 2.

Static IP address assignment

Note that you can also statically assign an IP address to any given computer.

Normally the only reason you should have to statically assign an IP address is to a computer acting as some sort of server (gaming, racing, FTP, HTTP, etc.) to the outside world, so you can direct incoming requests through certain ports to that particular computer's IP address. If you're not running any servers, you should be able to set up all your PC's to use dynamically assigned IP addresses.

If you do have to assign a static IP address to one or more computers, you don't want to statically assign any computers or other devices to any number within the range used by the DHCP server for its dynamic assignments. This is what leads to IP address conflicts.

So either change all the computers to use dynamic IP addresses, or log into the router and look at its range for dynamic addresses, and make sure none of your static addresses are in this range.

If you do use any static IP addresses, please please please create a hard copy with this info:

  1. The local IP address of your router.
  2. The administrator user ID (if applicable) and the password for the router.
  3. The range used by the router's DHCP server for dynamic IP address assignments.
  4. A list of all static IP address assignments.

A notebook containing a diagram of your network topology, router IP address, user ID and password, and other passwords, etc, is a really good idea in any case.

For a more detailed discussion of IP addresses and static and dynamic IP address assignment, plus a discussion of MAC addresses, domain names, and DHCP and DNS servers, see Part 2.

IP address ranges

Don't get tripped up by the fact that different routers use different non-routable ranges for their IP addresses. Also, different routers reserve different ranges within their main range for use by their DHCP server for dynamic address assignments.

Whatever range your router uses, every device on your network has to have the same three first number groupings (unless you want to jump through a bunch of hoops).

For instance, if your router's local address is 192.168.1.1, all of the other devices on your network must have addresses that begin with 192.168.1, and they must each have a unique last digit.

You can tell what local address and range for DHCP assignments your router uses by logging into it and poking around until you find the page that shows its DHCP server Starting Address and Ending Address. There will also be a page which shows the router's own LAN (aka local) IP address.

For example, most Linksys routers use 192.168.1.1 for their own local address, and they reserve the range of 192.168.1.100 through 192.168.1.149 for assignment to local PCs by its DHCP server.

But a D-Link DI-604 router uses 192.168.0.1 for its local address, and reserves the range 192.168.0.100 through 192.168.0.199 for its DHCP assignments.

Some newer Linksys routers use 192.168.15.1 for their local address. Others may use an entirely different range, usually 10.10.10.1.

Logging into your router

If you're not sure how to log into your router, look on the bottom of it or in the manual. There should be a default IP address (see above) and a default password, along with (in some cases) a default user ID.

It's really, really important and useful to be able to log into your router, so please please please try to do this. If you can't do it for some reason, then maybe you should consider resetting the router to its factory defaults (usually by holding down the Reset button for 30 seconds or so).

Also, if you can't find the router's manual, look online. All the major router manufacturers post their manuals in PDF form.

The router's local vs. Internet IP addresses

Another thing: when you are poking around inside the router (once you've logged into it), be sure to differentiate mentally between the LAN settings and the Internet or WAN settings.

Remember that each PC on your network has to ask your router's DHCP server for an IP address. Just like this, the router, on its WAN/Internet side, has to ask your ISP (Roadrunner, Verizon, Comcast, PacBell, etc.) for an external or Internet IP address for itself. This will be an external, aka "routable", IP address, not something starting with 192.168...

So your router will actually have two IP addresses:

  1. An external/Internet IP address that applies to the WAN port (connected to the cable or DSL modem) and
  2. An internal or LAN IP address, probably 192.168.1.1 if it's made by Linksys, or 192.168.0.1 if it's made by D-Link or Netgear.

It's the LAN IP address that you use to log into the router.

IP Scanner

Here is a little program that you can use to scan your LAN to see all the devices that are on it, and what their IP address assignments are. It's pretty cool.

Poking around with this might help you get a better idea of what's going on around your LAN, in terms of IP address assignments.

Uplink port on hubs

This deals with a simple issue involving around wiring. A CAT5 cable has four pairs, of which Ethernet only uses two. One pair is Transmit (TX) and the other is Receive (RX).

The ports in a PC are wired opposite to those in a hub; the pins that are TX in the PC are RX in the hub, and vice versa.

That way, when you plug one end of a cable into a PC and the other into a port on a hub, the pairs are matched properly; that is, the RX pair on the PC end is connected to the TX pair on the hub end, and the TX pair on the PC end goes to the RX pair on the hub end.

However, when you want to cascade one hub from another, you have to plug a cable between a port on one hub and a port on the other. This means you would wind up with the TX pair on one hub connected to the TX pair on the other hub, and the RX pairs connected as well. No workee.

That's the reason for the Uplink port (or a switch that changes one port's function between normal LAN and Uplink). An Uplink port is simply wired opposite to a normal LAN port in a hub.

So if you connect the Uplink port in one hub to a normal LAN port in another hub, you get TX to RX and RX to TX. Now she workee fine.

Note that the LAN ports in a router work the same way as those in a hub. Actually, the LAN ports in a router are really just a (hub or switching hub) built into the same box with the router.

Also note that some newer hubs and switches have "auto-sensing" ports, which automatically sense the way the port on the other end of the cable is wired, and reconfigure themselves as necessary to match. If you've got one of these, you don't need to worry about plugging into an Uplink port or setting an Uplink switch.