• Aucun résultat trouvé

Internet Routing Tables

Dans le document Foundations TCP/IP (Page 173-181)

Tables that are maintained by Internet authorities and Internet Service Providers (ISPs) that provide the information for routing packets on the Internet.

Internet routing tables were getting too large, which affected delivery, reli-ability, etc.

Because Class B addresses would eventually run out, the focus shifted to the second issue. This issue was growing into a big problem, especially with the assignment of contiguous Class C network addresses.

Internet Routing Tables

Internet routing tables contain network addresses and the best route to get to that network. They list the network number, the subnet mask, and the route If a company needed fewer than… The Class C assignment would be…

256 addresses 1 Class C network

512 addresses 2 contiguous Class C networks

1,024 addresses 4 contiguous Class C networks 2,048 addresses 8 contiguous Class C networks 4,096 addresses 16 contiguous Class C networks 8,192 addresses 32 contiguous Class C networks 16,384 addresses 64 contiguous Class C networks

4370c10.fm Page 157 Tuesday, July 13, 2004 6:16 AM

158 Chapter 10

to take to get to that network. For example, a routing table may contain the fol-lowing routes:

Classless Inter-Domain Routing (CIDR) An IP addressing scheme that uses a slash followed by a number to highlight the network portion of an address instead of using a subnet mask.

This routing table contains only four routes. Imagine how huge a table would be that contains thousands of routes!

As these routing tables grew in size, two methods of compacting the routing tables were created: supernetting and CIDR. Both of these techniques made rout-ing tables smaller and routrout-ing entries more efficient.

Supernetting

Supernetting is used in routing tables to compact contiguous Class C networks.

Suppose that a company needs to address 1,024 hosts. The table from earlier in this chapter states that a company this size does not need a Class B; instead it requires four contiguous Class C addresses. This will conserve the Class B addresses; however, it will tax the Internet routing tables.

The company is assigned the four contiguous Class C addresses of 192.168.0.0 through 192.168.3.0, and it sets up its router to the Internet with the address of 192.168.0.1. The routes in the ISP routing table will contain the following:

Notice that all of the routes point to the same IP address of 192.168.0.1.

These routes therefore seem redundant. The subnet mask tells IP at the router to examine 24 bits of every packet to determine the route that each packet will take.

IP then examines 24 bits of the destination address of each packet and finds that

Network Subnet Mask Route

192.168.0.0 255.255.255.0 192.168.0.1

192.168.1.0 255.255.255.0 192.168.1.1

176.16.0.0 255.255.0.0 176.16.0.1

10.1.0.0 255.255.0.0 10.1.0.1

Network Subnet Mask Route

192.168.0.0 255.255.255.0 192.168.0.1

192.168.1.0 255.255.255.0 192.168.0.1

192.168.2.0 255.255.255.0 192.168.0.1

192.168.3.0 255.255.255.0 192.168.0.1

4370c10.fm Page 158 Tuesday, July 13, 2004 6:16 AM

Supernetting and CIDR 159

the only difference in any of these four routes is in the third octet (specifically the 23rd and 24th bit):

Any packet that is bound for any of these contiguous networks has the same first 22 bits; the only difference is in the 23rd and 24th bits. Since all of the net-works are routed to the same IP address, supernetting can tell IP to look at only 22 bits. Using supernetting, the same routing table would include only one route instead of four:

Now if a packet is bound for 192.168.1.12, 192.168.2.115, 192.168.3.5, or 192.168.0.10, the subnet mask of 255.255.252.0 tells IP to look only at the first 22 bits. All of these addresses have the same first 22 bits:

By supernetting the network in the routing table, the routes to this company’s Class C addresses are reduced to just one entry.

In another example, suppose that a company needs 4,096 host addresses.

Rather than using a Class B address, the company would use 16 contiguous Class C addresses. Without a supernetted route, the routing table contains the following 16 routes:

Network Third Octet

192.168.0.0 0000 0000

192.168.1.0 0000 0001

192.168.2.0 0000 0010

192.168.3.0 0000 0011

Network Subnet Mask Route

192.168.0.0 255.255.252.0 192.168.0.1

Destination First 22 Bits Last 10 Bits

192.168.1.12 1100 0000.1010 1000.0000 00 01.0000 1100 192.168.2.115 1100 0000.1010 1000.0000 00 10.0111 0011 192.168.3.5 1100 0000.1010 1000.0000 00 11.0000 0101 192.168.0.10 1100 0000.1010 1000.0000 00 00.0000 1010

Network Subnet Mask Route

192.168.0.0 255.255.255.0 192.168.0.1

192.168.1.0 255.255.255.0 192.168.0.1

192.168.2.0 255.255.255.0 192.168.0.1

4370c10.fm Page 159 Tuesday, July 13, 2004 6:16 AM

160 Chapter 10

Using a supernetted route, the entries in the routing table can be reduced to one route:

supernetted subnet mask A subnet mask that uses a supernet notation.

To create the right supernetted subnet mask, an administrator must look at the binary and determine the last bit where all of the networks are the same. This number depends on how many contiguous Class C addresses are being subnet-ted. Below is a simple table showing the correct supernetted subnet mask that should be used:

Network Subnet Mask Route

