NET 101 - Networking Essentials I

Chapter 6, Inside Computers and Mobile Devices

Objectives:

This lesson discusses programs and applications, categories that classify them, and features found in most items in major categories. Objectives important to this lesson:

  1. Motherboards
  2. Processors
  3. Data representation
  4. Memory
  5. Adapters
  6. Bus types
  7. Power


    Concepts related to Student Learning Objectives
  8. IP addresses
  9. Private addresses
  10. Subnets
  11. DHCP
Concepts:

The next item in the text is this chapter's overview of internal hardware components. The picture on page 250 shows a lot of components, but it does not show where they actually fit in this exploded view of a computer. It does, however, present the reader with some idea about the inside of a computer: lots of components with cables. You should become familiar with this list of common components:

  • A system board (motherboard) which has sockets for the CPU, memory, and other plugable components
  • A floppy drive, hard drive, or CD-ROM (or CD-R, or CD-RW) drive
  • A power supply with power cables that connect to internal components
  • Circuit boards used by the CPU to communicate with devices, and slots for additional circuit boards
  • Cables connecting devices to circuit boards and the system board

A discussion of the Central Processing Unit (CPU) begins on page 252. Features of CPUs that are used to rate and compare them:

  • Bus speeds supported by the processor - you might expect 400, 533, 800, or 1066 MHz
  • CPU speed - measured in megahertz (MHz) or gigahertz (GHz). (Mega means million, giga means billion. Hertz means cycles per second.)
  • Word size (internal data path size) - 16 bits to 64 bits, the number of bits that can be processed at once. Most processors are 32 bit or 64 bit processors, older ones were 8 or 16 bit.
  • Data path (external data path) - 8 to 64 bits (currently), the number of bits that can be sent to the CPU at once. The data path size and word size are not necessarily the same.
  • Multiprocessing ability - can it do more than one task at a time? It must have two or more Arithmetic Logic Units (ALUs) to do so.

CPU cooling fans are an important part of the computer. It should be remembered that air flow through a computer will be disrupted if openings are made in the case that are not intended to be open. A user might remove a plate on the back or side of a computer, intending to install an expansion card whose ports would be accessed through the new opening. If the user never installs the card and never replaces the cover plate, the new hole in the case will cause air to flow in unintended directions, ineffectively cooling (or not cooling) various components. Other optional cooling equipment:

  • heat sink- usually a metal structure that is glued to the top of the processor, often featuring fins that act like heat radiators when air is blown across them
  • peltier - an electrical device that is meant to cool the top of a processor; it can be as hot as 500 degrees F on its top and as cool as 45 degrees on the side touching the processor. This introduces the potential problem of condensation inside the computer, and a fire hazard if the peltier itself is not cooled.
  • refrigeration - small refrigeration compressors are sometimes used
  • water cooling - a small water pump moves water through tubes that run across the processor

The real world is sometimes digital, but more often analog. To understand the difference, consider the difference between a light with an on/off switch and a light with a dimmer switch. Think of the standard on/off switch as a digital switch, because it has only two states (on and off) and has to be in one state or the other. Think of the light with a dimmer switch as analog, because it has many possible states, ranging from off through dim to very bright. Data in a computer system is held in binary digits, ones and zeros. You can think of these digits as switches that are either on (holding a one) or off (holding a zero). Since people tend to shorten phrases that they use a lot, computer people shorten the phrase binary digit to bit.

Since a bit is not complex enough to represent more than two things (on and off), sequences of bits are used to represent characters. You are familiar with this idea already. How many things could we discuss if we only had two symbols to stand for them? We use 26 letters in English (and more or fewer letters in other languages) to make words. We use sequences to make more complex symbols.

Two code systems that use bit patterns (sequences) to represent data are: ASCII, which is used on most PCs, and EBCDIC, which has been used mostly on IBM mainframes. The two systems are different, but they serve the same purpose: characters are assigned unique bit patterns, and those bit patterns are used by a computer to represent the characters in memory. In most cases, a character is represented by eight bits. We refer to a sequence of eight bits as a byte. (More details in the added value section below.)

