# Day 10: IPv4 Header

# CCNA 200-301 Study Guide: The IPv4 Header and Layer 3 Operations

## 1.0 The Role of the Network Layer (Layer 3)

The primary role of the Network Layer is to provide logical addressing and path determination to move data between different networks.

- PDU: The Protocol Data Unit at Layer 3 is the Packet.
- Exam Weight: This falls under the IP Connectivity domain, representing 25% of the CCNA exam score.
- Focus: Understanding how routers interpret routing tables, make forwarding decisions, and establish connectivity.

## 2.0 Analyzing the IP Routing Table (Exam Obj. 3.1)

The routing table is a router's primary map of the network. Each entry provides the instructions needed to forward a packet toward its final destination.

### Components of a Routing Table Entry

<div align="left" dir="ltr" id="bkmrk-component-code%2Fref-f"><table><colgroup><col width="146"></col><col width="93"></col><col width="364"></col></colgroup><tbody><tr><td>Component

</td><td>Code/Ref

</td><td>Function

</td></tr><tr><td>Protocol Code

</td><td>3.1.a

</td><td>Identifies how the route was learned (e.g., C: Connected, S: Static, O: OSPF, D: EIGRP).

</td></tr><tr><td>Prefix

</td><td>3.1.b

</td><td>The destination network address.

</td></tr><tr><td>Network Mask

</td><td>3.1.c

</td><td>Defines the size of the network (e.g., /24). Used for "longest match" decisions.

</td></tr><tr><td>Next Hop

</td><td>3.1.d

</td><td>The IP of the next router or the local exit interface.

</td></tr><tr><td>Admin Distance

</td><td>3.1.e

</td><td>The "trustworthiness" of the route source (Lower is better).

</td></tr><tr><td>Metric

</td><td>3.1.f

</td><td>The "cost" calculated by the routing protocol (Lower is better).

</td></tr><tr><td>Gateway of Last Resort

</td><td>3.1.g

</td><td>The Default Route used when no specific match exists.

</td></tr></tbody></table>

</div>## 3.0 Static Route Types (Exam Obj. 3.3)

Static routes are manually configured and are resource-efficient. You must be able to configure and verify these four types:

1. Default Route: The "Gateway of Last Resort" (usually 0.0.0.0/0). Points to the ISP.
2. Network Route: A path to a specific destination subnet (e.g., 192.168.10.0/24).
3. Host Route: A route to a single IP address using a $/32$ mask (IPv4) or $/128$ (IPv6).
4. Floating Static Route: A backup route with a higher Administrative Distance (AD) than the primary dynamic route. It only appears in the routing table if the primary fails.

## 4.0 Core Layer 3 Operational Concepts

### 4.1 The Router's Forwarding Decision Logic (Exam Obj. 3.2)

When a router receives a packet, it uses a strict three-step hierarchical logic to find the "best path":

1. Longest Prefix Match: The router prefers the most specific route. A match for $/26$ always beats a match for $/24$.
2. Administrative Distance (AD): If the prefix lengths are identical, the router chooses the source with the lowest AD.
- Connected: 0
- Static: 1
- OSPF: 110

4. Routing Protocol Metric: If the AD is also identical (same protocol), the path with the lowest calculated cost (metric) is chosen.

### 4.2 First Hop Redundancy (FHRP) (Exam Obj. 3.5)

The purpose of FHRP is to eliminate the single point of failure inherent in having only one default gateway.

- Mechanism: Multiple physical routers act as a single Virtual Router.
- Benefit: If the active physical router fails, a standby router takes over the virtual IP address seamlessly, ensuring continuous connectivity for end hosts without manual configuration changes.

## 5.0 CCNA Exam Quick Reference Summary

- IP Connectivity: Domain 3; 25% of the exam.
- Selection Hierarchy: Longest Match $\\rightarrow$ AD $\\rightarrow$ Metric.
- OSPFv2: Requires knowledge of neighbor adjacencies and DR/BDR selection.
- Static Routing: Know how to configure and verify Network, Host, and Floating routes.
- FHRP: Understand its role in providing a resilient default gateway.