Repository navigation
Lab 8.1
lab was done in Packet Tracer
Objective: observe the implications of internetworking when connecting multiple routers, and configure static routes so packets can cross multiple routers to a remote network
| Router | Interface | IP Address | Connects to |
|---|---|---|---|
| R1 | Fa0/1 | 192.168.20.1 | LAN 192.168.20.0/24 |
| R1 | Se0/0/0 | 10.10.20.1 | R2 |
| R1 | Se0/0/1 | 10.10.10.1 | R3 |
| R2 | Fa0/0 | 192.168.30.1 | LAN 192.168.30.0/24 (PC0) |
| R2 | Se0/0/0 | 10.10.20.2 | R1 |
| R3 | Fa0/0 | 192.168.10.1 | LAN 192.168.10.0/24 |
| R3 | Se0/0/0 | 10.10.10.2 | R1 |
R1 sits in the middle. R2 and R3 each only connect to R1, so everything they send to a remote network goes through R1.
Before any routes - what can PC0 reach?
- Selected PC0 and looked at its IP config
- IP address:
192.168.30.3 - Subnet mask:
255.255.255.0 - Default gateway:
192.168.30.1(R2 Fa0/0)
- IP address:
- Ping the default gateway: yes
- Ping PC1: yes (same LAN)
- Ping any other PC (2-5): not a single one
- A router only knows about networks it is directly connected to
- None of the routers have a route to the networks behind the other routers yet, so the packets get dropped
- Fix: tell each router where to send traffic for remote networks (static routes)
Create static routes
ip route <destination-network> <subnet-mask> <next-hop-ip>
- destination network = the remote network I want to reach
- next hop = the IP of the neighboring router's interface that is directly connected to me on the way there
- routes are entered in global config mode: CLI tab, then
enable, thenconfigure terminal
R1(config)#ip route 192.168.30.0 255.255.255.0 10.10.20.2
R1(config)#ip route 192.168.10.0 255.255.255.0 10.10.10.2
- gives R1 a route to Network 3 (192.168.30.0, through R2) and Network 1 (192.168.10.0, through R3)
R2(config)#ip route 192.168.10.0 255.255.255.0 10.10.20.1
R2(config)#ip route 10.10.10.0 255.255.255.0 10.10.20.1
R2(config)#ip route 192.168.20.0 255.255.255.0 10.10.20.1
- everything goes through R1 (10.10.20.1)
Based on what R1 and R2 looked like, R3 needs a route to every network it is not directly connected to, all through R1 (10.10.10.1):
R3(config)#ip route 192.168.30.0 255.255.255.0 10.10.10.1
R3(config)#ip route 10.10.20.0 255.255.255.0 10.10.10.1
R3(config)#ip route 192.168.20.0 255.255.255.0 10.10.10.1
Every router needs a route to every network it is not directly connected to
| Router | Directly connected | Static routes needed |
|---|---|---|
| R1 | 192.168.20.0, 10.10.20.0, 10.10.10.0 | 2 |
| R2 | 192.168.30.0, 10.10.20.0 | 3 |
| R3 | 192.168.10.0, 10.10.10.0 | 3 |
Test connectivity
- Pinged the other PCs from PC0 (
ping 192.168.10.2andping 192.168.20.2) - Both worked: 3 of 4 replies each
Notes:
- first request timed out both times - the first packet is used up resolving addresses (ARP), the rest go through
- TTL shows how many routers the packet crossed (Windows starts at 128)
- 192.168.10.2 -> TTL 125 -> 3 routers (R2, R1, R3)
- 192.168.20.2 -> TTL 126 -> 2 routers (R2, R1)
Check the routing tables
- On R1 typed
exitto leave config mode, then ranshow ip route - Repeated on R3
- 3 directly connected networks (C)
- 2 static routes (S) through the neighboring routers
- no default route, so anything not in the table gets dropped
- 2 directly connected networks (C): 10.10.10.0/24 and 192.168.10.0/24
- 3 static routes (S) to other networks, all through 10.10.10.1
- no default route for destinations not listed
| Code | Meaning |
|---|---|
| C | directly connected network |
| S | static route (entered by hand) |
Save the config and show interface IPs
R3>enable
R3#copy run start
R3#show ip interface brief
- Saved the config on each router with
copy run start -
show ip interface briefon each router to show the IP address on each interface
Q: Why do the pings to other networks fail before static routes are added?
A: Each router only knows its directly connected networks. There is no route to the networks behind the other routers, so the packets can't be forwarded.
Q: What does the config for R3 look like?
A: Three routes, all through R1 (10.10.10.1): ip route 192.168.30.0 255.255.255.0 10.10.10.1, ip route 10.10.20.0 255.255.255.0 10.10.10.1, ip route 192.168.20.0 255.255.255.0 10.10.10.1
Q: What does show ip route show on R1?
A: R1's routing table: three directly connected networks (C), two manually configured static routes (S) through neighboring routers, and no default route for destinations outside those networks.
Q: What does show ip route show on R3?
A: Two directly connected networks (10.10.10.0/24 and 192.168.10.0/24), three static routes to other networks through 10.10.10.1, and no default route for destinations not listed.
Q: Imagine a larger network with 25 different subnets. What would the challenge be with using static routes?
A: Static routes would be hard to manage. Routes have to be manually configured and updated on every relevant router, which increases the workload and the risk of mistakes as the network changes. (Dynamic routing protocols automate this.)
Router>enable
Router#configure terminal
Router(config)#ip route <network> <mask> <next-hop-ip>
Router(config)#exit
Router#show ip route
Router#show ip interface brief
Router#copy run start
-
ip route= add a static route -
show ip route= check the routing table (C = connected, S = static) -
show ip interface brief= check interface IPs and up/down status -
copy run start= save the running config so it survives a reload