Comprehensive Example


Addressing

This section describes network layer addressing and compares it to the physical addresses discussed earlier. A discussion of how routers use these addresses follows; the section concludes with a brief introduction to IP addressing.

Physical and Logical Addresses

Earlier we discussed MAC addresses; recall that these are at the data link layer and are considered to be physical addresses. When a network interface card is manufactured, it is assigned an address, called a burned-in address (BIA)it doesn't change when the network card is installed in a PC and is moved from one network to another. Typically, this BIA is copied to interface memory and is used as the MAC address of the interface. MAC addresses are analogous to social insurance numbers or social security numberseach person has one assigned to him or her, and the numbers don't change as the person moves to a new house. These numbers are associated with the physical person, not where the person lives.

Note

The BIA is a 48-bit value. The upper 24 bits are an Organizational Unique Identifier (OUI), representing the vendor of the device. The lower 24 bits are a unique value for that OUI, typically the serial number of the device.


Knowing the MAC address assigned to a PC or to a router's interface doesn't tell you anything about where it is or what network it is attached toit can't help a router determine the best way to send data to it. For this we need logical network layer addresses; they are assigned when a device is installed on a network and should be changed when the device is moved.

Note

Some organizations set the MAC addresses of their devices to something other than the BIA, for example, based on the location of the device in the network, for management purposes.


When you send a letter to someone, you have to know his postal address. Because every postal address in the world is unique, you can potentially send a letter to anyone in the world. Postal addresses are logical and hierarchicalfor example, they include the country, province/state, street, and building/house number on the street. The top portion of Figure B-15 illustrates Main Street with various houses on it. All of these houses have one portion of their address in commonMain Streetand one portion uniquetheir house number.

Figure B-15. Network Layer Addresses Are Similar to Postal Addresses


Key Point

Network layer addresses are also logical and hierarchical. They have two main parts: the network that the device is on (similar to the street, city, province, and so on) and the device number on that network (similar to the building number on the street).


Note

The terms device, host, and node are used interchangeably to represent the entity that is communicating.


The lower portion of Figure B-15 illustrates a network, 17, with various PCs on it. All of these PCs have one portion of their address in common17and one part uniquetheir device number. Devices on the same logical network must share the same network portion of their address and have different device portions.

Routing and Network Layer Addresses

A router typically only looks at the network portion of a destination address. It compares the network portion to its routing table, and if it finds a match, it sends the packet out of the appropriate interface, toward its destination.

A router only needs to concern itself with the device portion of a destination address if it is directly connected to the same network as the destination. In this case, the router must send the packet directly to the appropriate device, and it needs to use the entire destination address for this. (A router on a LAN uses ARP to determine the MAC address of the device with that IP address and then creates an appropriate frame with that MAC address as the destination MAC address.)

IP Addresses

IP addresses are network layer addresses. As you saw earlier, IP addresses are 32-bit numbers. As shown in Figure B-16, the 32 bits are usually written in dotted decimal notationthey are grouped into four octets (8 bits each), separated by dots, and represented in decimal format. Each bit in the octet has a binary weight (the highest is 128 and the next is 64, followed by 32, 16, 8, 4, 2, and 1). Thus, the minimum value for an octet is 0, and the maximum decimal value for an octet is 255.

Figure B-16. 32-bit IPv4 Addresses Are Written in Dotted Decimal Notation


Note

The maximum value of an octet is when all 8 bits are binary 1. The decimal value of an octet is calculated by adding all the weighted bits, in this case, 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.


Note

Appendix C details how to convert between decimal and binary formats (and vice versa) and provides a decimal-to-binary conversion chart.


IP Address Classes

IPv4 addresses are categorized into five classes: A, B, C, D, and E. Only Classes A, B, and C addresses are used for addressing devices; Class D is used for multicast groups, and Class E is reserved for experimental use.

The first octet of an IPv4 address defines which class it is in, as illustrated in Table B-1 for Class A, B, and C addresses. The address class determines which part of the address represents the network bits (N) and which part represents the host bits (H), as also shown in this table. The number of networks available in each class and the number of hosts per network are also shown.

Table B-1. IP Address Classes A, B, and C Are Available for Addressing Devices

Class

Format[*]

Higher-Order Bit(s)

Address Range

Number of Networks

Number of Hosts per Network

A

N.H.H.H

0

1.0.0.0 to 126.0.0.0

126

16,777,214

B

N.N.H.H

10

128.0.0.0 to 191.255.0.0

16,386

65,534

C

N.N.N.H

110

192.0.0.0 to 223.255.255.0

2,097,152

254


[*] N=network number bits; H=host number bits.

Note

