Addressing
Whether you use DHCP or static IP addressing, understanding addressing is a very important skill. As a CCNP Support candidate, assumed skills include basic things such as addressing, subnetting, summarizing, and routing. In this section I take the time to review because too many problems occur because of lack of planning with IP addressing. Proper planning prevents poor performance in all circumstances. Besides, you will need these skills in the Trouble Tickets, but more importantly in the real world.
Chapter 1 covered the basics of IP addressing, discussing the 4.2 billion (232), 32-bit, dotted-decimal format. Table 3-9 reviews classes and masks.
Table 3-9 IP Address Classes and Masks
|
Class and Range |
Decimal Mask |
Bitwise Mask |
0 |
A 11276 |
255.0.0.0 |
/8 |
10 |
B 128191 |
255.255.0.0 |
/16 |
110 |
C 192223 |
255.255.255.0 |
/24 |
Public addresses are registered through your ISP or at http://www.arin.net. ARIN is one of the three regional Internet registries (and is the authority in the United States). RIPE NCC is the authority for Europe, the Middle East, North Africa, and parts of Asia. APNIC is the Asia Pacific Network Information Centre (and is the authority for parts of Asia not under the authority of RIPE NCC). I registered my domain name information with VeriSign and my local ISP hosts the ShoreTraining.com website for me. Take a few minutes and go out to ARIN's website, use their whois tool to do a lookup of any public address you like. An example of a public address is 216.239.51.100, which happens to be one of my favorite search engines. This address falls within the network block of 216.239.32.0 to 216.239.63.255. However, I do not like to pick on public sites, so I will stay with private addresses for the practical studies. Private addresses should not be routed on the Internet, and they fall within the following ranges:
10.0.0.0/8 (10.0.0.0 to 10.255.255.255)
172.16.0.0/12 (172.16.0.0 to 172.31.255.255)
192.168.0.0/16 (192.168.0.0 to 192.168.255.255)
Notice that no matter whether you are using a public or private address, you still need a subnet mask to divide the network and host portion. I am certain you have heard many analogies on this by now, but the most common is probably the street being the network and your house number being a host on the network. Alternatively, look at the address and use your "network tape measure" to measure off the network bits from left to right, or just think of a painter masking off what he does not want to paint.
Look back at Figure 3-1 to review your streets (networks) and houses (hosts). Quickly make a list or table of your networks and hosts as in Table 3-10, because you will soon be changing your IP addressing scheme. Notice how I also included the router interfaces, because they need an address to operate with IP (unless, of course, you are using something like IP unnumbered).
Table 3-10 Current IP Addressing
Network |
Address |
Interface |
192.168.1.0/24 |
192.168.1.1/24 |
r1e0 |
192.168.2.0/24 |
192.168.2.1/24 |
r1s1 |
192.168.3.0/24 |
192.168.3.1/24 |
r3fa2/0 |
192.168.4.0/24 |
192.168.4.1/24 |
r1e1 |
192.168.5.0/24 |
192.168.5.1/24 |
r2s1 |
192.168.6.0/24 |
192.168.6.1/24 |
r2S0 |
10.1.1.0/24 |
10.1.1.1/24 |
r1s0 |
10.2.2.0/24 |
10.2.2.1/24 |
r3s0/3 |
What a waste of address space, you should be thinking to yourself right about now, and if you were using public addresses, that would be more of a waste. Although the problem may not be apparent with a list of networks and hosts, many problems show up later. Keep your table handy; you will continue to examine this. First, however, I want to review subnetting in a little more detail.
Subnetting
From my back yard I can see the Chesapeake Bay Bridge and the eastbound and westbound cars. From Memorial Day to Labor Day is prime beach time. Every Friday night people head for the beach and return home on Sunday. Cars are almost at a standstill on the bridge at those times. Needless to say, this is one huge collision and broadcast domain. Sometimes the Mass Transit Authority (MTA) subnets, and I bet they don't even know it. They borrow temporarily less-congested lanes from the westbound side to send more people down the eastbound side. They also implemented EZPass to let the commuters have their own lanes (like queuing). That is all subnetting is. Now not as many cars (hosts) can travel the westbound side, because MTA borrowed them to make more lanes (subnets) for eastbound traffic. Subnetting is all about borrowing from the host bits to get more networks. Routers handle multiple subnets by partitioning collision and broadcast domains to avoid congestion.
Feel free to review the subnetting examples from Chapter 1, but you may as well put this to practice in your lab. Look at your routing tables to see how they display the networks you are using. Refer to Example 3-34 for mine.
Example 3-34 Chapter 3 Networks
r1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set C 192.168.4.0/24 is directly connected, Ethernet1 R 192.168.5.0/24 [120/1] via 192.168.4.2, 00:00:23, Ethernet1 [120/1] via 192.168.2.2, 00:00:18, Serial1 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks R 10.0.0.0/8 [120/2] via 192.168.4.2, 00:00:24, Ethernet1 R 10.2.2.0/24 [120/1] via 192.168.2.2, 00:00:18, Serial1 C 10.1.1.0/24 is directly connected, Serial0 R 192.168.6.0/24 [120/1] via 192.168.4.2, 00:00:24, Ethernet1 [120/1] via 192.168.2.2, 00:00:18, Serial1 C 192.168.1.0/24 is directly connected, Ethernet0 C 192.168.2.0/24 is directly connected, Serial1 R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:18, Serial1 r2>show ip route ... C 192.168.4.0/24 is directly connected, Ethernet0 C 192.168.5.0/24 is directly connected, Serial1 10.0.0.0/24 is subnetted, 2 subnets R 10.1.1.0 [120/1] via 192.168.4.1, 00:00:08, Ethernet0 R 10.2.2.0 [120/1] via 192.168.6.2, 00:00:23, Serial0 [120/1] via 192.168.5.2, 00:00:23, Serial1 C 192.168.6.0/24 is directly connected, Serial0 R 192.168.1.0/24 [120/1] via 192.168.4.1, 00:00:08, Ethernet0 R 192.168.2.0/24 [120/1] via 192.168.4.1, 00:00:08, Ethernet0 [120/1] via 192.168.6.2, 00:00:23, Serial0 [120/1] via 192.168.5.2, 00:00:23, Serial1 R 192.168.3.0/24 [120/1] via 192.168.6.2, 00:00:23, Serial0 [120/1] via 192.168.5.2, 00:00:23, Serial1 r3>show ip route ... R 192.168.4.0/24 [120/1] via 192.168.2.1, 00:00:17, Serial0/0 [120/1] via 192.168.6.1, 00:00:11, Serial0/1 [120/1] via 192.168.5.1, 00:00:11, Serial0/2 C 192.168.5.0/24 is directly connected, Serial0/2 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks R 10.1.1.0/24 [120/1] via 192.168.2.1, 00:00:17, Serial0/0 R 10.0.0.0/8 [120/2] via 192.168.6.1, 00:00:11, Serial0/1 [120/2] via 192.168.5.1, 00:00:11, Serial0/2 C 10.2.2.0/24 is directly connected, Serial0/3 C 192.168.6.0/24 is directly connected, Serial0/1 R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:18, Serial0/0 C 192.168.2.0/24 is directly connected, Serial0/0 C 192.168.3.0/24 is directly connected, FastEthernet2/0 r4>show ip route ... R 192.168.4.0/24 [120/2] via 10.2.2.1, 00:00:13, Serial0/0 R 192.168.5.0/24 [120/1] via 10.2.2.1, 00:00:14, Serial0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks R 10.1.1.0/24 [120/2] via 10.2.2.1, 00:00:14, Serial0/0 R 10.0.0.0/8 [120/3] via 10.2.2.1, 00:00:14, Serial0/0 C 10.2.2.0/24 is directly connected, Serial0/0 R 192.168.6.0/24 [120/1] via 10.2.2.1, 00:00:14, Serial0/0 R 192.168.1.0/24 [120/2] via 10.2.2.1, 00:00:14, Serial0/0 R 192.168.2.0/24 [120/1] via 10.2.2.1, 00:00:14, Serial0/0 R 192.168.3.0/24 [120/1] via 10.2.2.1, 00:00:14, Serial0/0 r5>show ip route ... R 192.168.4.0/24 [120/1] via 10.1.1.1, 00:00:05, Serial0 R 192.168.5.0/24 [120/2] via 10.1.1.1, 00:00:06, Serial0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks R 10.2.2.0/24 [120/2] via 10.1.1.1, 00:00:06, Serial0 R 10.0.0.0/8 [120/3] via 10.1.1.1, 00:00:06, Serial0 C 10.1.1.0/24 is directly connected, Serial0 R 192.168.6.0/24 [120/2] via 10.1.1.1, 00:00:06, Serial0 R 192.168.1.0/24 [120/1] via 10.1.1.1, 00:00:06, Serial0 R 192.168.2.0/24 [120/1] via 10.1.1.1, 00:00:06, Serial0 R 192.168.3.0/24 [120/2] via 10.1.1.1, 00:00:06, Serial0 r5>
You can apply the shaded output in the preceding example to the other routers, but on r1 I am illustrating that there are multiple paths to subnet 192.168.5.0 and 192.168.6.0. Note how the routing table output shows 10.0.0.0/8, which is the classful mask, with the subnets 10.1.1.0/24 and 10.2.2.0/24 beneath it.
To prepare for the chapter Trouble Tickets, I want you to plan your new addressing scheme using 192.168.5.0/24 as a starting point. You know how many networks and hosts you have, but plan on adding a few more for growth. Do not assume that you can use subnet 0 (the first subnet), the last subnet, or VLSM for now. Write out your calculations as I do in Figure 3-27, but save the actual configuration for the chapter Trouble Tickets. Feel free to expand the binary to truly help you master the subnetting concepts.
Figure 3-27 Subnetting
NOTE
For more practice, go to http://www.learntosubnet.com or return to Chapter 1. When you have mastered these concepts, you can check your work against the subnet calculator at Cisco.com.
You certainly should plan your addresses carefully, and this is more than just compiling an Excel spreadsheet and checking off what you have handed out to everyone. However, what could you do if I told you that I want to take one of the subnets and subdivide it to maximize the number of subnets I can possibly get from it? I tend to reserve subnet 0 for this purpose, so take 192.168.5.0/28 and further subnet it according to the information provided. Figure 3-28 shows my VLSM calculations.
Figure 3-28 VLSM
NOTE
Subnetting and VLSM are all about moving the network mask bit boundary to the right. For every host bit borrowed, the available subnets double and similarly the hosts exponentially decrease, too. When I make a cake for desert and plan on 8 people eating, for example, I would probably cut it into 10 or 12 pieces to make sure I have enough cake (subnets) for all. If I cut the cake into exactly eight pieces, however, and each guest brings a friend, I guess I could perform VLSM on the pieces of cake.
I took the VLSM example from a different approach in that I knew I never needed more than two hosts. So I used the 2x 2 formula to calculate hosts and placed the 0s in the chart first. Tables are helpful to organize such data, as I demonstrate in Table 3-11.
Table 3-11 Subnets, Broadcast Addresses, Hosts, and VLSM Subnets
Subnets |
0 |
16 |
32 |
48 |
64 |
80 |
96 |
... |
224 |
Broadcast |
15 |
31 |
47 |
63 |
79 |
95 |
111 |
... |
239 |
Hosts |
1 14 |
1733 |
3346 |
4962 |
6578 |
8194 |
97110 |
... |
225238 |
VLSM subnets |
0 (12) |
|
|
|
|
|
|
|
|
Some general suggestions I can recommend for VLSM include the following:
Step 1 |
Start with your host requirements. |
Step 2 |
Next calculate for the LAN segments. |
Step 3 |
Then subnet a LAN to get your WANs. |
Step 4 |
More than three levels can get a little too confusing. |
NOTE
Real-world solutions include topics such as proxy servers and Network Address Translation (NAT), which are covered in a little more detail in the Practical Studies Remote Access Guide. A proxy server, for example, has one NIC to the outside world and one to inside network. Requests made by the inside hosts are made to the proxy server to relay the requests and responses. NAT doesn't use a proxy service. Instead, a router running NAT can replace the inside addresses with outside addresses. Finally, both of these techniques can be combined.
Ultimately, besides being neat about things and saving addresses, you want to plan your address scheme so that it is not so stressful on your routing tables. It would be a perfect world if everyone really understood the importance of this. After all, there is more to life than just sharing your cake; you must eat it too. Figure 3-29 offers a hierarchical view of the subnetting and VLSM math you did previously, which will in turn make summarizing a breeze.
Figure 3-29 Summarization
Summarization
Summarization is the real reason you want to pay attention to your addressing scheme. Besides only having a finite number of addresses, routing table growth has just exploded over the years. There are more than 100,000 Internet routes to date. See for yourself in Figures 3-30 and 3-31 or go to a similar site for a more current report. Summarizing enables you to have a single IP address range represent a collection of smaller ranges when deployed hierarchically. Collapsing the routing table is an obvious advantage to summarization, but think about the impact on my network if my routing tables are affected every time a link goes down on your network.
NOTE
Summarization increases stability in that if one of your links flap up and down, my routing tables are not flapping reachable and unreachable. If I have network 192.168.5.0/24 and you have 192.168.7.0/24, for example, I really don't have the need to know about your 192.168.7.4/30. All I care about is to get to 192.168.7. anything I send to you.
Summarization limits the number of routers that need to recalculate routing tables. To determine a summary route, a router determines the high-order (1) bits that match for all addresses. Sometimes this is done on the classful boundary automatically and other times you and I may need to include the appropriate summary statement, depending on the routing protocol.
Figure 3-30 Route Server
Figure 3-31 Classless Interdomain Routing (CIDR) Report
Subnetting, VLSM, summarization, aggregation, supernetting, and CIDR are all about matching bits. Subnetting and VLSM move the network bit boundary to the right, whereas summarization, aggregation, supernetting, and CIDR move the network bit boundary to the left. In Figure 3-32, HQ starts with 192.168.5.0/24 and breaks it down into subnet 192.168.5.32/27 for the Northern Region, 192.168.5.64/27 for the Western Region, 192.168.5.96/27 for the Southern Region, and 192.168.5.128/27 for the Eastern Region. In turn, each of the regions uses VLSM to subnet their Ethernets to a /28 and their serials to a /30. Yet each region can summarize the /27 back to HQ Core.
Figure 3-32 Network Bit Boundaries
The practical addressing examples certainly bring out the mathematics involved, but decreasing the impact on networks attached to the routers and ultimately the hosts connected to various switches is the goal. I address that topic a bit more in Part III, "Supporting Ethernet, Switches, and VLANs." Now I want to quickly review routing protocols so that you can shoot their troubles throughout the book.