The chapter continues with a section about physical memory in a computer:

  • RAM - Random Access Memory, which is temporary, but can be written to
  • ROM - Read Only Memory, which is static, and cannot be written to (except with special equipment, or special procedures)

ROM chips are generally meant to hold instructions that do not change very often. Some of these chips hold the BIOS (Basic Input Output System) of the computer, which is not meant to change until the manufacturer makes an upgrade available. Data stored in ROM memory does not require power to be retained on the chip, but it does require power to use it or to reprogram it.

RAM comes in several sorts of packages. Some RAM chips used to be soldered on motherboards or on expansion cards. RAM that is meant to be replaced by the user is more often contained on a SIMM (Single Inline Memory Module) or a DIMM (Dual Inline Memory Module). SIMMs have chips on one side of a small card, while DIMMs typically have chips on both sides of the card. The text explains that DIMMs and SIMMs have contacts on both sides of their cards, but the ones on the back side of a SIMM are for different circuits.

SIMMs and DIMMs can be either DRAM (dynamic) or SRAM (static). The word static is misleading here. DRAM chips need to have their data refreshed dynamically every few milliseconds (a common value is every 4 milliseconds) with a jolt of power. SRAM chips do not need to have this periodic jolt, and will retain the data placed on them without the jolt, but only until the main power of the computer is turned. In this respect, DRAM and SRAM chips will both lose their data when the computer is turned off. SRAM chips are more expensive, but give faster access, so they are used where this speed advantage is necessary.

To check out options on buying RAM, I recommend looking at the Crucial Technology web site. Dr. Andrews recommends this site and the Kingston Technology site as well. As an exercise, assume you are buying memory for a Dell Optiplex GX1 (an older model) whose processor runs at 450 MHz. The computer currently has 128 MB of RAM. How much will it cost to take this system to the maximum RAM supported for it?

More on SIMMs, and DIMMs:
  SIMM DIMM
pins in connector 30 or 72 pins 168, 184, or 240 pins; may have one or two notches
common speed ratings 60, 70, or 80 ns 200 to 400 MHz
common sizes (not currently used) 8 MB to 2 GB
data path size 32 bits 64 bits

Adding and upgrading RAM are discussed. The author presents a list of questions that should be answered before buying RAM:

  • How much memory do I need?
  • How much memory can my computer physically accommodate?
  • What increments of memory does my system board support?
  • How much additional memory is cost effective?
  • What kind of memory can fit on my system board?
  • What memory is compatible with the memory I already have installed?

A critical issue brought up in this section is the idea of banks of memory. Typically, you have several slots in the motherboard into which you can insert SIMMs or DIMMs. Often, SIMM slots are grouped in banks. A bank could be one slot, two slots, four slots, or another combination. The short story is that if you use a bank, you must fill it. Also, if you use a bank you must use the same kind of SIMM in each slot in the bank. Different banks may have different size SIMMs in them, and may have different speed SIMMs in them. However, the RAM of the system will all run at the same speed as the slowest SIMM in the computer.

Installing memory is an important concept. You often must insert a SIMM module into the socket at an angle (45 degrees is preferred), then straighten it a bit to lock it into place. Sometimes with DIMMs there are actual locks to move at the ends of the socket, sometimes not. Inserting a DIMM straight down into its socket should engage the locks when the module is seated (pushed down all the way).

One place a speed advantage is useful is for cache memory. A cache is a place where data or instructions are placed that the computer expects to need soon or often. A separate controller chip was sometimes assigned the task of placing frequently used instructions in cache memory. In modern computers, the cache controller is more likely to be part of the main processor.

It was often necessary on older computers to adjust the CMOS settings after changing the amount of memory on the motherboard. Newer computers tend to sense the new amount automatically. If your system does not recognize the memory you have added, consider upgrading the BIOS.

Adding RAM can be tricky. If the system misbehaves after changing the installed RAM, check all the factors. Is it physically installed correctly? Does the BIOS recognize it? Did you buy the right kind? Have you put more memory on the motherboard than it can address? Any of these problems will lead to a computer that does not work.

An important concept from page 267: CMOS (Complementary Metal-Oxide Semiconductor) chips are meant to retain configuration settings for your computer while the power is turned off. This is usually accomplished by having a battery in the computer that supplies a small current to the CMOS chips. CMOS chips are used because they produce less heat than other types, and because they require less power to retain information stored in them.

