Subnet a /24 for two LANs, then find a mistyped mask and a gateway outside its subnet

short · 40 min · Packet Tracer · Exam topic 1.3

Task

Carve 192.168.50.0/24 into a /25 for a 100-host LAN and a /26 for a 50-host LAN, address a router and three PCs from your plan, and then find two addressing faults from show commands and the block-size method: a router interface with the wrong mask, and a PC whose default gateway sits outside its own subnet. You also watch IOS refuse a network address and an overlapping subnet. By the end you can work out any interface's network and broadcast address and say why a host can or cannot reach its gateway.

Topology

Devices

Device Model Role
R1 ISR4331 router for both LANs
S1 2960-24TT switch for LAN A
S2 2960-24TT switch for LAN B
PC1 PC-PT LAN A host
PC2 PC-PT LAN A host
PC3 PC-PT LAN B host

Links

From To
R1 G0/0/0 S1 G0/1
R1 G0/0/1 S2 G0/1
PC1 Fa0 S1 Fa0/1
PC2 Fa0 S1 Fa0/2
PC3 Fa0 S2 Fa0/1

Addressing

Device Interface Address Default gateway
R1 G0/0/0 192.168.50.1/25 none
R1 G0/0/1 192.168.50.129/26 none
R1 G0/0/2 192.168.50.100/25 (step 7 only: IOS refuses it, overlap) none
R1 G0/0/2 192.168.50.192/30 (step 7 only: IOS refuses it, network address) none
PC1 NIC 192.168.50.10/25 192.168.50.1
PC2 NIC 192.168.50.20/25 192.168.50.1 (step 6 plants 192.168.50.200)
PC3 NIC 192.168.50.170/26 192.168.50.129

Steps

  1. Plan on paper before you touch Packet Tracer. LAN A needs 100 hosts and LAN B needs 50, both from 192.168.50.0/24, with LAN A first. For each, find the fewest host bits that fit (2 to the power h, minus 2), the prefix, the mask, the block size, the network address, the broadcast address and the usable range. Give each router interface the first usable address. Then check your work against the Addressing table: LAN A is 192.168.50.0/25 (126 hosts, broadcast 192.168.50.127) and LAN B is 192.168.50.128/26 (62 hosts, broadcast 192.168.50.191). Write down what is left over: 192.168.50.192/26.
  2. Place the devices and cable them as the Links table lists, with Copper Straight-Through cables throughout. Configure R1, typing LAN B's mask exactly as the change record gives it (it contains a mistake you will find in step 5):
Router> enable
Router# configure terminal
Router(config)# hostname R1
R1(config)# interface g0/0/0
R1(config-if)# ip address 192.168.50.1 255.255.255.128
R1(config-if)# no shutdown
R1(config-if)# interface g0/0/1
R1(config-if)# ip address 192.168.50.129 255.255.255.224
R1(config-if)# no shutdown
R1(config-if)# end
  1. On each PC open Desktop > IP Configuration, choose Static, and enter the address, mask and gateway from the Addressing table: PC1 192.168.50.10, 255.255.255.128, gateway 192.168.50.1; PC2 192.168.50.20, 255.255.255.128, gateway 192.168.50.1; PC3 192.168.50.170, 255.255.255.192, gateway 192.168.50.129. Wait for every link light to turn green (Fast Forward Time helps).
  2. Test from PC1:
C:\> ping 192.168.50.20
C:\> ping 192.168.50.170

PC2 answers, because it is in PC1's own subnet. PC3 does not: the replies come back as Destination host unreachable from 192.168.50.1, which means R1 itself has nowhere to send the packet. 5. Fault 1, a wrong mask on the router. Read R1's own view of LAN B:

R1# show ip interface brief
R1# show ip interface g0/0/1
R1# show ip route

The brief view shows the address but not the mask, so it looks fine. The detail reads Internet address is 192.168.50.129/27. Work it through: a /27 has a block of 32, so .129 sits in the block 128 to 159, and R1's connected route covers only 192.168.50.128/27. PC3's 192.168.50.170 falls outside it, and R1 has no other route that covers it. Fix the mask and read the route again:

R1# configure terminal
R1(config)# interface g0/0/1
R1(config-if)# ip address 192.168.50.129 255.255.255.192
R1(config-if)# end
R1# show ip route

The connected route now reads 192.168.50.128/26, and the ping from PC1 to 192.168.50.170 succeeds. 6. Fault 2, a gateway outside the host's subnet. On PC2, change only the Default Gateway to 192.168.50.200, as if it had been mistyped. Then from PC2:

C:\> ping 192.168.50.10
C:\> ping 192.168.50.170

PC1 still answers and PC3 does not. Work out why with the block-size method: PC2 is 192.168.50.20/25, in the block 0 to 127, and 192.168.50.200 is in the next block, so PC2 cannot reach its gateway directly. Local traffic works; everything off the subnet fails. Put the gateway back to 192.168.50.1 and ping 192.168.50.170 again: it now replies. 7. Watch IOS refuse two bad addresses. On the unused G0/0/2, try an address inside LAN A's subnet, then the network address of a /30 from the spare block:

R1# configure terminal
R1(config)# interface g0/0/2
R1(config-if)# no shutdown
R1(config-if)# ip address 192.168.50.100 255.255.255.128
% 192.168.50.0 overlaps with GigabitEthernet0/0/0
R1(config-if)# ip address 192.168.50.192 255.255.255.252
Bad mask /30 for address 192.168.50.192
R1(config-if)# end

The first is refused because 192.168.50.0/25 already lives on G0/0/0. The second is refused because, in a /30 with a block of 4, .192 is the network address; the usable pair would be .193 and .194, and .195 is the broadcast. Neither line is stored, so G0/0/2 stays unassigned. 8. Finish with the record a colleague would want: from show ip interface g0/0/0 and show ip interface g0/0/1, write each subnet's network address, broadcast address and number of usable hosts next to your step 1 plan, and confirm they match.

Verify

R1# show ip interface g0/0/1
R1# show ip route
C:\> ping 192.168.50.170

Expected output: Internet address is 192.168.50.129/26 on G0/0/1. In the routing table, the lines 192.168.50.0/25 is directly connected, GigabitEthernet0/0/0 and 192.168.50.128/26 is directly connected, GigabitEthernet0/0/1, with no /27. Run the ping from PC2: it returns Reply from 192.168.50.170 lines (the first may time out while ARP resolves).

Save your work

Save the topology as ccna-lab03-ipv4-subnets.pkt (File > Save As).

Notes

Why step 6 uses 192.168.50.200 and not LAN B's gateway 192.168.50.129: a router answers ARP on behalf of addresses it can route through a different interface (proxy ARP, on by default), so a PC pointed at R1's other interface address can still appear to work. 192.168.50.200 is in the spare block that R1 has no route for, so nothing answers for it and the fault behaves as lesson 3 describes.

This is an independent study companion for the Cisco CCNA 200-301 v2.0 exam and is not produced by or endorsed by Cisco. Cisco, CCNA and IOS are trademarks of Cisco Systems, Inc.

This is an independent study companion for Cisco CCNA 200-301 and is not produced by or endorsed by CompTIA.