IP Address Class Considerations with IBM's TCP/IPClick here to advance to the discussion about IP subnetting Click here to advance to the discussion about IBM's TCP/IP IP-address Classes A Brief Introduction to IP Addresses and ClassesIP addresses are those strange groups of 4 numbers joined by 3 periods, such as 192.168.1.14, which uniquely identify each host or workstation in a TCP/IP network. The first part of the address specifies a particular TCP/IP network, and the last part of the address specifies the workstation identifier. Note that the term "network" generally refers to a specific Local Area Network (LAN) segment. Each one of the four numbers is called an octet, and each octet is normally stored in one 8-bit byte. Therefore, each octet's value ranges between 0 and 255. The entire 4 octet IP address can also be represented by a 32 (4 x 8 bits) bit binary string. The actual values of 0 and 255 are normally reserved for a special purpose, and normally 0 and 255 should not be used in the IP address of an actual network or workstation. When seen in an IP address, the special value of 0 normally is a reference to "the entire network (i.e. LAN)" and the special value of 255 normally indicates "a broadcast to all the stations in the network (i.e. LAN)." Some implementations of TCP/IP permit 0 and 255 to be used as regular IP address values; however, our recommendation is to avoid using them that way. The address values are arranged in Classes (A, B, and C) which determine how many workstations can possibly exist on the network An address mask, also referred to as the "subnet mask" usually accompanies an IP address assignment, to indicate the actual Class type which the customer intends to use on his/her TCP/IP network. In practice, the actual Class assignment is either explicitly based on the address ("subnet") mask which accompanies the IP address, or implicitly based on the IP address value. The address mask is also a 4 octets long (32 bit), and normally uses the special value 255 (all binary ones) to indicate "the network (LAN)" address portion, and the special value 0 (all binary zeroes) indicates "the workstation" address portion. Address masks must begin with all binary ones (to indicate the network portion), and end in binary zeroes (to indicate the workstation portion). Wherever in that long 32 bit mask the ones end and the zeroes begin, will determine the split between the network portion of the address, and the workstation portion of the address. Usually that split occurs on a nice even boundary where one octet ends and next octet begins. But there are exceptions, and a process called "subnetting" allows an installation to "steal" some of the high-order bits usually used for the workstation address, and assign it to a "sub-net." The next section (below) describes subnetting in detail. The reader should understand that some elementary binary or "bit" level arithmetic is used in describing and decoding IP addresses. Please consider some key binary and hexadecimal values below, and notice how the classes change based on the high order bit value (the high order bit is the leftmost 0 or 1 in the "Bits" column):
The two high order bits of the leading octet indicate the Class of a particular address. In a Class
A network, the leading set of digits (called an octet) specifies the network
identifier, and the remaining 3 sets of digits (i.e. 3 octets) specify
a particular workstation identifier. In a Class
B network, the leading pair of 2 octets specifies the network identifier,
and the remaining pair of 2 octets specify a particular workstation in
that network (LAN). In a Class
C network, the leading 3 octets specify the network (LAN) identifier,
and the last octet specifies a particular workstation in that network
(LAN).
A Brief Introduction to IP Address SubnettingOne of the least understood and most confusing aspects of IP addressing is the practice of subnetting. Subnetting is chosen when an installation has a very limited set of IP addresses (often just a single Class C address, having 253 possible workstations), yet needs to create several unique networks ("LANs") within that set of 253 workstation addresses. An example is the best way to explain subnetting. The Acme Buggywhip Company was struggling to keep abreast of modern networking technology, and finally decided to embrace TCP/IP and connect to the Internet. Their local Internet provider sold them a Class C network connection with the network address of 192.168.155.0 (remember, 0 means "the entire network" of all 255 addresses from 192.168.155.0 to 192.168.155.255). But the network PCs at Acme Buggywhip were never centrally managed, and as a result, they had 5 different LANs: 2 Ethernet LANs, 2 Token Ring LANs, and 1 FDDI LAN. All 130 employees were excited about the Internet and wanted to get connected. But how could Acme integrate 5 LANs onto a single Class C network? They had plenty of IP addresses in their single Class C network, but they had 5 different LANs!? Each LAN required its own IP address range! Subnetting was the answer to this problem. With 130 employees on five LANs, Acme's Network Manager decided to subdivide their allotment of 255 possible addresses into 5 groups, or "subnets" of 32 workstations each. Therefore, he decided to "steal" the high-order 3 bits from the last octet (his workstation number) and use them as a sub-network mask, and leave the low-order 5 bits for the workstation number. So why did he choose 3 subnet bits? It comes down to binary math: 3 bits permits 2 to the 3rd power ( = 8) networks, each with 2 to the 5th power (= 32, remember: 5 bits were remaining) workstations. He decided to group them as follows:
In other words, by specifying a special subnet mask that added 3 additional bits to the usual Class C address mask of 255.255.255.0, the new mask became 255.255.255.224. Confused? Let's review our facts quickly: the normal Class C mask was 255.255.255.0, which consists of 3 octets, each having 8 bits that are all binary "1" for a total of 24 "1" bits. That's the network mask. But Acme changed the ending "0" to 224. Why? The number 224 in decimal is E0 in hexadecimal, or 1110 0000 in binary notation. Notice those three high-order "1" bits? That's the extra subnet mask that Acme needed to help subdivide their LAN. Get the idea? They now had 27, not just 24, network bits in their mask. Those extra 3 bits gave them 8 "new" sub-networks of 32 workstations each. Some other possible subnet masks for a Class C network could be:
Notice how we discount 2 workstations per network, because a workstation value of all binary zeroes or all binary ones is not advisable. Likewise, it is generally not advisable to have a subnet number of all binary ones because this implies a subnet broadcast. The Network Manager had already installed a router, so every workstation could communicate with everyone else using a homegrown protocol called AcmeNet.. So he now had to add TCP/IP protocol to the list of supported protocols, and for each LAN type, he had to assign an IP address and subnet mask. The Internet provider gave Acme a gateway connection at address 192.168.155.1. Therefore, his router table might have looked like this:
Each Acme
end-user reconfigured his/her PC to specify a subnet mask of 255.255.255.224,
along with the IP address for his/her group. The "gateway" address
on each PC was the link-address shown above in the router table for the
particular link the user was assigned to.
How IP address classes are defined in IBM's TCP/IPIBM's TCP/IP makes a nasty assumption about the Class of your TCP/IP network, based on the IP address you use. This is not well documented, if at all, and causes hours of frustration in setting up their mainframe-based TCP/IP stack. In table below, match your IP address in one of the three ranges, and then note the Class it falls into. Most TCP/IP networks are fairly simple Class-C networks. They assume there will just be 254 workstations in that network. But you may be surprised to find that your IP address falls into a Class-A or Class-B address range! The IBM TCP/IP error message "NETWORK CONTAINS NO KNOWN HOSTS" is an indicator that you are trying to use a Class-A or Class-B range address as a Class-C address. For example, we are seeing numerous complaints from customers who are using the IP address range beginning with "10. something," such as 10.1.200.x. Historically, an IP address beginning with "10." was reserved for the Internet insiders, like the US government. But with the growth of "Intranets" we are finding customers using these "reserved" IP addresses, and it causes problems for IBM's TCP/IP. Our customers don't realize that the "10.x.x.x" addresses were designed to be used as Class-A addresses, with a mask of 255.0.0.0. But most Intranets are designed to use Class-C addressing, with a mask of 255.255.255.0. As a result, some special coding (shown below) is required in order to use "10." addresses correctly.
How To Properly Code "Gateway" Statements in IBM TCP/IP The following examples from a GATEWAY section of the PROFILE.TCPIP dataset illustrates how to properly specify different Classes of networks with sample IP addresses. GATEWAY ; Network First-hop Driver Packet-size Subnet-mask Subnet-value
; define a Class-C network using a Class-A style address 10.200.5.x
10 = TRLINK1 4000 0.255.255.0 0.200.5.0
; define a Class-B network using a Class-A style address 17.128.x.x
17 = TRLINK2 4000 0.255.0.0 0.128.0.0
; define a Class-C network using a Class-B style address 131.144.29.x 131.144 = FDDILINK 4000 0.0.255.0 0.0.29.0 ; define "the usual" Class-C network using Class-C address 192.168.4.x 192.168.4 = BTILINK 1500 0 ; select one of the networks to handle all outside traffic. ; normally, a router on that network is specified in DEFAULTNET DEFAULTNET 131.144.29.254 FDDILINK DEFAULTSIZE 0 In the above examples, notice how a Class-A range address requires that only the first digit group (called "octet") is specified on the left side, under the "Network" number. A Class-B range address requires that only the first two "octets" are specified on the left side. And for a Class-C range address, all three leading "octets" are specified on the left side of the GATEWAY statement. The "Subnet Mask" field uses the "IBM Mask" notation (which is very non-standard and can be confusing to those familiar with subnet mask values used by Windows or UNIX). See the table above for IBM Mask values. "0" implies "do not filter on this octet" and "255" implies "do perform filtering on this octet using the Subnet-Value field on the right." |
|
|
|
|
|||||
|