Facts to remember about CMOS settings:

  • CMOS chips retain their settings by a trickle charge from a rechargeable battery on the motherboard. This battery is recharged while the computer runs, so it can lose its charge if the computer is not turned on for a long time.
  • CMOS settings usually include an optional password. If a password is set, a user cannot start the computer without knowing it. However, there is usually a jumper setting that can be changed on the motherboard to erase this password, so it provides security from users, but not from technicians.
  • The CMOS setup program is typically held on one BIOS chip, which can usually be updated with a download from the manufacturer.

A short discussion about adapters begins on page 268. It mentions that there are several kinds of adapter cards that can be installed in a regular desktop computer to add functionality such as better sound or video, network ports, or MIDI ports for a musical device. It ignores the fact that you must match the card you buy to the kind of slot you have available in the computer. Failing to do this will waste your time, your money, and possibly your computer. The text tells you that it is necessary to power down a computer before plugging in a new adapter card, and that this is not necessary with a USB device. It does not mention that it is possible to ruin the USB device if you do not safely release it before pulling it out of the USB socket. See the article behind that link. Pull them out hot if you want to, but you have been warned.

A discussion of buses begins on page 270. It is misleading in that it discusses only data buses, which I have already discussed, and ignores the concept of adapter type buses. Be aware that there have been many slot-bus types over the years, and no doubt there will be more. Don't assume that the adapter you buy will fit the slot you want it to fit without checking. Follow this link to an Internet page with illustrations of several adapter bus types.

Assignment 1: Read the How-To article on page 268 about port types. Then follow this link to a very good web page that features line art, photographs, and identifying logos about several kinds of ports on computers and related devices. What that page is missing is an explanation of what each oddly named port is for. Compare it to page 130 in Chapter 3, which is about the same concept.

For this assignment, choose one of the ports you don't know the use of, research it on the Internet. Tell me the name of the port type, what it is good for, and where you found the answer. This is not a group assignment.

Since the book is not covering several topics that we are supposed to cover, let's look at a few facts about IP addresses, subnets, and DHCP.

IP Addresses

The purpose of an IP address is to identify each unique node on a network. On an IP network, each device is known as a host, and every host must have an address. The addresses we will discuss are IP version 4 addresses. (IPv6 addresses are 16 bytes, or 128 bits long.) They are numeric addresses, stored as four bytes, which is equal to 32 bits.

IP addresses were invented with networking in mind. They contain two parts: one to identify the address of the network a host is on, and the other part to identify the host itself. Every network is assigned an address which could be held in one, two, or three bytes, depending on the class of the network (A, B, or C). The remaining byte or bytes are typically used for hosts on networks.

Each byte in an IP address will be a number in the range 0 through 255. Those numbers are written in base 10, decimal notation, which is what most humans have been taught to use. A computer sees and thinks of them in base 2, binary notation. You will not always have a translating calculator when you need to convert decimal notation to binary notation and vice versa. You will need to know a conversion method to do this, so we will discuss one in class. The method presented below has been used by my students for several years.

Decimal notation works because of two things: the value of a digit (numeral), and the value of a position. Consider this number: 327. What does it mean? Three times one hundred, plus two times ten, plus 7 times 1. You have that drummed into you so early in school you may never think of it any more. The value of a number is the value of each digit, times the value of its position, added together.

Value of a Decimal Number
Position: Hundreds
Position: Tens Position: Ones
Value of digit times value of position:300
Value of digit times value of position:20 Value of digit times value of position:1
3
2
7

In a way, binary notation is easier. There are only two digits: 1 and 0. The value of a binary number is the sum of the values of the positions that hold a 1. Let's look at how that works.

The largest number that can be stored in one byte is 255. This is the sum of the values of all eight positions in the byte. Converting a binary number to decimal is simple: add the values of all the positions that hold a one. The only trick is to know the value of each position. They are all powers of two. Start on the right with 1, and double the value to get the value of the next position to the left: 2, 4, 8, 16, 32, 64, and 128. If that isn't working for you, listen to Danny Kaye sing, and pay attention to the children in the background. Or if that's too old, try Paul McCartney.