Class A addresses are any addresses that have the higher-order bit set to 0; this would include 0 through 127 in the first octet. However, network 0.0.0.0 is reserved, and network 127.0.0.0 (any address starting with decimal 127) is reserved for loopback functionality. Therefore, the first octet of Class A addresses ranges from 1 to 126.


Note

Class D addresses have higher-order bits 1110 and are in the range of 224.0.0.0 to 239.255.255.255. Class E addresses have higher-order bits 1111 and are in the range of 240.0.0.0 to 255.255.255.255.


For example, 192.168.5.1 is a Class C address. Therefore, it is in the format N.N.N.Hthe network part is 192.168.5 and the host part is 1.

Private and Public IP Addresses

The IPv4 address space is divided into public and private sections. Private addresses are reserved addresses to be used only internally within a company's network, not on the Internet. When you want to send anything on the Internet, private addresses must be mapped to a company's external registered address. Public IPv4 addresses are provided for external communication.

Key Point

Request For Comments (RFC) 1918, "Address Allocation for Private Internets," defines the private IPv4 addresses as follows:

  • 10.0.0.0 to 10.255.255.255

  • 172.16.0.0 to 172.31.255.255

  • 192.168.0.0 to 192.168.255.255

The remaining addresses are public addresses.


Note

Internet RFC documents are written definitions of the Internet's protocols and policies. A complete list and the documents themselves can be found at http://www.rfc-editor.org/rfc.html.


Note that all the IP addresses used in this book are private addresses, to avoid publishing anyone's registered addresses.

Subnets

As illustrated in Table B-1, Class A addresses have little use in a normal organizationmost companies would not want one network with over 16 million PCs on it! This would not be physically possible or desirable. Because of this limitation on addresses when only their class is considered (called classful addressing) and the finite number of such addresses, subnets were introduced by RFC 950, "Internet Standard Subnetting Procedure."

Class A, B, and C addresses can be divided into smaller networks, called subnetworks or subnets, resulting in a larger number of possible networks, each with fewer host addresses available than the original network.

The addresses used for the subnets are created by borrowing bits from the host field and using them as subnet bits; a subnet mask indicates which bits have been borrowed. A subnet mask is a 32-bit value that is associated with an IP address to specify which bits in the address represent network and subnet bits and which represent host bits. Using subnet masks creates a three-level hierarchy: network, subnet, and host.

Key Point

In binary format, a subnet mask bit of 1 indicates that the corresponding bit in the IP address is a network or subnet bit, and a subnet mask bit of 0 indicates that the corresponding bit in the IP address is a host bit.

Subnet mask bits come from the higher-order (the leftmost) bits of the host field; therefore, the 1s in the subnet mask are contiguous.


The default subnet masks for Class A, B, and C addresses are shown Table B-2.

Table B-2. IP Address Default Subnet Masks

Class

Default Mask in Binary Format

Default Mask in Decimal Format

A

11111111.00000000.00000000.00000000

255.0.0.0

B

11111111.11111111.00000000.00000000

255.255.0.0

C

11111111.11111111.11111111.00000000

255.255.255.0


When all of an address's host bits are 0, the address is for the subnet itself (sometimes called the wire). When all of an address's host bits are 1, the address is the directed broadcast address for that subnet (in other words, for all the devices on that subnet).

For example, 10.0.0.0 is a Class A address with a default subnet mask of 255.0.0.0, indicating 8 network bits and 24 host bits. If you want to use 8 of the host bits as subnet bits instead, you would use a subnet mask of 11111111.11111111.00000000.00000000, which is 255.255.0.0 in decimal format. You could then use the 8 bits to address 256 subnets. Each of these subnets could support up to 65,534 hosts. The address of one of the subnets is 10.1.0.0; the broadcast address on this subnet is 10.1.255.255.

Another way of indicating the subnet mask is to use a prefix. A prefix is a slash (/) followed by a numeral that is the number of bits in the network and subnet portion of the addressin other words, the number of contiguous ones that would be in the subnet mask. For example, the subnet mask of 255.255.240.0 is 11111111.11111111.11110000.00000000 in binary format, which is 20 1s followed by 12 0s. Thus, the prefix would be /20 for the 20 bits of network and subnet information, the number of 1s in the mask.

Key Point

The formula 2n calculates the number of subnets created, where n is the number of subnet bits (the number of bits borrowed from the host field).

The formula 2x- 2 calculates the number of host addresses available on each subnet, where x is the number of host bits.


IP addressing is further explored in Chapter 3.




Campus Network Design Fundamentals
Campus Network Design Fundamentals
ISBN: 1587052229
EAN: 2147483647
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net