This chapter discusses several protocols in the TCP/IP suite, binary and hexadecimal numbers, and several aspects of using IP addresses. The objectives important to this chapter are:
The Internet Protocol suite was developed before the ISO-OSI model. The model used to construct it was the Department of Defense (DoD) model. The Department of Defense was instrumental in the construction of the Internet. Your text describes the DOD model as a condensed version of the OSI model. The chart below shows how the two models relate to each other.
The four layers of the DOD model address the topics found in the ISO model. If you understand the ISO model, you already understand the DOD model.
The TCP/IP suite does not address topics at the Network Access layer (DOD model). This makes it independent of any networking topology.
On page 62, you see a schematic diagram showing various protocols that operate at each model layer. The text proceeds to discuss the protocols with reference to the DOD model layers where they operate.
Process/Application Layer Protocols (upper 3 layers of the OSI model)
Host-to-Host Layer Protocols (Transport layer of the OSI model)
As noted in other classes, a simple test for whether a protocol under consideration is connnection-oriented or connectionless: if you are asked this question about a protocol, does its name start with a consonant or a vowel? UDP, IPX, and IP are connectionless. TCP, SPX, and NFS are connection-oriented.
The text discusses port numbers, telling us that numbers below 1024 are called well-known port numbers. A port number can be any number from 1 through 65535. Several port numbers are assigned to specific services through conventions established by ICANN. (A listing may be found in RFC 1700. Your text tells us to look at RFC 3232.) If you follow the link above to the list of ports used by specific services, you will find more information than is in your text. You will also find that although the text says that NNTP uses UDP, it also uses TCP.
Some references say ports 1024 through 65535 are Registered ports. Others say that 1024 through 49151 are the Registered ports, and that 49152 through 65535 are Dynamic ports.
Internet Layer Protocols
The text moves to a discussion of hexadecimal, binary, and decimal notation. To pass the certification test for this course, you will need to be able to convert decimal notation to binary notation and vice versa. You will need to know a conversion method to pass the test, so we will discuss this one in class.
Like decimal numbers, binary and hex numbers use a positional value scheme. Each digit in a number is worth that digit times the value of the position it occupies. For example, in the decimal number 725, the 7 is worth 7 times 100, the 2 is worth 2 times 10, and the 5 is worth 5 times 1.
Binary is easier, since the only digits we can use are 1s and 0s. The largest number that can be stored in one byte is 255. This is the sum of the values of all the the 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 have a clear memory of the value of each position. They are all powers of two. Start on the right with 1, and double the value for the each new position, moving to the left: 2, 4, 8, 16, 32, 64, and 128.
When you convert a decimal number to binary, 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.
The text makes a point of defining 8 bits as a byte, also called an octet. Half a byte, 4 bits, is called a nibble. It is handy to think about nibbles when converting a binary number to hexadecimal. The section on this in the text made no sense to me. Try this instead. Consider the byte above as two nibbles: 1010 and 1111. Considered independently, each of these nibbles can be converted to one hexadecimal character. First, let's review:
Hexadecimal numbers are written in base 16. It uses single characters for values from 0 through 15. Now, the method.
Does it get more complex? Not really. Four places of binary notation can't hold a value greater than 15 in decimal notation. This means that each nibble in a byte can be expressed as one hexadecimal character. If you read the four places, and convert to decimal, the only trick is knowing the sixteen characters used in hexadecimal.
To convert hex to binary, consider each pair of hex digits to be the components of one byte. Again, for me, it makes sense to convert a hex character to decimal, because I think in decimal. Then, I convert the decimal number to binary.
(Of course, when possible, you should use Windows calculator, which easily converts from one base to another. When you are practicing these methods, use Windows calculator to check your work. Open the View menu and select Scientific, if you don't see the radio buttons below.)
The text now moves on to IP Addressing.
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 discuss first are actually IP version 4 addresses. (IPv6 addresses will be 16 bytes, or 128 bits long.)
IP version 4 addresses are numeric addresses, stored as four bytes, which is equal to 32 bits. When we write these addresses, we usually place dots between the bytes, but you must understand that the dots do not exist in the addresses when they are sent in packets. The dot notation is sometimes referred to as dotted octet or dotted quad. (Each byte is called an octet because it has eight bits; there are four bytes in the address, so they are quads.) Remember that an IP address is just a series of numbers, so it can be written in hex, binary, or decimal notation. It is typically sent across networks as binary.
Since the IP protocol stack was invented with networking in mind, IP addresses 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 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. (It gets more complex, this is how we start.)
There are five address classes you need to know. The first three classes can be described by the number of bytes assigned to the network portion of their addresses:
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 for 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 know the range of possible addresses in each class. The five classes of addresses are defined as limited to specific ranges of values of the first byte. 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.
Remember the basics of binary notation: a byte has eight bits. Each bit is a digit in a binary number. Since we can only use 1s and 0s in binary notation, we either have (1) or don't have (0) the number of units represented by a position in the binary number.
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. This defines a class A address: the first octet must be 127 or less. Consider it this way:
So, if you can convert the first octet 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.
Most possible network addresses (not host addresses) have been assigned already. We will discuss how network administrators work around this.
The list below shows some specific addresses that have special meanings:
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 184.108.40.206, you would have a class B address, and all host IP addresses should begin with 150.60.
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. However, 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.
Private addresses work inside a network, but they cannot be routed to other networks, nor can you send signals to another network if you have a private address. (Great, then how do I get to the Internet? More magic in a minute.) To understand this, you need to know that all IP addresses in the world were meant to be unique. These 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. At a certain point, however, the world began to run out of addresses. (It was also believed that there would be networks that would have no need to contact other networks. Yeah, right...)
So the Internet Assigned Numbers Authority (IANA) has designated some address ranges as private or unregistered addresses. They are also called nonroutable addresses:
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. (Covered in chapter 3 of this text.)
Within any organization, addresses in these ranges may be used without registering the addresses with IANA. 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).
The chapter continues with a discussion of different kinds of broadcasts, described in terms of OSI layers:
This is a strange concept, given that a LAN is a network. What the author is saying is that routers can be used inside networks to segment them into subnetworks, but there can still be a kind of broadcast that treats the collection of networks as one.
The text describes a unicast as a broadcast that is converted to a message to a particular device. The example given is of a DHCP request for an IP address. It begins as a broadcast request, but a router (server) tasked with sending the request to a specific designated resource intercepts the original request and sends it to the DHCP server.
The text also describes multicast addresses. For example, all bridges on a network will have their own addresses, but they will also share a single multicast address. Any message sent to that address will be received and acted upon by all of them. This is how bridges send signals to each other.