Values of Positions in a Byte
Bit position: 7 6 5 4 3 2 1 0
Value of Position (if a 1 is in it): 128 64 32 16 8 4 2 1

How do you convert a decimal number (less than 256) to binary? (For bigger numbers, you need more than one byte.)

You do a series of subtraction problems, one for each position in the byte, starting from the left. For example, let's convert 175 to binary.

  1. Ask yourself this question for each bit position: Can I subtract the value of this bit from the current number? You must be able to do it without getting a negative result.
    Can you subtract 128 from 175? Yes, you can. So you write a one in the 128 bit position, and do the math: 175 - 128 = 47. Perform the next test on 47.
  2. Can you subtract 64, the next position value, from 47? No, so you write a zero in the 64 bit position.
  3. Can you subtract 32 from 47? Yes, so write a one in the 32 bit position, and do the math: 47 - 32 = 15.
  4. Can you subtract 16 from 15? No, so you write a zero in the 16 bit position.
  5. Can you subtract 8 from 15? Yes, so write a one in the 8 bit position, and do the math: 15 - 8 = 7.
  6. Can you subtract 4 from 7? Yes, so write a one in the 4 bit position, and do the math: 7 - 4 = 3.
  7. Can you subtract 2 from 3? Yes, so write a one in the 2 bit position, and do the math: 3 - 2 = 1.
  8. When you have 1 left, write a one in the 1 bit position. This will always be done for odd numbers.
    If there is no remainder at any of the steps, write a zero in each of the remaining bit positions.
Conversion to Binary
Bit position: 128 64 32 16 8 4 2 1
Conversion of 175 (above) 1 0 1 0 1 1 1 1

Knowing binary helps us understand the five address classes in an IP network. The first three classes can be described by the number of bytes assigned to the network portion of their addresses:

  • one byte identifies a class A network
  • two bytes identify a class B network
  • three bytes identify a class C network

Class D and E addresses use portions of the fourth byte as well for network addressing. You may wish to know that only class A, B, and C addresses are in general use. Class D addresses are for multicasting (messages to groups of machines), and class E addresses are for experimental use.

One way to recognize the class of a given address is to memorize the range of possible addresses in each class, shown in the graphic on this page. That's what I had to do when I learned it. There is a better way.

The five classes of addresses are defined as limited to specific ranges of values of the first byte in the address. The numeric ranges are hard to remember until you see a chart that explains what the ranges have to do with the binary version of the first octet.

Values of Positions in a Byte
Bit position: 7 6 5 4 3 2 1 0
Value of Position (if a 1 is in it): 128 64 32 16 8 4 2 1

Reading from left to right, if the first bit (position 7, above) of the first octet is a zero, that octet must represent a number less than 128. (Why? Because all the other position values only add up to 127.) This defines a class A address: the first byte must be 127 or less. Consider it this way:

  • Class A - first bit is a 0, range for the byte is 0 to 127
  • Class B - first bit is a 1, second is a 0, range for the byte is 128 to 191
  • Class C - first two bits are 1s, third is a 0, range for the byte is 192 to 223
  • Class D - first three bits are 1s, fourth is a 0, range for the byte is 224 to 239
  • Class E - first four bits are 1s, fifth is a 0, range for the byte is 240 to 255

So, if you can convert the first byte of an address to binary notation, you can tell the address class by the position of the first 0 in it, reading from left to right.

Hosts on a Network

Consider the task of assigning addresses to hosts within your network. Host addresses should follow the network address scheme you are assigned. If your network address was 150.60.0.0, you would have a class B address, and all host IP addresses should begin with 150.60.

So, how many can you have? Let's consider theory for a moment. In a perfect world, assume you are assigned address 2.0.0.0, which is a class A network address. (No, you can't have it, it's taken, but just think about it.) How many hosts can exist on that network? Your first byte (class A) determines your network in this case, so we can assign numbers to hosts with the other three bytes. Each byte can hold up to 256 different numbers. Three bytes means 256 x 256 x 256 which takes us to 16,777,216 different addresses on that network. Sort of. (This is why class A addresses are assigned to ISPs.)

