Another Security Blog

A place to show my mad skills

TidBits Walkthroughs Resources Projects View on GitHub
14 October 2024

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

Environments Used

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:

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:

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:

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:

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.

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.

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:


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:

  1. Longest prefix match
  2. Administrative distance (AD)
  3. 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:

Example:
Given a destination IP address of 192.168.1.100, the routing table has the following entries:

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:

Default AD Values:

Example:
Consider two routes to the destination 10.1.1.0/24:

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:

Example:
Consider two OSPF routes to the destination 192.168.10.0/24:

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:

  1. Longest Prefix Match: The router first checks the routing table for the most specific match based on the longest prefix (most matching bits).
  2. Administrative Distance: If multiple routes share the same prefix length, the router compares the AD values. The route with the lowest AD is preferred.
  3. 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:

  1. 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
  2. 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
  3. 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:


Key Functions of FHRPs

  1. Default Gateway Redundancy:
    • Creates a shared virtual IP address among multiple routers.
    • End devices use this virtual IP as their default gateway.
  2. Failover:
    • If the active router fails, a standby router automatically assumes the active role.
    • Provides seamless failover with minimal network disruption.
  3. 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:


Common FHRPs

1. Hot Standby Router Protocol (HSRP)

2. Virtual Router Redundancy Protocol (VRRP)

3. Gateway Load Balancing Protocol (GLBP)


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:

tags: ccna - study - cisco