192.168.3.0 255.255.255.0 192.168.0.1

192.168.4.0 255.255.255.0 192.168.0.1

192.168.5.0 255.255.255.0 192.168.0.1

192.168.6.0 255.255.255.0 192.168.0.1

192.168.7.0 255.255.255.0 192.168.0.1

192.168.8.0 255.255.255.0 192.168.0.1

192.168.9.0 255.255.255.0 192.168.0.1

192.168.10.0 255.255.255.0 192.168.0.1

192.168.11.0 255.255.255.0 192.168.0.1

192.168.12.0 255.255.255.0 192.168.0.1

192.168.13.0 255.255.255.0 192.168.0.1

192.168.14.0 255.255.255.0 192.168.0.1

192.168.15.0 255.255.255.0 192.168.0.1

Network Subnet Mask Route

192.168.0.0 255.255.240.0 192.168.0.1

# of Networks Being Supernetted Mask

2 255.255.254.0

4 255.255.252.0

8 255.255.248.0

16 255.255.240.0

32 255.255.224.0

64 255.255.192.0

4370c10.fm Page 160 Tuesday, July 13, 2004 6:16 AM

Supernetting and CIDR 161

Classless Inter-Domain Routing (CIDR)

From Chapter 8, you know that subnet masks use a dotted decimal notation to describe to IP how many bits represent the network portion of the address. Very simply stated, CIDR addresses replace the subnet mask and state the number of bits that IP should use to determine the network portion of an IP address. For example, a subnet mask of 255.255.255.0 tells IP that 24 bits determine the net-work portion of the address, so CIDR simply uses the notation of /24. In other examples, instead of 255.255.0.0, CIDR uses a /16 notation, and a subnet mask of 255.255.255.240 is replaced with /28.

From earlier in this chapter, you know about the two serious challenges facing address allocation on the Internet. The first is the depletion of Class B networks, and the second is the large routing tables. CIDR is a mechanism to temporarily assist in alleviating both issues.

A great deal of space can be saved in a routing table by using CIDR notation instead of the traditional subnet mask dotted decimal notation. For example, if you replace 255.255.240.0 with /20, space is saved and the exact same informa-tion is conveyed. When you multiply this saved space by the number of routes in a routing table, which could be thousands, a tremendous amount of space is saved.

Another enormous benefit of using CIDR is the flexibility in assigning net-work addresses. Instead of using the “classful” system of addressing, CIDR uses a “classless” system. There is no default mask with CIDR. A network address can be allocated with any number of bits representing the network portion of the address. CIDR addresses can be allocated based on the number of hosts; using this addressing system can suit a company better than using the classful system, which can waste addresses. The table below lists the appropriate CIDR notation for different networks.

# of Networks Being Supernetted Mask

128 255.255.128.0

4370c10.fm Page 161 Tuesday, July 13, 2004 6:16 AM

162 Chapter 10

As you’ve already learned in this chapter, two major issues faced the growing Internet: the depletion of Class B addresses and the large routing tables. Super-netting and CIDR are two initiatives that have assisted in the impact of these major issues. As you’ll see in Chapter 15, “IP Version 6,” the next version of TCP/IP is currently being deployed. The address allocation scheme has under-gone intense scrutiny, so the issues that faced this version of IP will be avoided in the future.

Terms to Know

CIDR Notation # of Hosts # of Class Cs

/27 32 1/8

/26 64 1/4

/25 128 1/2

/24 256 1

/23 512 2

/22 1,024 4

/21 2,048 8

/20 4,096 16

/19 8,192 32

/18 16,384 64

/17 32,768 128

/16 65,536 256 (1 Class B)

/15 131,072 512

/14 262,144 1,024

/13 524,288 2,048

CIDR PC DOS

classful addressing system supernetted subnet mask Internet routing tables

4370c10.fm Page 162 Tuesday, July 13, 2004 6:16 AM

Supernetting and CIDR 163

Review Questions

1. List the two major problems that have challenged the growth of the Internet.

2. Rather than assigning a company one Class B, what did the IANA begin doing?

3. If your company is assigned the four contiguous Class C addresses of 192.168.0.0–192.168.3.0, what is the supernet mask?

4. If your company is assigned the 16 contiguous Class C addresses of 192.168.0.0–192.168.15.0, what is the supernet mask?

5. If you use the supernet mask 255.255.248.0, how many bits is IP going to examine?

6. Instead of having 48 entries in a routing table, how many entries would there be if you use a supernet mask?

7. What is the address 192.168.1.0 with a subnet mask of 255.255.255.224 when converted to CIDR notation?

8. What is the address 192.168.1.0 with a subnet mask of 255.255.255.240 when converted to CIDR notation?

9. What is the address 10.0.0.0 with a subnet mask of 255.255.128.0 when con-verted to CIDR notation?

10. What is the address 176.16.0.0 with a subnet mask of 255.255.128.0 when converted to CIDR notation?

4370c10.fm Page 163 Tuesday, July 13, 2004 6:16 AM

4370c10.fm Page 164 Tuesday, July 13, 2004 6:16 AM

In This Chapter

Chapter 11

Dans le document Foundations TCP/IP (Page 173-181)

Documents relatifs