ccna-notes5-day11
Static Router
192.168.1.0/24 is directly connected, GigabitEthernete/2
- 192.168.1.0/24 matches 192.168.1.0 ~ 192.168.1.255.
- If R1 receives a packet with a destination in that range, it will send the packet out of G0/2.
e.g.
Case: 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks 192.168.1.0/24 is directly connected, GigabitEthernete/2 192.168.1.1/32 is directly connected, GigabitEthernete/2
Question: a Packet destined for 192.168.1.1 is matched by both routes:
use which one?
-
it will choose the most specific matching route
-
The route to 192.168.1.0/24 includes 256 different IP addresses (192.168.1.0 — 192.168.1.255)
The route to 192.168.1.1/32 includes only 1 IP address (192.168.1.1) » This route is more specific.
Local route = keep the packet, don’t forward it
route if don’t have the setting of that ip packet, it just drop it
Quiz The IP address configured on a router interface will appear in the routing table as what kind of route?
a) Static b) Connected c) Local d) Dynamic
ans: C ❌
Static Router Lesson 2
defalt gateway ⇒ defalt router gateway ⇒ through which Router
The default gateway configuration is also called a default route. ~It is a route to 0.0.0.0/0 = all netmask bits set to 0. Includes all addresses from 0.0.0.0 to 255.255.255.255.
The default route is the least specific route possible, because it includes all IP addresses. 0.0.0.0/0 = 4,294,967,296 IP addresses
A/32 route (ie. Local route) is the most specific route possible, because it specifies only one IP address. 192.168.1.1/32 = 1 IP address
*to learn R1 G0/2’s MAC address, PC1 will first send an ARP request to 192.168.1.1.
- to send through another ip address
- first send arp requst to router first
- own router
- then decide which roadmap , which direction , which next hopY
It is possible to configure the routers to: - load-balance between path 1) and 2) - Use path 1) as the main path and path 2) as a backup path
R4(config)# ip route ip-address netmask next-hop
if ping → work: two-way reachability. PC1 can reach PC4, and PC4 can reach PC1.
Other way ❌ exclusion way:
R2(config)# ip route ip-address netmask exit-interface
- specifies which router don’t use or skip
ip route 192.168.1.0 255.255.255.0 go/0 ip route 192.168.4.0 255.255.255.0 g0/1 192.168.24.4
R2(config)# ip route ip-address netmask exit-interface R2(config)# ip route ip-address netmask exit-interface next-hop
Static routes in which you specify only the exit-interface rely on a feature called Proxy ARP to function. This is usually not a problem, but generally you can stick to next-hop or exit-interface next-hop. Neither is ‘better’ than the other: use which you prefer.
Default Route
A default route is a route to 0.0.0.0/0
-
0.0.0.0/0 is the least specific route possible; it includes every possible destination IP address.
-
If the router doesn’t have any more specific routes that match a packet’s destination IP address, thi router will forward the packet using the default route.
-
A default route is often used to direct traffic to the Internet.
-
More specific routes are used for destinations in the internal corporate network.
-
Traffic to destinations outside of the internal network is sent to the Internet.
when show ⇒ show ip route: Gateway of last resort is not set ⇒ No default route has been configured yet.
ip route 0.0.0.0 0.0.0.0 203.0.113.2 S* 0.0.0.0/0 [1/0] via 203.0.113.2
Quiz ❌
Examine R1’s routing table. Which interface will it use to forward packets destined for 8.8.8.8?
0.0.0.0/0 [1/0] via 203.0.113.2 via 192.168.12.2 172 16 0 0/16 [1/0] via 192.168.13.3 192.168.12.0/24 is variably subnetted, 2 subnets, 2 masks 192.168.12.0/24 is directly connected, GigabitEthernet0/1 192.168.12.1/32 is directly connected, GigabitEtherneto/1
192.168.13.0/24 is variably subnetted, 2 subnets, 2 masks 192.168.13.0/24 is directly connected, GigabitEtherneto/0 oalE), 1/32 is directly connected, GigabitEthernet0/@ 1 ri 2 b 2 _masks 283 0. 113 0/24 is directly connected, GigabitEtherneto/2 203.0.113.1/32 is directly connected, GigabitEthernet@/2
a) GigabitEthernet0/0
b) GigabitEthernet0/1
c) GigabitEthernet0/2
d) It will drop the packet.
ans : c ,
- because 0.0.0.0 ⇒ include all, inclue 8.8.8.8 for sure, and 203.0.113.2 ⇒ last 2 ⇒ G0/2
ans : d Becasue of S ⇒ static , can’t be auto connected
Troubleshooting lab
-
ipconfig ⇒ check own ip and gateway (route)
- ping destination
- ping gateway
-
show ip interface brief if all up , then it is fine
-
show ip route
- config terminal
→ type no 192 … etc (copy that highlighted)
in config mode, you have to do the command
no ip route → ip route xx xx corrected one
- could be S gateway problem
- could be ip address problem
- could be ip interface g0/0 prolbem
config t interface g0/0 ip add xxx 255.255.255
- replace the wrong ip automatically
do sh running config do sh run
- to check the status