Monday, December 13, 2010

Variable Length Subnet Masks (VLSMs) Network Bulls India's Best Networking Training Institute in Gurgaon Delhi

Network Bulls
www.networkbulls.com
Best Institute for CCNA CCNP CCSP CCIP CCIE Training in India
M-44, Old Dlf, Sector-14 Gurgaon, Haryana, India
Call: +91-9654672192


I could easily devote an entire chapter to Variable Length Subnet Masks (VLSMs), but instead
I’m going to show you a simple way to take one network and create many networks using subnet
masks of different lengths on different types of network designs. This is called VLSM networking,
and it does bring up another subject I mentioned at the beginning of this chapter:
classful and classless networking.
Neither RIPv1 nor IGRP routing protocols have a field for subnet information, so the subnet
information gets dropped. What this means is that if a router running RIP has a subnet mask of
a certain value, it assumes that all interfaces within the classful address space have the same subnet
mask. This is called classful routing, and RIP and IGRP are both considered classful routing
protocols. (I’ll be talking more about RIP and IGRP in Chapter 6, “IP Routing.”) If you mix and
match subnet mask lengths in a network running RIP or IGRP, that network just won’t work!
Classless routing protocols, however, do support the advertisement of subnet information.
Therefore, you can use VLSM with routing protocols such as RIPv2, EIGRP, and OSPF. The
benefit of this type of network is that you save a bunch of IP address space with it.
As the name suggests, with VLSMs we can have different subnet masks for different router
interfaces. Look at Figure 3.3 to see an example of why classful network designs are inefficient.
Last host 10.255.255.62 10.255.255.126 10.255.255.190 10.255.255.254
Broadcast 10.255.255.63 10.255.255.127 10.255.255.191 10.255.255.255
142 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
FIGURE 3 . 3 Typical classful network
Looking at this figure, you’ll notice that we have two routers, each with two LANs and connected
together with a WAN serial link. In a typical classful network design (RIP or IGRP
routing protocols), you could subnet a network like this:
192.168.10.0 = Network
255.255.255.240 (/28) = Mask
Our subnets would be (you know this part, right?) 0, 16, 32, 48, 64, 80, etc. This allows us
to assign 16 subnets to our internetwork. But how many hosts would be available on each network?
Well, as you probably know by now, each subnet provides only 14 hosts. This means that
each LAN has 14 valid hosts available—one LAN doesn’t even have enough addresses needed
for all the hosts! But the point-to-point WAN link also has 14 valid hosts. It’s too bad we can’t
just nick some valid hosts from that WAN link and give them to our LANs!
All hosts and router interfaces have the same subnet mask—again, this is called classful
routing. And if we want this network to be more efficient, we definitely need to add different
masks to each router interface.
But there’s still another problem—the link between the two routers will never use more
than two valid hosts! This wastes valuable IP address space, and it’s the big reason I’m going
to talk to you about VLSM network design.
VLSM Design
Let’s take Figure 3.3 and use a classless design…which will become the new network shown in
Figure 3.4. In the previous example, we wasted address space—one LAN didn’t have enough
addresses because every router interface and host used the same subnet mask. Not so good.
What would be good is to provide only the needed number of hosts on each router interface.
To do this, we use what are referred to as Variable Length Subnet Masks (VLSMs).
Now remember that we can use different size masks on each router interface. And if we use a
/30 on our WAN links and a /27, /28, and /29 on our LANs, we’ll get 2 hosts per WAN interface
.34 .35 .66 .67
192.168.10.32/28
.2 .3 .18 .19
.33 .49 .50 .65
192.168.10.64/28
192.168.10.0/28 192.168.10.16/28
.1 .17
(6 hosts) (10 hosts)
(2 hosts)
192.168.10.48/28
(25 hosts) (12 hosts)
Variable Length Subnet Masks (VLSMs) 143
and 30, 14, and 8 hosts per LAN interface—nice! This makes a huge difference—not only can we
get just the right amount of hosts on each LAN, we still have room to add more WANs and LANs
using this same network!
FIGURE 3 . 4 Classless network design
Remember, in order to implement a VLSM design on your network, you need
to have a routing protocol that sends subnet mask information with the route
updates. This would be RIPv2, EIGRP, and OSPF. RIPv1 and IGRP will not work
in classless networks and are considered classful routing protocols.
Why Bother with VLSM Design?
You have just been hired by a new company and need to add on to the existing network. There
is no problem with starting over with a new IP address scheme. Should you use a VLSM classless
network or a classful network?
Let’s just say you happen to have plenty of address space because you are using the Class A
10.0.0.0 private network address in your corporate environment and can’t even come close to
imagining that you’d ever run out of IP addresses. Why would you want to bother with the
VLSM design process?
Good question. There’s a good answer too!
.66 .67 .50 .51
192.168.10.64/29
.2 .3 .45 .35
.65 .73 .74 .49
192.168.10.48/28
192.168.10.0/27 192.168.10.32/28
.1 .33
(6 hosts) (10 hosts)
(2 hosts)
192.168.10.72/30
(25 hosts) (12 hosts)
144 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
Implementing VLSM Networks
To create VLSMs quickly and efficiently, you need to understand how block sizes and charts
work together to create the VLSM masks. Table 3.3 shows you the block sizes used when creating
VLSMs with Class C networks. For example, if you need 25 hosts, then you’ll need a
block size of 32. If you need 11 hosts, you’ll use a block size of 16. Need 40 hosts? Then you’ll
need a block of 64. You cannot just make up block sizes—they’ve got to be the block sizes
shown in Table 3.3. So memorize the block sizes in this table—it’s easy. They’re the same
numbers we used with subnetting!
The next step is to create a VLSM table. Figure 3.5 shows you the table used in creating a
VLSM network. The reason we use this table is so we don’t accidentally overlap networks.
Because by creating contiguous blocks of addresses to specific areas of your network, you
can then easily summarize your network and keep route updates with a routing protocol to a
minimum. Why would anyone want to advertise hundreds of networks between buildings
when you can just send one summary route between buildings and achieve the same result?
If you’re confused about what summary routes are, let me explain. Summarization, also
called supernetting, provides route updates in the most efficient way possible by advertising
many routes in one advertisement instead of individually. This saves a ton of bandwidth and
minimizes router processing. As always, you use blocks of addresses (remember that block
sizes are used in all sorts of networks) to configure your summary routes and watch your network’s
performance hum.
But know that summarization works only if you design your network carefully. If you carelessly
hand out IP subnets to any location on the network, you’ll notice straight away that you
no longer have any summary boundaries. And you won’t get very far with creating summary
routes without those, so watch your step!
TABLE 3 . 3 Block Sizes
Prefix Mask Hosts Block Size
/25 128 126 128
/26 192 62 64
/27 224 30 32
/28 240 14 16
/29 248 6 8
/30 252 2 4
Variable Length Subnet Masks (VLSMs) 145
FIGURE 3 . 5 The VLSM table
Variable Length Subnet Masks Worksheet
Subnet Mask Subnets Hosts Block
/26
/27
/28
/29
/30
192
224
240
248
252
4
8
16
32
64
62
30
14
6
2
64
32
16
8
4
048
12
16
20
24
28
32
36
40
44
48
52
56
60
64
68
72
76
80
84
88
92
96
100
104
108
112
116
120
124
128
132
136
140
144
148
152
156
160
154
158
172
176
180
184
188
192
196
200
204
208
212
216
220
224
228
232
236
240
244
248
252
256
Class C Network 192.168.10.0
Network Hosts Block Subnet Mask
A
B
C
D
E
F
G
H
I
J
K
L
MNetwork Hosts Block Subnet Mask
146 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
You’ll find the sheet shown in Figure 3.5 very valuable because it lists every block size you
can use for a network address. Notice that the block sizes are listed starting from a block size
of 4 all the way to a block size of 128. If you have two networks with block sizes of 128, you’ll
quickly see that you can have only two networks. With a block size of 64, you can have only
4 networks, and so on, all the way to having 64 networks if you use only block sizes of 4.
Remember that this takes into account that you are using the command ip subnet-zero in
your network design.
Now, just fill in the chart in the lower-left corner, and then add the subnets to the worksheet
and you’re good to go.
So let’s take what we’ve learned so far about our block sizes and VLSM table and create a
VLSM using the Class C network address 192.168.10.0 for the network in Figure 3.6. Then
fill out the VLSM table, as shown in Figure 3.7.
FIGURE 3 . 6 A VLSM network, example 1
In Figure 3.6, we have four WAN links and four LANs connected together. We need to create
a VLSM network that will allow us to save address space. Looks like we have two block sizes
of 32, a block size of 16, and a block size of 8, and our WANs each have a block size of 4. Take
a look and see how I filled out our VLSM chart in Figure 3.7.
192.168.10.112/30
2 hosts
Network H
Lab_D
Lab_A
F0/0
F0/0
192.168.10.8/29
Lab_E
Lab_B
F0/0
F0/0
192.168.10.32/27
192.168.10.104/30
2 hosts
Network F
192.168.10.16/28
192.168.10.64/27
30 hosts
Network B
20 hosts
Network C
6 hosts
Network D
14 hosts
Network A
192.168.10.100/30
2 hosts
Network E
2 hosts
Network G
192.168.10.108/30
Variable Length Subnet Masks (VLSMs) 147
FIGURE 3 . 7 A VLSM table, example 1
Variable Length Subnet Masks Worksheet
Subnet Mask Subnets Hosts Block
/26
/27
/28
/29
/30
192
224
240
248
252
4
8
16
32
64
62
30
14
6
2
64
32
16
8
4
048
12
16
20
24
28
32
36
40
44
48
52
56
60
64
68
72
76
80
84
88
92
96
100
104
108
112
116
120
124
128
132
136
140
144
148
152
156
160
154
158
172
176
180
184
188
192
196
200
204
208
212
216
220
224
228
232
236
240
244
248
252
256
Class C Network 192.16.10.0
Network Hosts Block Subnet Mask
A
B
C
D
E
F
G
H
12
20
25
4
2
2
2
2
16
32
32
8
4
4
4
4
/28
/27
/27
/29
/30
/30
/30
/30
240
224
224
248
252
252
252
252
E - 192.16.10.96/30
F - 192.16.10.100/30
G - 192.16.10.104/30
H - 192.16.10.108/30
D - 192.16.10.8/29
A - 192.16.10.16/28
B - 192.16.10.32/27
C - 192.16.10.64/27
148 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
We still have plenty of room for growth with this VLSM network design. We never could
accomplish that with one subnet mask using classful routing. Let’s do another one. Figure 3.8
shows a network with 11 networks, two block sizes of 64, one of 32, five of 16, and three of 4.
FIGURE 3 . 8 VLSM network, example 2
First, create your VLSM table and use your block size chart to fill in the table with the subnets
you need. Figure 3.9 shows a possible solution.
Notice that we filled in this entire chart and only have room for one more block size of 4!
Only with a VLSM network can you provide this type of address space savings.
Keep in mind that it doesn’t matter where you start your block sizes as long as you always
count from zero. For example, if you had a block size of 16, you must start at 0 and count from
there—0, 16, 32, 48, etc. You can’t start a block size of 16 from, say, 40 or anything other than
increments of 16.
Here’s another example. If you had block sizes of 32, you must start at zero like this: 0, 32,
64, 96, etc. Just remember that you don’t get to start wherever you want; you must always
start counting from zero. In the example in Figure 3.9, I started at 64 and 128, with my two
block sizes of 64. I didn’t have much choice, because my options are 0, 64, 128, and 192.
However, I added the block size of 32, 16, 8, and 4 wherever I wanted just as long as they were
in the correct increments of that block size.
Okay—you have three locations you need to address, and the IP network you have received
is 192.168.55.0 to use as the addressing for the entire network. You’ll use ip subnet-zero
and RIPv2 as the routing protocol. (RIPv2 supports VLSM networks, RIPv1 does not—both
of them will be discussed in Chapter 6.) Figure 3.10 shows the network diagram and the
IP address of the RouterA S0/0 interface.
Corp
SF
Fa0/1
Fa0/0
Fa0/0 Fa0/1 Fa0/0 Fa0/1
Fa0/3 Fa0/0
Bldg1
NY
Fa0/2
Fa0/0
Net = B
10 hosts
Net = C
12 hosts
2 hosts
Net = D
12 hosts
Net = G
2 hosts
Net = E
2 hosts
Net = F
30 hosts
Net = A
60 hosts
Net = H
14 hosts
Net = I
60 hosts
Net = J
8 hosts
Net = K
A: /27
B: /28
C: /28
D: /30
E: /30
F: /30
G: /28
H: /26
I: /28
J: /26
K: /28
Variable Length Subnet Masks (VLSMs) 149
FIGURE 3 . 9 VLSM table, example 2
Variable Length Subnet Masks Worksheet
Subnet Mask Subnets Hosts Block
/26
/27
/28
/29
/30
192
224
240
248
252
4
8
16
32
64
62
30
14
6
2
64
32
16
8
4
048
12
16
20
24
28
32
36
40
44
48
52
56
60
64
68
72
76
80
84
88
92
96
100
104
108
112
116
120
124
128
132
136
140
144
148
152
156
160
154
158
172
176
180
184
188
192
196
200
204
208
212
216
220
224
228
232
236
240
244
248
252
256
Class C Network 192.168.10.0
Network Hosts Block Subnet Mask
A
B
C
D
E
F
G
H
I
J
K
L
M
30
10
12
2
2
2
12
60
14
60
8
32
16
16
4
4
4
16
64
16
64
16
32
0
16
244
248
252
208
64
192
128
224
224
240
240
252
252
252
240
192
240
192
240
30
10
B - 192.16.10.0/28
C - 192.16.10.16/28
A - 192.16.10.32/27
H - 192.16.10.64/26
J - 192.16.10.128/26
I - 192.16.10.192/28
G - 192.16.10.208/28
K - 192.16.10.224/28
D - 192.16.10.244/30
E - 192.16.10.248/30
F - 192.16.10.252/30
150 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
FIGURE 3 . 1 0 VLSM design example
From the list of IP addresses on the right of the figure, which IP address will be placed in
each router’s FastEthernet 0/0 interface and serial 0/1 of RouterB?
To answer this question, first look for clues in Figure 3.10. The first clue is that interface
S0/0 on RouterA has IP address 192.168.55.2/30 assigned, which makes for an easy answer.
A /30, as you know, is 255.255.255.252, which gives you a block size of 4. Your subnets are
0, 4, 8, etc. Since the known host has an IP address of 2, the only other valid host in the zero
subnet is 1, so the third answer down is what you want for the s0/1 interface of RouterB.
The next clues are the listed number of hosts for each of the LANs. RouterA needs 7 hosts,
a block size of 16 (/28); RouterB needs 90 hosts, a block size of 128 (/25); and RouterC needs
23 hosts, a block size of 32 (/27).
Figure 3.11 shows the answers to this question.
FIGURE 3 . 1 1 Solution to VLSM design example
RouterA
7 hosts
RouterB
90 hosts
192.168.55.57/27
192.168.55.29/28
192.168.55.1/30
192.168.55.132/25
192.168.55.0/30
192.168.55.127/26
S0/0
RouterC
23 hosts
F0/0:
S0/1:
F0/0: F0/0:
192.168.55.2/30
RouterA
7 hosts
RouterB
90 hosts
S0/0
RouterC
23 hosts
F0/0:
192.168.55.29/28
F0/0:
192.168.55.132/25
F0/0:
192.168.55.57/27
S0/1: 192.168.55.1/30
192.168.55.2/30
Variable Length Subnet Masks (VLSMs) 151
Once you figured out the block size needed for each LAN, this was actually a pretty simple
question—all you need to do is look for the right clues and, of course, know your block sizes.
One last example on VLSM design before we move on to summarization. Figure 3.12
shows three routers, all running RIPv2. Which Class C addressing scheme would you use
to satisfy the needs of this network yet save as much address space as possible?
FIGURE 3 . 1 2 VLSM design example 2
This is a really sweet network, just waiting for you to fill out the chart. There are block sizes
of 64, 32, and 16 and two block sizes of 4. This should be a slam dunk for you. Take a look
at my answer in Figure 3.13.
FIGURE 3 . 1 3 Solution to VLSM design example 2
4: Serial 1 5: Serial 2
60 hosts
Net 1
30 hosts
Net 2
12 hosts
Net 3
1: 192.168.10.0/26
2: 192.168.10.64/27
3: 192.168.10.96/28
4: 192.168.10.112/30
5: 192.168.10.116/30
-chart cut in interest of brevity-
048
12
16
20
24
28
32
36
40
44
48
52
56
60
64
68
72
76
80
84
88
92
96
100
104
108
112
116
120
124
128
152 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
This is what I did: Starting at subnet 0, I used the block size of 64. (I didn’t have to—I could
have started with a block size of 4, but I usually like to start with the largest block size and
move to the smallest.) Okay, then I added the block sizes of 32 and 16 and the two block sizes
of 4. There’s still a lot of room to add subnets to this network—very cool!
Can You VLSM in Your Head to Fix a Design?
I know, this sounds ridiculous. But it is possible. If you understand bock sizes, anything is possible,
even this. So let’s use our block size knowledge and VLSM understanding to take a look
at a network diagram and easily determine what could have been designed better by the network
administrator. Figure 3.14 is a network that a junior network administrator has
designed and tried to implement.
FIGURE 3 . 1 4 A junior network administrator design
There is nothing in Figure 3.14 that requires us to use a single network-wide mask. With
this in mind, what can you see right away that is wrong with this design?
First, area 1’s problem is pretty obvious, right? It is a /24, which means that you can only
have 254 hosts—regardless of the class of address. Area 1 needs to support 500 hosts, so
you’ll need at least a /23 (using a Class A or B network address), or an even better answer
would be to break up the area into smaller broadcast domains.
Second, couldn’t we use a /25 or /26 in area 2? There are 60 users and a /26 would provide
us the 62 hosts we need. However, we always want to provide growth potential, so a /25
(providing 126 hosts) would be the best answer.
Area three actually seems to be okay IP-wise, but the administrator is using hubs. We can
use the /24 in area 3, but need to upgrade to switches.
Last, the link between the two routers is a /26, which provides 62 hosts. There are only two
host addresses needed, so we can change that link to a /30, which provides only 2 hosts.
192.168.10.0/26
500 users
192.168.10.0/24
Area 1 Area 2
Area 3
60 users
192.168.20.0/24
200 users
192.168.30.0/24
Troubleshooting IP Addressing 153
See? We can VLSM in our head! All we need to remember is our block sizes and what mask
each block sizes correlates to (and slash notation) and we’re golden.
Troubleshooting IP Addressing
Troubleshooting IP addressing is obviously an important skill because running into trouble
somewhere along the way is pretty much a sure thing, and it’s going to happen to you. No—
I’m not a pessimist; I’m just keeping it real. Because of this nasty fact, it will be great when you
can save the day because you can both figure out (diagnose) the problem and fix it on an IP
network whether you’re at work or at home!
So this is where I’m going to show you the “Cisco way” of troubleshooting IP addressing.
Let’s use Figure 3.15 as an example of your basic IP trouble—poor Sally can’t log in to the Windows
server. Do you deal with this by calling the Microsoft team to tell them their server is a pile
of junk and causing all your problems? Probably not such a great idea—let’s first double-check
our network instead.
FIGURE 3 . 1 5 Basic IP troubleshooting
Okay, let’s get started by going over the troubleshooting steps that Cisco follows. They’re
pretty simple, but important nonetheless. Pretend you’re at a customer host and they’re complaining
that they can’t communicate to a server that just happens to be on a remote network.
Here are the four troubleshooting steps Cisco recommends:
1. Open a DOS window and ping 127.0.0.1. This is the diagnostic, or loopback, address,
and if you get a successful ping, your IP stack is considered to be initialized. If it fails, then
you have an IP stack failure and need to reinstall TCP/IP on the host.
C:\>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
The Ethernet networks connected to router R1 are being
summarized to R2 as 192.168.144.0/20.
Which IP addresses will R2 forward to R1 according to
this summary?
192.168.144.0/20
R1 R2
154 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
2. From the DOS window, ping the IP address of the local host. If that’s successful, your network
interface card (NIC) is functioning. If it fails, there is a problem with the NIC. Success
here doesn’t mean that a cable is plugged into the NIC, only that the IP protocol stack
on the host can communicate to the NIC (via the LAN driver).
C:\>ping 172.16.10.2
Pinging 172.16.10.2 with 32 bytes of data:
Reply from 172.16.10.2: bytes=32 time<1ms TTL=128
Reply from 172.16.10.2: bytes=32 time<1ms TTL=128
Reply from 172.16.10.2: bytes=32 time<1ms TTL=128
Reply from 172.16.10.2: bytes=32 time<1ms TTL=128
Ping statistics for 172.16.10.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
3. From the DOS window, ping the default gateway (router). If the ping works, it means that the
NIC is plugged into the network and can communicate on the local network. If it fails, you
have a local physical network problem that could be anywhere from the NIC to the router.
C:\>ping 172.16.10.1
Pinging 172.16.10.1 with 32 bytes of data:
Reply from 172.16.10.1: bytes=32 time<1ms TTL=128
Reply from 172.16.10.1: bytes=32 time<1ms TTL=128
Reply from 172.16.10.1: bytes=32 time<1ms TTL=128
Reply from 172.16.10.1: bytes=32 time<1ms TTL=128
Ping statistics for 172.16.10.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
4. If steps 1 through 3 were successful, try to ping the remote server. If that works, then you
know that you have IP communication between the local host and the remote server. You
also know that the remote physical network is working.
C:\>ping 172.16.20.2
Pinging 172.16.20.2 with 32 bytes of data:
Reply from 172.16.20.2: bytes=32 time<1ms TTL=128
Reply from 172.16.20.2: bytes=32 time<1ms TTL=128
Reply from 172.16.20.2: bytes=32 time<1ms TTL=128
Troubleshooting IP Addressing 155
Reply from 172.16.20.2: bytes=32 time<1ms TTL=128
Ping statistics for 172.16.20.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
If the user still can’t communicate with the server after steps 1 through 4 are successful, you
probably have some type of name resolution problem and need to check your Domain Name System
(DNS) settings. But if the ping to the remote server fails, then you know you have some type
of remote physical network problem and need to go to the server and work through steps 1
through 3 until you find the snag.
Before we move on to determining IP address problems and how to fix them, I just want to
mention some basic DOS commands that you can use to help troubleshoot your network from
both a PC and a Cisco router (the commands might do the same thing, but they are implemented
differently).
Packet InterNet Groper (ping) Uses ICMP echo request and replies to test if a node IP stack
is initialized and alive on the network. Does a basic test of the host’s TCP/IP protocol stack.
If you want to test your host’s IP stack, you would ping 127.0.0.1.
traceroute Displays the list of routers on a path to a network destination by using TTL
time-outs and ICMP error messages. This command will not work from a DOS prompt.
tracert Same command as traceroute, but it’s a Microsoft Windows command and will
not work on a Cisco router. It is critical that you remember where the commands traceroute
and tracert are used.
telnet Tests the virtual teletype (VTY) configuration. Makes your host a dumb-host and
allows you to run programs on a remote host. If you can telnet from one host to another, both
hosts have good TCP/IP connectivity.
arp -a Displays IP-to-MAC-address mappings on a Windows PC.
show ip arp Same command as arp -a, but displays the ARP table on a Cisco router.
Like the commands traceroute and tracert, they are not interchangeable through DOS
and Cisco.
ipconfig /all Used only from a DOS prompt and displays the PC network configuration.
Once you’ve gone through all these steps and used the appropriate DOS commands, if necessary,
what do you do if you find a problem? How do you go about fixing an IP address configuration
error? Let’s move on and discuss how to determine the IP address problems and
how to fix them.
Determining IP Address Problems
It’s common for a host, router, or other network device to be configured with the wrong
IP address, subnet mask, or default gateway. Because this happens way too often, I’m going
to teach you how to both determine and fix IP address configuration errors.
156 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
Once you’ve worked through the four basic steps of troubleshooting and determined
there’s a problem, you obviously then need to find and fix it. It really helps to draw out the
network and IP addressing scheme. If it’s already done, consider yourself lucky and go buy a
lottery ticket, because although it should be done, it rarely is. And if it is, it’s usually outdated
or inaccurate anyway. Typically it is not done, and you’ll probably just have to bite the bullet
and start from scratch.
I’ll show you how to draw out your network using CDP in Chapter 5, “Managing
a Cisco Internetwork.”
Once you have your network accurately drawn out, including the IP addressing scheme,
you need to verify each host’s IP address, mask, and default gateway address to determine the
problem. (I’m assuming that you don’t have a physical problem or that if you did, you’ve
already fixed it.)
Let’s check out the example illustrated in Figure 3.16. A user in the sales department calls
and tells you that she can’t get to ServerA in the marketing department. You ask her if she can
get to ServerB in the marketing department, but she doesn’t know because she doesn’t have
rights to log on to that server. What do you do?
FIGURE 3 . 1 6 IP address problem 1
You ask the client to go through the four troubleshooting steps that you learned about in the
preceding section. Steps 1 through 3 work, but step 4 fails. By looking at the figure, can you
determine the problem? Look for clues in the network drawing. First, the WAN link between the
Lab_A router and the Lab_B router shows the mask as a /27. You should already know that this
mask is 255.255.255.224 and then determine that all networks are using this mask. The network
address is 192.168.1.0. What are our valid subnets and hosts? 256 – 224 = 32, so this
1900
Lab_A
F0/27
F0/26
F0/0
S0/0
192.168.1.97/27 192.168.1.100/27
S0/0
DCE
S0/1
DCE
192.168.1.62
2950
Lab_B
F0/2 F0/3
F0/1
F0/0 192.168.1.95
192.168.1.33
Default gateway:
192.168.1 62
ServerA
192.168.1.66
Default gateway:
192.168.1.95
ServerB
192.168.1.65
Default gateway
192.168.1.95
Sales Marketing
Troubleshooting IP Addressing 157
makes our subnets 32, 64, 96, 128, etc. So, by looking at the figure, you can see that subnet
32 is being used by the sales department, the WAN link is using subnet 96, and the marketing
department is using subnet 64.
Now you’ve got to determine what the valid host ranges are for each subnet. From what
you learned at the beginning of this chapter, you should now be able to easily determine the
subnet address, broadcast addresses, and valid host ranges. The valid hosts for the Sales LAN
are 33 through 62—the broadcast address is 63 because the next subnet is 64, right? For the
Marketing LAN, the valid hosts are 65 through 94 (broadcast 95), and for the WAN link, 97
through 126 (broadcast 127). By looking at the figure, you can determine that the default gateway
on the Lab_B router is incorrect. That address is the broadcast address of the 64 subnet,
so there’s no way it could be a valid host.
Did you get all that? Maybe we should try another one, just to make sure. Figure 3.17
shows a network problem. A user in the Sales LAN can’t get to ServerB. You have the user run
through the four basic troubleshooting steps and find that the host can communicate to the
local network but not to the remote network. Find and define the IP addressing problem.
FIGURE 3 . 1 7 IP address problem 2
If you use the same steps used to solve the last problem, you can see first that the WAN link
again provides the subnet mask to use— /29, or 255.255.255.248. You need to determine
what the valid subnets, broadcast addresses, and valid host ranges are to solve this problem.
The 248 mask is a block size of 8 (256 – 248 = 8), so the subnets both start and increment
in multiples of 8. By looking at the figure, you see that the Sales LAN is in the 24 subnet, the
WAN is in the 40 subnet, and the Marketing LAN is in the 80 subnet. Can you see the problem
yet? The valid host range for the Sales LAN is 25–30, and the configuration appears correct.
The valid host range for the WAN link is 41–46, and this also appears correct. The valid host
range for the 80 subnet is 81–86, with a broadcast address of 87 because the next subnet is 88.
ServerB has been configured with the broadcast address of the subnet.
1900
Lab_A
F0/27
F0/26
F0/0
S0/0
192.168.1.41/29 192.168.1.46/29
S0/0
DCE
S0/1
DCE
192.168.1.30
2950
Lab_B
F0/2 F0/3
F0/1
F0/0 192.168.1.81
192.168.1.25
Default gateway:
192.168.1.30
ServerA
192.168.1.86
Default gateway:
192.168.1.81
ServerB
192.168.1.87
Default gateway:
192.168.1.81
Sales Marketing
158 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
Okay, now that you can figure out misconfigured IP addresses on hosts, what do you do
if a host doesn’t have an IP address and you need to assign one? What you need to do is look
at other hosts on the LAN and figure out the network, mask, and default gateway. Let’s take
a look at a couple of examples of how to find and apply valid IP addresses to hosts.
You need to assign a server and router IP addresses on a LAN. The subnet assigned on that
segment is 192.168.20.24/29, and the router needs to be assigned the first usable address and
the server the last valid host ID. What are the IP address, mask, and default gateway assigned
to the server?
To answer this, you must know that a /29 is a 255.255.255.248 mask, which provides a
block size of 8. The subnet is known as 24, the next subnet in a block of 8 is 32, so the broadcast
address of the 24 subnet is 31, which makes the valid host range 25–30.
Server IP address: 192.168.20.30
Server mask: 255.255.255.248
Default gateway: 192.168.20.25 (router’s IP address)
As another example, let’s take a look at Figure 3.18 and solve this problem.
FIGURE 3 . 1 8 Find the valid host.
Look at the router’s IP address on Ethernet0. What IP address, subnet mask, and valid host
range could be assigned to the host?
The IP address of the router’s Ethernet0 is 192.168.10.33/27. As you already know, a /27 is
a 224 mask with a block size of 32. The router’s interface is in the 32 subnet. The next subnet
is 64, so that makes the broadcast address of the 32 subnet 63 and the valid host range 33–62.
Host IP address: 192.168.10.34–62 (any address in the range except for 33, which is
assigned to the router)
Mask: 255.255.255.224
Default gateway: 192.168.10.33
Figure 3.19 shows two routers with Ethernet configurations already assigned. What are the
host addresses and subnet masks of hosts A and B?
RouterA
HostA
E0: 192.168.10.33/27
Troubleshooting IP Addressing 159
FIGURE 3 . 1 9 Find the valid host 2.
RouterA has an IP address of 192.168.10.65/26 and RouterB has an IP address
of 192.168.10.33/28. What are the host configurations? RouterA Ethernet0 is in the
192.168.10.64 subnet and RouterB Ethernet0 is in the 192.168.10.32 network.
HostA IP address: 192.168.10.66–126
HostA mask: 255.255.255.192
HostA default gateway: 192.168.10.65
HostB IP address: 192.168.10.34–46
HostB mask: 255.255.255.240
HostB default gateway: 192.168.10.33
Just a couple more examples and then this chapter is history. Hang in there!
Figure 3.20 shows two routers; you need to configure the S0/0 interface on RouterA. The
network assigned to the serial link is 172.16.17.0/22. What IP address can be assigned?
FIGURE 3 . 2 0 Find the valid host address 3
First, you must know that a /22 CIDR is 255.255.252.0, which makes a block size of 4 in the
third octet. Since 17 is listed, the available range is 16.1 through 19.254; so, for example, the IP
address S0/0 could be 172.16.18.255 since that’s within the range.
In Figure 3.21, why can’t HostA communicate with HostB?
RouterB
HostB
E0: 192.168.10.33/28
RouterA
HostA
E0: 192.168.10.65/26
RouterA RouterB
S0/0 S0/0
172.16.17.0/22
160 Chapter 3 IP Subnetting, Variable Length Subnet Masks (VLSMs),
FIGURE 3 . 2 1 IP Communication Problem
Again, what is your mask? That is always how you should start. Then you want to figure out
the block size in the interesting octet. A /27 is 255.255.255.224, which is a block size of 32 in the
fourth octet. The subnets are 0, 32, 64, 96, etc. By looking at the figure, you can see that the HostA
LAN is in the 32 subnet, the WAN is in the 64 subnet and the HostB LAN is connected to the
96 subnet. Right away you should see that the WAN connection is not configured correctly.
RouterA’s serial 0/0 is configured with an IP address in the HostA LAN subnet range.
Okay, last one! You have one Class C network ID and you need to provide one usable subnet
per city while allowing enough usable host addresses for each city specified in Figure 3.22.
What is your mask?
Actually, this is probably the easiest thing you’ve done all day! I count 5 subnets needed and
the Wyoming office needs 16 users (always look for the network that needs the most hosts).
What block size is needed for the Wyoming office? 32. (Remember, you cannot use a block
size of 16 because you always have to subtract 2!) What mask provides you with a block size
of 32? 224. Bingo! This provides 8 subnets, each with 30 hosts.

No comments:

Post a Comment