CCNA Super Study Guide: Section 3
by C. Casquatch
Space to dump notes for CCNA
End goal is to obtain a CCNA certificate from Cisco and maybe learn networking
Utilities Used
- Neil Anderson (Gold CCNA Bootcamp)
- Jeremy’s IT Lab 200-301 Video Series on Youtube
- Packet Tracer
Environments Used
- Packet Tracer
- GitHub
CCNA 200-301 Exam Notes: 3.0 IP Connectivity
3.0 – IP Connectivity
3.1 Interpret the Components of a Routing Table
A router’s routing table holds the best available path (or paths) to a destination network. It is used for forwarding traffic across the network. The table consists of directly connected networks, statically configured routes, and dynamically learned routes via routing protocols. Each entry in the routing table provides critical information that helps the router determine the most efficient path to forward packets.
Key Components of a Routing Table:
3.1.a Routing Protocol Code
Routing protocol codes identify the source of the route in the routing table. They indicate how the router learned about the path to the destination network. Common routing protocol codes include:
- C: Connected Route – A route to a network directly connected to one of the router’s interfaces.
- S: Static Route – A manually configured route set by the network administrator.
- R: RIP (Routing Information Protocol) – A distance-vector protocol that uses hop count to determine the best path.
- O: OSPF (Open Shortest Path First) – A link-state protocol that uses cost (based on bandwidth) to determine the best path.
- EIGRP: Enhanced Interior Gateway Routing Protocol – A hybrid protocol that combines aspects of distance-vector and link-state protocols.
- D: EIGRP-derived Route – A route learned through EIGRP.
These codes help the router distinguish how a route was learned and its source.
3.1.b Prefix
The prefix is the network address or destination of a route. It represents the network portion of the IP address and is essential for identifying the route’s destination.
Example:
192.168.1.0
represents a network address for the route.
The prefix is commonly paired with the network mask (subnet mask) to specify the network and determine the valid IP addresses within the network range.
3.1.c Network Mask
The network mask (or subnet mask) defines the range of IP addresses that belong to a particular route. It tells the router which portion of the IP address corresponds to the network and which portion corresponds to the host.
Example:
255.255.255.0
(or/24
) is a typical subnet mask that signifies a network with up to 256 possible addresses (including network and broadcast addresses).
The mask helps the router in identifying whether a destination IP address is part of the directly connected network or requires forwarding to another router.
3.1.d Next Hop
The next hop is the IP address of the next router in the path that packets should be forwarded to. It serves as an intermediate router where the packet will be sent before continuing towards its final destination.
Example:
- If the next hop is
192.168.2.1
, the router will forward the packet to this address for further processing.
The next hop ensures that packets are directed correctly across the network towards their destination.
3.1.e Administrative Distance (AD)
Administrative Distance (AD) is a value used to rank the trustworthiness of a route. The lower the AD, the more reliable the route is considered. Each routing protocol has a default AD that helps the router decide which route to prefer if multiple routes to the same destination exist.
Common AD values:
- 0: Connected Routes – Directly connected networks are the most trusted.
- 1: Static Routes – Manually configured routes are highly trusted.
- 90: EIGRP – Enhanced Interior Gateway Routing Protocol routes are moderately trusted.
- 110: OSPF – Open Shortest Path First routes are also moderately trusted.
- 120: RIP – Routing Information Protocol routes are less trusted due to its reliance on hop count.
- 255: Unreachable Route – Indicates that a route is not available.
The AD helps the router determine which path to take when multiple protocols provide routes to the same destination.
3.1.f Metric
A metric is a value that helps the router determine the cost of a route. The lower the metric, the more preferred the route is. Different routing protocols use different methods to calculate the metric.
- RIP: Hop count – the number of routers a packet has to pass through before reaching the destination. Lower hop counts are preferred.
- OSPF: Cost – the cost is based on bandwidth, with lower costs being preferred for faster links.
- EIGRP: Composite metric – it combines factors such as bandwidth, delay, and reliability to compute the best path.
The metric is used to evaluate the “cost” of a route, helping the router make the best choice for routing traffic.
3.1.g Gateway of Last Resort
The Gateway of Last Resort is used as a fallback route when no specific match is found in the routing table for a packet’s destination. This route is often configured as a default route and ensures that packets can still be forwarded to their destination, even if a more specific route is unavailable.
- IPv4 Default Route:
0.0.0.0/0
- IPv6 Default Route:
::/0
The Gateway of Last Resort is typically set up as a static route, or it can be learned through a dynamic routing protocol.
Example Routing Table Entries:
Here are some example entries you might find in a routing table:
C 192.168.1.0/24 is directly connected, GigabitEthernet0/1
- C: The network
192.168.1.0/24
is directly connected to the router through interfaceGigabitEthernet0/1
.
- C: The network
O 10.1.1.0/24 [110/2] via 192.168.2.1, 00:00:22, GigabitEthernet0/0
- O: The route
10.1.1.0/24
is learned via OSPF with an AD of110
. The metric is2
, and the next hop is192.168.2.1
. The route was last updated 22 seconds ago, and it is reachable via interfaceGigabitEthernet0/0
.
- O: The route
S* 0.0.0.0/0 [1/0] via 192.168.2.1
- S: A static route (configured by the network administrator) that serves as the default route (
0.0.0.0/0
). It points to the next hop192.168.2.1
, and has an AD of1
.
- S: A static route (configured by the network administrator) that serves as the default route (
These components of a routing table work together to help the router determine the best path to forward packets efficiently, taking into account network topology, trustworthiness of routes, and the cost of each route.
3.2 – Determine How a Router Makes a Forwarding Decision by Default
When a router receives a packet, it must determine the best path to the packet’s destination. This decision is made by consulting its routing table and evaluating various criteria in a specific order. The three primary factors that influence the forwarding decision are:
- Longest prefix match
- Administrative distance (AD)
- Routing protocol metric
These factors are evaluated sequentially to identify the optimal path for forwarding the packet.
3.2.a Longest Prefix Match
The longest prefix match is the first criterion a router uses to select the best route to a destination. It refers to the most specific route available in the routing table. The more bits in the subnet mask that match the destination IP address, the more specific the route is considered.
Key Points:
- The route with the highest number of matching bits in the subnet mask is selected.
- The longest prefix is the most specific match, meaning it covers the smallest range of IP addresses.
Example:
Given a destination IP address of 192.168.1.100
, the routing table has the following entries:
- 192.168.1.0/24 → matches 24 bits
- 192.168.1.64/26 → matches 26 bits (more specific)
- 192.168.81.96/28 → matches 28 bits (most specific)
Since 192.168.81.96/28
matches the most bits (28 bits), the router selects this as the best match for the packet’s destination.
3.2.b Administrative Distance (AD)
If multiple routes share the same longest prefix, the router then compares their Administrative Distance (AD). The AD is a value that indicates the trustworthiness of a route based on how it was learned. Routes with a lower AD are considered more reliable and are preferred over those with a higher AD.
Key Points:
- Lower AD values are preferred because they indicate a more trusted route.
- AD helps the router choose between multiple routes to the same destination when no single route is superior based on prefix length alone.
Default AD Values:
- 0: Directly Connected – The most trusted routes.
- 1: Static Routes – Manually configured by the administrator.
- 90: EIGRP – Enhanced Interior Gateway Routing Protocol.
- 110: OSPF – Open Shortest Path First.
- 120: RIP – Routing Information Protocol.
- 255: Unreachable – The route is considered unreachable.
Example:
Consider two routes to the destination 10.1.1.0/24
:
- One route is learned via OSPF, with an AD of 110.
- The other is learned via EIGRP, with an AD of 90.
The router will select the EIGRP route because it has the lower AD value, making it more trustworthy.
3.2.c Routing Protocol Metric
If routes have the same prefix length and AD, the router will compare the metric of each route to determine the best path. The metric is a measure of the “cost” of reaching a destination. Each routing protocol uses different criteria to calculate this cost.
Key Points:
- RIP: The metric is the hop count, and fewer hops are preferred.
- OSPF: The metric is based on cost, which is derived from bandwidth. Higher bandwidth links have a lower cost.
- EIGRP: The metric is a composite value that takes into account bandwidth, delay, reliability, and load.
Example:
Consider two OSPF routes to the destination 192.168.10.0/24
:
- Route 1: Metric = 20
- Route 2: Metric = 10
The router will select Route 2 because it has the lower metric, indicating that it is the less costly route.
Summary of the Forwarding Decision Process:
- Longest Prefix Match: The router first checks the routing table for the most specific match based on the longest prefix (most matching bits).
- Administrative Distance: If multiple routes share the same prefix length, the router compares the AD values. The route with the lowest AD is preferred.
- Routing Protocol Metric: If the ADs are the same, the router compares the metric for each route. The route with the lowest metric (least cost) is chosen.
By evaluating these factors in order, the router makes an informed decision on how to forward a packet towards its destination efficiently.
3.4 – Configure and Verify Single-Area OSPFv2
Open Shortest Path First (OSPF) is a link-state routing protocol commonly used within autonomous systems. Single-area OSPFv2 simplifies configuration and troubleshooting by operating entirely within Area 0, the backbone area.
3.4.a Neighbor Adjacencies
OSPF routers form neighbor adjacencies to exchange routing information and maintain network topology consistency. Establishing these adjacencies involves several key steps:
Steps to Form an Adjacency:
- Hello Packet Exchange:
- OSPF routers send Hello packets via multicast to 224.0.0.5.
- These packets include parameters such as:
- Hello interval
- Dead interval
- Area ID
- Matching Parameters:
Neighbor routers must agree on the following parameters to form an adjacency:- Area ID
- Subnet mask
- Authentication (if enabled)
- Hello and Dead intervals
- State Progression:
Routers move through the following states to establish a full adjacency:- Down → No Hello packets received.
- Init → Hello packets received but not acknowledged.
- Two-Way → Bi-directional communication established.
- ExStart → Master-slave relationship initiated.
- Exchange → Database descriptions exchanged.
- Loading → Request and send missing LSAs.
- Full → Adjacency established, and LSDBs synchronized.
Verification Command:
show ip ospf neighbor
3.5 – Purpose, Functions, and Concepts of First Hop Redundancy Protocols (FHRPs)
Purpose of FHRPs
First Hop Redundancy Protocols (FHRPs) ensure uninterrupted network connectivity by providing default gateway redundancy. They protect against failures in the first-hop router by allowing multiple routers to function as a single logical gateway.
Key Benefits:
- Without FHRPs: A single router failure disrupts communication for devices relying on it as the default gateway.
- With FHRPs: Traffic seamlessly shifts to a backup router when the primary router fails, ensuring minimal downtime.
Key Functions of FHRPs
- Default Gateway Redundancy:
- Creates a shared virtual IP address among multiple routers.
- End devices use this virtual IP as their default gateway.
- Failover:
- If the active router fails, a standby router automatically assumes the active role.
- Provides seamless failover with minimal network disruption.
- Load Sharing (protocol-specific):
- Distributes traffic across multiple routers.
- Improves resource utilization and optimizes performance.
Core Concepts of FHRPs
FHRPs operate by assigning specific roles to routers:
- Active Router: Handles all traffic for the virtual IP address.
- Standby Router: Monitors the active router and takes over if it fails.
- Virtual IP and MAC Address:
- The virtual IP serves as the default gateway for hosts.
- A virtual MAC address ensures seamless failover at Layer 2.
Common FHRPs
1. Hot Standby Router Protocol (HSRP)
- Type: Cisco proprietary.
- Roles: Active and Standby routers.
- Features:
- Uses a virtual IP as the default gateway.
- The active router sends periodic Hello messages to indicate its availability.
- If Hello messages are missed, the standby router takes over.
- Default Timers:
- Hello: 3 seconds.
- Hold: 10 seconds.
- Default Group Number: 0-255.
- Virtual MAC Address:
- Format:
0000.0C07.ACxx
(wherexx
is the group number in hexadecimal).
- Format:
2. Virtual Router Redundancy Protocol (VRRP)
- Type: Open standard (RFC 5798).
- Roles: Master and Backup routers.
- Features:
- The Master router owns the virtual IP address and handles traffic.
- Similar functionality to HSRP, but cross-vendor support.
- Default Timers:
- Advertisement: 1 second.
- Hold: 3 seconds.
- Group Number Range: 0-255.
- Virtual MAC Address:
- Format:
0000.5E00.01xx
(wherexx
is the group number in hexadecimal).
- Format:
3. Gateway Load Balancing Protocol (GLBP)
- Type: Cisco proprietary.
- Purpose: Combines redundancy with load sharing.
- Roles:
- Active Virtual Gateway (AVG): Manages group traffic distribution.
- Active Virtual Forwarder (AVF): Forwards traffic as assigned by the AVG.
- Features:
- Each router in the group has a unique virtual MAC address, allowing simultaneous traffic handling.
Comparison of FHRPs
Protocol | Type | Roles | Load Sharing | Virtual MAC Address Format |
---|---|---|---|---|
HSRP | Cisco proprietary | Active, Standby | No | 0000.0C07.ACxx |
VRRP | Open standard (RFC 5798) | Master, Backup | No | 0000.5E00.01xx |
GLBP | Cisco proprietary | AVG, AVF | Yes | Unique virtual MAC for each router |
Verification and Troubleshooting Commands
Show FHRP States:
- HSRP:
```bash show standby