You can't actually assign the address where all host bits are set to 0, because that is the address of the network itself, and it needs it. Another rule (that is almost always true) is that you can't assign the address where all host bits are set to 1, because that is the broadcast address for the network, used for messages sent to all hosts. If you need to subdivide this network into subnets, each one will also need its own network address and broadcast address. We will come back to this idea.

Private Addresses

Say you just bought a router for your home. If you do not have an assigned address, you could use any address scheme you wanted as long as you did not attach to the Internet (or any other network). In reality, everyone wants or needs the Internet, so you should use a private address scheme, as shown in the chart below. You can choose any address scheme for your network that gives you enough host IDs. The proper use of private addresses tells any network staff who see them that these are not registered public addresses, and these machines need "help" to get to the Internet. (That's foreshadowing: the plot thickens.)

Private addresses work inside a network, but their traffic cannot be routed to other networks outside that one. (Great, then how do I get to the Internet? More magic in a minute.) To understand this, you need to know that every IP address in the world was meant to be unique.

Wait a minute, if there are about 128 class A networks, with not quite 17 million hosts on each one, then how do we get the whole world on the Internet? The short answer is, there is more to it. IPv6 addresses are one way, but we have a huge number of networks using only IPv4. Keep reading.

Addresses that are visible to the world are called registered or public addresses. This scheme would allow any IP addressed machine to contact any other (in theory) because the address would identify the network and the host uniquely. (It was also believed that there would be networks that would have no need to contact other networks. Yeah, right. I never need to check my mail, buy on Amazon, download a driver, post web pages for students,...) At a certain point, the Internet became valuable to everyone, and the world began to run out of addresses.

So the Internet Assigned Numbers Authority (IANA) designated some address ranges as private or unregistered addresses. They are also called nonroutable addresses, although that is not exactly an accurate name. They are never used on the Internet as real addresses, which is the point.

Class Private Addresses
Begin
Private Addresses
End
Class A 10.0.0.0 10.255.255.255
Class B 172.16.0.0 172.31.255.255
Class C 192.168.0.0 192.168.255.255

Any address beginning with a 10, for example, is assumed to be a private address. This is the format used in many networks, because it provides lots of addresses for hosts, and lots of room for subnets. A subnet is a subdivision of your network. You will need this in a few paragraphs.

Within any organization, addresses in these private ranges may be used without registering the addresses with IANA or ICANN, the Internet Corporation for Assigned Names and Numbers. Each address you use within your network must still be unique in your network. The problem is that there is no guarantee whatsoever that any address I use in my organization is not already in use in your organization, which makes direct networking between our networks unreliable, if not impossible.

The magic part: To access the Internet, traffic from a private address network passes through a router that acts as a proxy server, providing a shared connection with a registered address. That router has both a private address on your network, and a registered public address that lets it communicate with other networks. The proxy server shares its public address with the devices on your network, allowing them to send signals to other networks through it. The service that does this sharing of the address is called Network Address Translation (NAT).

This is the same principle that allows a home user to set up a router, connect computers to it, and connect the router to a cable system modem. Comcast/Charter/Frontier/whoever assigns an address to the cable modem, which is given to your router. Then the router assigns private addresses to all the devices on your network, and everyone can get to the Internet.

Subnets

Now, let's consider subnets. Suppose your company has six divisions or locations, and logically needs six networks. Logically, you would want to be assigned six different network addresses. Suppose, however, that you either cannot be assigned or cannot afford licenses for six networks. Then you take the one network address that you can obtain and create six subnets. (Six, by the way, is not a magic number, it is just an example. Maybe you need a hundred. Same principle applies.)

Subnetting works by borrowing bits from the host portion of an address, and using those bits to identify subsections of your network. (By the way, borrowing is the word that is always used, but it is more like stealing. We have no intention of giving them back.)

The use of borrowed bits only works because of subnet masks. A subnet mask is like a pattern or filter that a host is told about when it is set up to use a network. A subnet mask tells hosts on a network which bits in an address are network address bits and which bits are host address bits. It does it by the use of 1s and 0s. Consider the table below:

Standard Subnet Masks for Classes A, B, and C
Class
Decimal Mask Binary Mask
Class A 255.0.0.0 11111111.00000000.00000000.00000000
Class B 255.255.0.0 11111111.11111111.00000000.00000000
Class C 255.255.255.0 11111111.11111111.11111111.00000000

Network devices read a mask to learn how to interpret addresses. A mask is always a series of 1s followed by a series of 0s. Address positions marked by 1s in a mask are considered network address positions. Address positions marked by 0s in a mask are considered host address positions.

Another way of saying this is that certain address bits are considered to be network address bits and the rest are considered host address bits. The actual method used involves Boolean math, but understanding it is not critical to understanding or using the concept. When a device reads an actual IP address, the rule from the subnet mask is applied, and the device understands which bits are the net address and which are the host address.

By borrowing one bit from the host address bits, two subnets are theoretically possible. However, as a general rule, subnet numbers using all 1s and all 0s are not used (for the reasons noted above), so borrowing one bit will probably not yield any usable subnet addresses. This is why the formula for number of usable subnets is:
2N - 2 = number of subnets (where N is the number of bits borrowed).

Assume we borrow two bits in each of the three classes above. Borrowed bits are shown in red in the resulting subnet mask numbers below:

Subnet Masks if Borrowing 2 Bits

Decimal Mask Binary Mask
Class A 255.192.0.0 11111111.11000000.00000000.00000000
Class B 255.255.192.0 11111111.11111111.11000000.00000000
Class C 255.255.255.192 11111111.11111111.11111111.11000000

Note that the subnet masks above do not match the standard masks from the previous table. The standard masks are classful masks, because they match the intended use of class address schemes. The masks above are classless, because they do not match any network class. Those words do not mean they are less functional, they just tell networking staff what you have done.

Be aware that routers on the Internet only use the network bits of an address for routing. Their job is only to find the right network. Routers connecting subnets within a network must use the network, subnet, and host bits for routing.

Rules about addresses when using subnets:

  • Each address on a network must be unique. This is true for all IP addresses, not just subnet addresses.
  • The network and subnet numbers must be the same for all devices on the same network. A classic error is to assign two workstations to different subnets and expect them to communicate as if they were on the same logical LAN (Local Area Network).
  • The host (physical) portion of the address must not be set to all 1s or all 0s.
  • Plan for growth. You will have to add more stations later to most LANs, and you may have to add more subnets than you need today. In general, calculate the number of subnets required, then round up to the nearest power of two. Do the same with the number of hosts needed per subnet. You may find these two goals are in conflict. When that happens, it's time for a new plan.
  • Don’t use IP addresses reserved for special use.
DHCP

As stated above, in an IP network each device needs a unique IP address. Assignment of these addresses takes some planning. First, there are two major approaches:

  • Static assignment - someone has to manually configure the address on each device, including workstations, servers, and printers. Unless your network is small, this is very painful.
  • Dynamic assignment - a server on the network can assign an address to workstations as they are powered up. You will still want to manually configure addresses on servers, printers, routers, and other network resource devices. However, you can still automate the manual part.

Dynamic Host Configuration Protocol (DHCP) service allows us to dynamically assign IP addresses to hosts on an IP network. Three methods for assigning addresses:

  • Automatic Allocation: DHCP assigns a permanent IP address to a host.
  • Dynamic Allocation: An IP address is assigned to a host for a limited period of time (or until the host relinquishes the address). Also called address leasing. (This is the most commonly used method.)
  • Manual Allocation: This method requires that you assign the address. DHCP simply delivers the address to the host. Read that carefully: you can make the assignment, but you tell the DHCP server about it. You don't visit the host yourself, except for the initial setup.

Whether you use dynamic or static assignment, you can assign more than the IP address of a device with DHCP. You can also specify what the subnet mask for your device is, what server to use for Domain Name Service (DNS), and what server to use for Gateway service (routes to other networks). A DHCP server can provide this information when the device powers up, or it can be configured by hand, if you have the rest of forever to get your work done. This should give you a little more respect for the job your wired or wireless router is doing at home.

Assignment 2: Read the material above about subnetting. We will do some exercises about this subject next week.