IPv4 addressing · Fundamentals · Module 5
Summarization and finding addressing mistakes · page 3 of 3
Show topologyHide topology
Interfaces and addresses · Et = Ethernet. LAN C, LAN D and branch LAN 2 are planned and not cabled yet.
- 192.168.8.0/26 · LAN AR1 Et0/0 192.168.8.1H1 eth0 192.168.8.10
- 192.168.8.64/26 · LAN BR1 Et0/1 192.168.8.65R3 Et0/0 192.168.8.126
- 192.168.9.224/30R1 Et0/2 192.168.9.225R2 Et0/0 192.168.9.226
- 192.168.9.228/31R2 Et0/2 192.168.9.228R4 Et0/0 192.168.9.229
- 192.168.9.0/25 · branch LAN 1 · SW1R2 Et0/1 192.168.9.1no other device yet
- 192.168.9.192/27 · branch LAN 3 · SW2R4 Et0/1 192.168.9.193no other device yet
Device icons joined by plain cables, each cable labeled with its subnet. Down the middle, top to bottom: R3, a router; R1, the HQ router; R2, the branch router; R4, a branch router; and the switch SW2. R3 is cabled to R1 (192.168.8.64/26), R1 to R2 (192.168.9.224/30), R2 to R4 (192.168.9.228/31) and R4 to SW2 (192.168.9.192/27). At the upper left, the host H1, a laptop, is cabled down from its base to R1 (192.168.8.0/26). Left of R2, the switch SW1 is cabled across to it (192.168.9.0/25).
Troubleshoot
Addresses and summaries off the plan
An address or a summary does not fit the plan. What does the router print, and where do you look?
| Check | Good | Broken |
|---|---|---|
Read both ends’ address and mask: show running-config | include ip address on each end | the same mask on both ends | the masks differ |
| Work out each end’s block: its network and broadcast address | both ends in one block | one end’s address is outside the other end’s block |
| Confirm that each address is a host address of its block | between the network and the broadcast address, or on a /31 either of the pair | it is the network or the broadcast address |
Look for overlaps: show ip route with the address, on each router | each address is in one router’s subnet only | a connected route on the wrong router |
Test each summary: show ip route with an address it should cover | the summary’s routing entry | no route, or a summary that is too narrow |
Case 1 of 3.R3 rejects two addresses
Case 1 · Symptom
One day, someone tries two addresses on R3’s LAN B interface, each with the mask of a /26. R3 answers each try with a message.
On R3:
R3#configure terminalEnter configuration commands, one per line. End with CNTL/Z.R3(config)#interface Ethernet0/01R3(config-if)#ip address 192.168.8.64 255.255.255.1922Bad mask /26 for address 192.168.8.643R3(config-if)#ip address 192.168.8.127 255.255.255.1923Bad mask /26 for address 192.168.8.127R3(config-if)#end
- The first try: 192.168.8.64 with the mask of a /26.
- R3 names the mask and the address.
- The second try, 192.168.8.127, gets the same message, for its own address.
Case 1 · Command
Read R3’s address from before the tries: where does LAN B’s block start and end?
Case 1 · Output
On R3, before the tries:
R3#show ip interface Ethernet0/0 | include Internet address1 Internet address is 192.168.8.126/26
- Key line R3 holds 192.168.8.126 with a /26. Under a /26, LAN B’s block runs from .64 to .127.
Case 1 · What it means
Figure 5.4 · Under a /26, LAN B’s first and last addresses, .64 and .127, are its network and broadcast address; R3’s .126 is a host address. LAN B drawn as a bar, not to scale. At its left end an outlined cell “.64”, with “network” under it; at its right end an outlined cell “.127”, with “broadcast” under it. Between them a filled block, “hosts .65 to .126”. A highlighted pin from above, “R3 .126”, points at the right end of the host block. Under the drawing: “LAN B, 192.168.8.64/26”.
- 192.168.8.64 is LAN B’s network address and 192.168.8.127 its broadcast address: the first and the last address of its block.
- Under a /26, neither address is a host address, so neither may go to a device, and the message names the mask that makes it so. R3 rejects both lines, each with
Bad mask /26 for address, and is left unchanged, still on .126. - LAN B’s host addresses run from .65 to .126. R1 holds .65, and the plan gives R3 .126.
Case 1 · Fix
Nothing needs undoing. The line that works is a host address of LAN B: the plan’s 192.168.8.126, with 255.255.255.192. R3 takes it without a message.
On R3, the plan address:
R3#configure terminalEnter configuration commands, one per line. End with CNTL/Z.R3(config)#interface Ethernet0/01R3(config-if)#ip address 192.168.8.126 255.255.255.1922R3(config-if)#end
- The plan’s host address and the mask of a /26.
- Straight back to the prompt: no message.
Case 1 · Proof
R1 tests R3’s address after the two tries and the plan line:
R1#ping 192.168.8.126Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.8.126, timeout is 2 seconds:1!!!!!2Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
- Five exclamation marks: five replies.
Success rate is 100 percent: R3 answers on its plan address.
End of case 1. Solved: R3 keeps its plan address; the rejected lines changed nothing.
Case 2 of 3.R4’s test of branch LAN 1 gets no answer
Case 2 · Symptom
On another day, R4 tests R2’s address in branch LAN 1, 192.168.9.1, and gets no answer.
R4#ping 192.168.9.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.9.1, timeout is 2 seconds:1.....2Success rate is 0 percent (0/5)
- Five dots.
Success rate is 0 percent: no test was answered.
Case 2 · Command
Read R4’s static routes. Which block does its summary cover? Then look up 192.168.9.1 in R4’s table.
Case 2 · Output
On R4:
R4#show ip route static… 13 more lines (see Full output)Gateway of last resort is not set 1S 192.168.8.0/24 [1/0] via 192.168.9.228
- Key line R4’s only static route:
192.168.8.0/24, a /24, toward R2’s192.168.9.228.
Full output · 16 lines
R4#show ip route staticCodes: L - local, C - connected, S - static, 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, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR & - replicated local route overrides by connected Gateway of last resort is not set S 192.168.8.0/24 [1/0] via 192.168.9.228
R4’s table, looked up for 192.168.9.1:
R4#show ip route 192.168.9.11% Subnet not in table
Scroll sideways to see the whole output
- R4 finds no route in its table that covers this address.
- Key line R4’s only static route:
Case 2 · What it means
Figure 5.5 · R4’s /24 route covers HQ’s 192.168.8.0/24 only; for branch LAN 1, 192.168.9.0/25, it has no route. R2, the branch router, at the top, and R4, a branch router, under it, joined by a cable labeled 192.168.9.228/31 right of it. Left of the cable a separate arrow points from R4 up toward R2, labeled “route 192.168.8.0/24”. Under the devices two boxes side by side: HQ’s 192.168.8.0/24 as a plain box with a line over it labeled “covered”, and a box about half as wide for branch LAN 1, highlighted, labeled “no route” above it and “branch LAN 1, 192.168.9.0/25” under it.
- R4’s summary has the mask of a /24, 255.255.255.0. From 192.168.8.0 it covers only the HQ addresses, those that start with 192.168.8. R4’s test of R3 in HQ is still answered.
- Branch LAN 1, 192.168.9.0/25, is outside it. No route on R4 covers 192.168.9.1, so R4 reports
% Subnet not in table. - The summary must cover both third octets, 8 and 9, as 192.168.8.0/23 does.
Case 2 · Fix
Replace the /24 with the /23. A /23 typed from 192.168.9.0 is answered with
%Inconsistent address and mask, because 9 has its last bit set, so the summary must start at 8.On R4, the /23 typed from 192.168.9.0:
R4#configure terminalEnter configuration commands, one per line. End with CNTL/Z.1R4(config)#ip route 192.168.9.0 255.255.254.0 192.168.9.2282%Inconsistent address and maskR4(config)#end
- The summary typed from 192.168.9.0 with the mask of a /23.
- R4’s answer: under this mask, 192.168.9.0 is not the start of a block.
On R4, the configuration lines of the fix:
R4#configure terminalEnter configuration commands, one per line. End with CNTL/Z.1R4(config)#no ip route 192.168.8.0 255.255.255.0 192.168.9.2282R4(config)#ip route 192.168.8.0 255.255.254.0 192.168.9.228R4(config)#end
- Removes the /24 route.
- Adds the /23 summary toward R2’s 192.168.9.228.
Impact These lines remove the old route first, so between them R4 has no route toward HQ for a moment. Typing the new route first would avoid that gap.
Case 2 · Proof
R4 tests 192.168.9.1 after the fix:
R4#ping 192.168.9.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.9.1, timeout is 2 seconds:1!!!!!2Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
- Five exclamation marks: five replies.
Success rate is 100 percent: R2 answers on its branch LAN 1 address, 192.168.9.1, again.
End of case 2. Solved: R4’s summary covers both blocks again.
| Message | Means | Look first |
|---|---|---|
Bad mask /26 for address 192.168.8.64 | not a host address under that mask | the block’s first and last address |
%Inconsistent address and mask | a host bit set in the route’s start | the route’s prefix |
% Subnet not in table | no route in R4’s table covers the address | the summary that should cover it |
Case 3 of 3.R1’s test of R3 gets no answer
Case 3 · Symptom
On another day, R1 tests R3 at its plan address, 192.168.8.126, and gets no answer.
R1#ping 192.168.8.126Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.8.126, timeout is 2 seconds:1.....2Success rate is 0 percent (0/5)
- Five dots.
Success rate is 0 percent: no test was answered.
Case 3 · Command
Run commands to narrow the cause, then choose it.
Choose the next command
Best next command:
R3# show running-config | include ip addressThe test goes to R3’s address: read R3’s address line and work out its block.R3#show running-config | include ip address ip address 192.168.8.190 255.255.255.192 no ip address no ip address no ip address
Scroll sideways to see the whole output
R3#show ip interface Ethernet0/0 | include Internet address Internet address is 192.168.8.190/26
R3#ping 192.168.8.65Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.8.65, timeout is 2 seconds:.....Success rate is 0 percent (0/5)
R3#show ip interface briefInterface IP-Address OK? Method Status ProtocolEthernet0/0 192.168.8.190 YES manual up up Ethernet0/1 unassigned YES unset administratively down down Ethernet0/2 unassigned YES unset administratively down down Ethernet0/3 unassigned YES unset administratively down down
R1#show running-config | include ip address ip address 192.168.8.1 255.255.255.192 ip address 192.168.8.65 255.255.255.192 ip address 192.168.9.225 255.255.255.252 no ip address
Scroll sideways to see the whole output
How to reason it out
Read R3’s address line: 192.168.8.190 with 255.255.255.192, a /26.
Work out its block: 192.168.8.128/26, planned LAN C. R1’s .65 is in LAN B.
Compare with the plan: R3 belongs in LAN B, at 192.168.8.126.
Answer to see what it means, the fix and the proof.
Case 3 · What it means
Figure 5.6 · R3’s .190 lies in planned LAN C, not in LAN B with R1’s .65. HQ’s block as a bar in four equal parts: LAN A and LAN B filled, LAN C and LAN D outlined only and marked “planned”. Ticks under the bar at .0, .64, .128 and .192. Two pins from above: “R1 .65” onto LAN B, and the highlighted “R3 .190” onto LAN C.
- R3’s .190 with a /26 is in .128/26, planned LAN C, from .128 to .191. R3 no longer holds .126.
- R1’s .65 is in LAN B, outside R3’s new block: R3’s test of R1 gets no answer either.
- The address came from the wrong block of the plan: LAN B’s hosts run from .65 to .126, and the plan gives R3 .126.
Case 3 · Fix
Give R3’s LAN B interface its plan address, 192.168.8.126 with 255.255.255.192.
Type a command, or tap one, then run it.
Ticket: R1’s test of R3’s plan address gets no answer. On R3, give the LAN B interface its address from the plan.
Case 3 · Proof
R1 tests 192.168.8.126 after the fix:
R1#ping 192.168.8.126Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.8.126, timeout is 2 seconds:1!!!!!2Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
- Five exclamation marks: five replies.
Success rate is 100 percent: R3 answers on its plan address.
End of case 3. Solved: R3 is back on its plan address in LAN B.
What the cases share follows once you have answered case 3.
Across the cases
Key idea
Read the address, the mask and the block; a summary must start on a boundary of its own block size and cover every network it stands for.
Check
On R2, with every interface as planned:
Tap a line, or “Not in the output”, then submit.
Find the route R2 uses for R4’s LAN address, 192.168.9.193.
R2#show ip route… 13 more lines (see Full output)
Full output · 24 lines
R2#show ip routeCodes: L - local, C - connected, S - static, 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, m - OMP n - NAT, Ni - NAT inside, No - NAT outside, Nd - NAT DIA i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route H - NHRP, G - NHRP registered, g - NHRP registration summary o - ODR, P - periodic downloaded static route, l - LISP a - application route + - replicated route, % - next hop override, p - overrides from PfR & - replicated local route overrides by connected Gateway of last resort is not set S 192.168.8.0/24 [1/0] via 192.168.9.225 192.168.9.0/24 is variably subnetted, 7 subnets, 5 masksC 192.168.9.0/25 is directly connected, Ethernet0/1L 192.168.9.1/32 is directly connected, Ethernet0/1S 192.168.9.192/27 [1/0] via 192.168.9.229C 192.168.9.224/30 is directly connected, Ethernet0/0L 192.168.9.226/32 is directly connected, Ethernet0/0C 192.168.9.228/31 is directly connected, Ethernet0/2L 192.168.9.228/32 is directly connected, Ethernet0/2
Summary
The third octets of HQ and the branch as two rows of bits, 00001000 and 00001001, with the first 7 bits marked as matching and the last one as differing. Under them “16 + 7 bits: 192.168.8.0/23” and “mask 255.255.254.0”, then the two blocks 192.168.8.0/24 and 192.168.9.0/24 inside one outline labeled “192.168.8.0/23 · 512 addresses”. At the foot: “R4 · one route: 192.168.8.0/23”.
- Summarization replaces several routes with one route of a shorter prefix length; a summary covers every address of its block, built or not.
- Find the octet where the networks differ, count the bits they share from the left, and set the bits after them to zero: 192.168.8.0/24 and 192.168.9.0/24 give 192.168.8.0/23.
show ip routeshows a static summary as one S line with a next hop.show ip routewith an address shows the entry that covers it; when R4’s summary was only a /24, the lookup of an address in branch LAN 1 printed% Subnet not in table.- R3 rejected LAN B’s network and broadcast address (
Bad mask /26 for address 192.168.8.64); R4 answered a summary that does not start on its block with%Inconsistent address and mask. - A summary that is too narrow leaves networks out, and an address from the wrong block puts a device outside its LAN: read the address, the mask and the block.
Commands
show ip routea static summary is one S line whose prefix length is shorter than those of the networks it covers, with its next hop.
show ip route 192.168.9.1the route in the table that covers one address, or a line saying, as on R4 here, that none does.
show running-config | include ip addresseach configuration line that holds “ip address”, with the address and then the mask, or no ip address; work out the block of each.
show ip interface Ethernet0/0 | include Internet addressthe same address with its prefix length.