Skip to main content

Day 11: Routing Fundamentals

CCNA 200-301 Study Guide: IP Routing Fundamentals & Static Routing

1.0 Introduction: The Core of IP ConnectivityOverview

IPWhat routingis Routing?

Routing is the Layer 3 functionprocess that enablesrouters communicationuse acrossto determine the path that IP packets should take over a network to reach their destination.

Core Concept:

    Routers forward packets between different networks (across network segments.boundaries)

    It

    Switches forward frames within the same LAN (within a network)

    A router reads the destination IP address and determines where to send the packet next

    Key Difference from Switching:

    Switches (Layer 2):

    - Examine destination MAC address

    - Forward within the same LAN

    - Fast forwarding to connected devices


    Routers (Layer 3):

    - Examine destination IP address

    - Forward between different networks

    - Use routing tables to determine best path


     


     

    Routing Tables

    What is a majorRouting componentTable?

    A routing table is a database of routes that tells the router where to send packets destined for specific networks or IP Connectivityaddresses.

    domain,

    Stored representingon: 25%Every router in the network

    Content: Network destinations and how to reach them

    Route Components

    Each route entry contains:

    Destination Network → Next-Hop Router (or directly connected)


    Example:

    Destination: 192.168.2.0/24 → Send to next-hop router: 10.0.0.2

    Destination: 10.1.1.0/24 → Send directly out interface G0/1

    Destination: 172.16.0.0/16 → Send to next-hop router: 10.0.0.3


    Route Types

    When a router receives a packet, it can take one of three actions:

    1. Forward to Next-Hop Router

    Route: "To reach 192.168.1.0/24, send to router 10.0.0.2"


    Router receives packet destined for 192.168.1.50

    ↓

    Looks in routing table: "I have a route to 192.168.1.0/24"

    ↓

    Action: Forward packet to 10.0.0.2 (next-hop IP)

    ↓

    Router 10.0.0.2 receives and continues forwarding


    2. Forward Directly to Destination (Directly Connected)

    Route: "192.168.1.0/24 is directly connected to my G0/1 interface"


    Router receives packet destined for 192.168.1.100

    ↓

    Looks in routing table: "192.168.1.0/24 is on my G0/1 interface"

    ↓

    Action: Send packet directly out G0/1 to destination


    3. Receive for Itself

    Route: "10.0.0.0/24 is my own interface"


    Router receives packet destined for 10.0.0.1 (its own IP)

    ↓

    Looks in routing table: "This is MY IP address"

    ↓

    Action: Don't forward, receive packet and process it


    Viewing the CCNARouting exam.Table

    Router# show ip route


    This displays all routes the router knows about.

    Output includes:

    Gateway of last resort is not set


        10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

    C       10.0.0.0/24 is directly connected, GigabitEthernet0/0

    L       10.0.0.1/32 is directly connected, GigabitEthernet0/0

        192.168.0.0/16 is variably subnetted, 2 subnets, 2 masks

    C       192.168.1.0/24 is directly connected, GigabitEthernet0/1

    L       192.168.1.254/32 is directly connected, GigabitEthernet0/1

    S       192.168.2.0/24 [1/0] via 10.0.0.2


    Legend:

    C = Connected (directly connected)

    L = Local (router's own IP)

    S = Static (manually configured)

    D = Dynamic (learned from routing protocol)

    R = RIP, O = OSPF, B = BGP (dynamic protocols)


     


     

    Routing Methods

    There are two main ways routers learn routes and populate their routing tables:

    Layer1. 2 Switching vs. Layer 3Static Routing

    What it is:

      Network engineer/administrator manually configures routes

      Routes do NOT change automatically

      Engineer must manually update routes if network changes

      Advantages:

        Simple to understand and implement

        No overhead (no routing protocol traffic)

        Secure (no routing information shared automatically)

        Good for small networks

        Disadvantages:

          Must manually configure every route

          Doesn't adapt if network fails or changes

          Not scalable for large networks

          Time-consuming to maintain

          When to use:

            Small networks (< 10 routers)

            Point-to-point links (few destinations)

            Labs and testing

            When security requires manual control

            2. Dynamic Routing

            What it is:

              Routers automatically share routing information with each other

              Routers learn and update routes automatically

              Routes adapt when network conditions change

              Advantages:

                Automatic route discovery and updates

                Adapts to network failures

                Scalable for large networks

                Less manual configuration

                Load balancing across multiple paths

                Disadvantages:

                  More complex to configure and understand

                  Uses network bandwidth and CPU (routing protocol overhead)

                  Slower initial convergence

                  Security concerns (routing information shared)

                  Common Dynamic Routing Protocols:

                  Protocol

                  Type

                  Purpose

                  RIP (Routing Information Protocol)

                  Distance Vector

                  Simple, outdated

                  OSPF (Open Shortest Path First)

                  Link State

                  Industry standard, widely used

                  EIGRP (Enhanced Interior Gateway Routing Protocol)

                  Hybrid

                  Cisco proprietary, powerful

                  BGP (Border Gateway Protocol)

                  Path Vector

                  Internet routing

                  When to use:

                    Medium to large networks

                    Complex topologies

                    Multiple paths to destinations

                    Networks with redundancy

                    When automatic failover is needed

                     


                     

                    WANs (Wide Area Networks)

                    What is a WAN?

                    A Wide Area Network (WAN) is a network that extends over a large geographic area — typically connecting multiple locations (cities, countries, or across the Internet).

                    Characteristics:

                      Connects different LANs together

                      Uses routers to connect

                      Often uses leased lines or Internet as backbone

                      Lower bandwidth and higher latency than LANs

                      Can span great distances

                      Example WAN Architecture:

                             [LAN A]

                               |

                            Router A ←→ Router B ← WAN Link (Internet or Leased Line)

                               |          |

                            [LAN B]    [LAN C]


                      Routers A and B are connected via WAN

                      Each router serves its local LAN

                      Users in LAN A can reach LAN B/C through routers


                      LAN vs WAN

                      FunctionFeature

                      Layer 2 SwitchingLAN

                      Layer 3 RoutingWAN

                      Primary RoleSize

                      ForwardsSingle traffic within a single LAN/broadcast domain.building/floor

                      ForwardsMultiple traffic between different IP networks/subnets.locations

                      PDU HandledSpeed

                      Frame.Fast Decisions(100 basedMbps on- Destination10 MAC.Gbps)

                      Packet.Slower Decisions(1-100 based on Destination IP.Mbps)

                      Unknown DestinationDevices

                      FloodsSwitches, thelocal frame to all ports (except source).routers

                      DropsRouters, themodems, packetfirewalls

                      if
                      no matching route is

                      Latency

                      found.

                      Low (< 1ms)

                      Higher (10-100+ ms)

                      Ownership

                      Single organization

                      Often shared/rented

                      Cost

                      Lower per Mbps

                      Higher per Mbps

                       


                       

                      Static Routing Configuration

                      Basic Static Route Syntax

                      Router(config)# ip route <destination-network> <subnet-mask> <next-hop-ip>


                      Components:

                        destination-network — The network you want to reach (e.g., 192.168.2.00)

                        Deconstructing the

                        subnet-mask — Netmask of that network (e.g., 255.255.255.0)

                        next-hop-ip — IP Routing Table

                        The routing table is a RAM-based mapaddress of the network.next Therouter command(e.g., 10.0.0.2)

                        Example 1: Basic Static Route

                        Scenario:

                          Router A at 10.0.0.1 needs to viewreach itnetwork 192.168.2.0/24

                          Router B (next-hop) is showat 10.0.0.2 on a shared link with Router A

                          Configuration:

                          RouterA(config)# ip route.route 192.168.2.0 255.255.255.0 10.0.0.2


                          Translation: "To reach 192.168.2.0/24, send packets to my neighbor at 10.0.0.2"

                          Result in routing table:

                          S       192.168.2.0/24 [1/0] via 10.0.0.2


                          RoutingExample Table2: ComponentsMultiple Static Routes

                          Scenario:

                          Router A needs to reach two different networks:

                          RouterA(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2

                          RouterA(config)# ip route 172.16.0.0 255.255.0.0 10.0.0.3


                          Result:

                            Packets destined for 192.168.2.x go to 10.0.0.2

                            Packets destined for 172.16.x.x go to 10.0.0.3

                            Static Route Configuration with Exit Interface

                            Alternative Syntax (for point-to-point links):

                            Router(config)# ip route <destination-network> <subnet-mask> <exit-interface>


                            Example:

                            RouterA(config)# ip route 192.168.2.0 255.255.255.0 Serial0/0/0


                            Translation: "To reach 192.168.2.0/24, send out my Serial0/0/0 interface"

                            When to use:

                              Point-to-point WAN links (Serial, PPP)

                              When only one neighbor on the link

                              More efficient on point-to-point connections

                              Difference:

                              ComponentMethod

                              Description

                              Use

                              SignificanceCase

                              SourceNext-Hop CodeIP

                              AMulti-access letter codenetworks (e.g.,Ethernet, S,Frame C,Relay L,with O,many R).

                              Identifies how the route was learned and its trustworthiness.

                              Destination Network

                              The remote network prefix and mask.

                              The "destination" target for incoming packets.

                              Admin Distance (AD)

                              A value from 0–255.

                              Tie-breaker for trustworthiness (Lower is better).

                              Metric

                              Path "cost" calculated by the protocol.

                              Tie-breaker if multiple routes have the same AD.

                              Next Hop

                              The IP of the next router in the path.

                              The immediate next device to receive the packet.neighbors)

                              Exit Interface

                              ThePoint-to-point locallinks physical/virtual(Serial, outbound port.

                              The "door" the packet leaves through.PPP)

                              AutomaticallyExample Populated3: RoutesNext-Hop vs Exit Interface

                              Next-Hop (for Ethernet):

                              RouterA(config)# ip route 192.168.2.0 255.255.255.0 10.0.0.2

                                                                                  ↑

                                                                          specific neighbor IP


                              Exit Interface (for Serial):

                              RouterA(config)# ip route 192.168.2.0 255.255.255.0 Serial0/0/0

                                                                                  ↑

                                                                            output interface


                               


                               

                              Default Route

                              What is a Default Route?

                              A default route is a "catch-all" route that handles packets destined for networks the router doesn't have specific routes for.

                              Use: Send unknown destinations to a central router or ISP gateway

                              Default Route Configuration

                              Syntax:

                              Router(config)# ip route 0.0.0.0 0.0.0.0 <next-hop-ip>


                              Or in CIDR notation:

                              Router(config)# ip route 0.0.0.0/0 <next-hop-ip>


                              Translation: "For any destination I don't have a more specific route for, send to this router"

                              Common notation: The default route is often written as 0.0.0.0/0 (the "default route")

                              Example: Setting a Default Route

                              Scenario:

                              Small office network with single ISP connection

                              Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1


                              Translation: "For any destination not in my routing table, send to the ISP gateway at 203.0.113.1"

                              Result:

                              S*   0.0.0.0/0 [1/0] via 203.0.113.1

                                   *  indicates this is the default route


                              Route Precedence (Most Specific Wins)

                              When multiple routes match a destination, the router uses the most specific route:

                              Routing table:

                              0.0.0.0/0 → 203.0.113.1 (default route)

                              192.168.2.0/24 → 10.0.0.2 (specific route)

                              192.168.2.0/25 → 10.0.0.3 (more specific)


                              Packet destined for:


                              192.168.2.10 → Uses 192.168.2.0/25 (longest prefix match — /25 most specific)

                              192.168.3.10 → Uses 0.0.0.0/0 (default — no other match)

                              172.16.0.1 → Uses 0.0.0.0/0 (default — no other match)


                               


                               

                              Static Routing Configuration Example

                              Complete Scenario

                              Network setup:

                                       [PC A]

                                          |

                                      [Switch]

                                          |

                                      Router A ────WAN Link──── Router B ────[Switch]──── [PC B]

                                     10.0.0.1    (Serial)      10.0.0.2                192.168.1.0/24

                                    

                              Router A is in: 10.0.0.0/24

                              Router B is in: 10.0.0.0/24 and 192.168.1.0/24


                              Requirements:

                              • ConnectedPC A (C):in The10.0.0.0 networkLAN) segment directly attachedneeds to anreach activePC interface.B (in 192.168.1.0 LAN)

                              • LocalNeed (L):static Aroutes hoston routeboth ($/32$) for the specific IP assigned to the router's interface.routers

                              3.0

                              Configuration Theon PathRouter Selection Process: A Router's LogicA:

                              RoutersRouterA(config)# follow a non-negotiable, three-step hierarchical logic to determine the "Best Path."

                                Longest Prefix Match (LPM): The router prefers the most specificip route (the192.168.1.0 one255.255.255.0 with the longest subnet mask).10.0.0.2

                                RouterA(config)# end


                                RouterA# show ip route

                                S       192.168.1.0/24 [1/0] via 10.0.0.2


                                Configuration on Router B:

                                RouterB(config)# ip route 10.0.0.0 255.255.255.0 10.0.0.1

                                RouterB(config)# end


                                RouterB# show ip route

                                S       10.0.0.0/24 [1/0] via 10.0.0.1


                                Result:

                                • Example:Router ForA destinationknows 10.how to reach 192.168.1.1.5, a /32 route beats a /0/24 route.

                                  (sends
                                to Router

                                Administrative Distance (AD): If prefix lengths are identical, the router selects the source with the lowest AD.

                                  Connected: 0B)

                                  Static:Router 1B knows how to reach 10.0.0.0/24 (sends to Router A)

                                  OSPF:PC 110A can now ping and communicate with PC B

                                  Verifying Routes

                                  Check routing table:

                                  Router# show ip route


                                  Test connectivity:

                                  Router# ping 192.168.1.100


                                  Trace packet path:

                                  Router# traceroute 192.168.1.100


                                   


                                   

                                  Comparison: Static vs Dynamic Routing

                                  When to Use Static Routing

                                  ✅ Good for:

                                    Metric:Small If both prefix length and AD are identical, the path with the lowest costnetworks (metric)< is10 chosen.routers)

                                    4.0 Static Routing: Manual Network Navigation

                                    StaticSimple, routesstable aretopologies

                                    manually configured using

                                    Point-to-point thelinks

                                    ip route command.

                                    High Theysecurity arerequirements

                                    ideal for "Stub"

                                    Lab/testing environments

                                    When you want complete control

                                    ❌ Not good for:

                                      Large networks

                                      Complex topologies

                                      Frequent topology changes

                                      Networks requiring redundancy

                                      Automatic failover

                                      When to Use Dynamic Routing

                                      ✅ Good for:

                                        Large networks with(> a10 singlerouters)

                                        exit path.

                                        Complex topologies

                                        Multiple paths to destinations

                                        Automatic redundancy/failover

                                        Networks that change frequently

                                        Production enterprise networks

                                        ❌ Not good for:

                                          Very small networks (overhead not worth it)

                                          When bandwidth is extremely limited

                                          When security isolation is critical

                                          Simple point-to-point links

                                           


                                           

                                          Static Route Commands Reference

                                          Configuration

                                          AdvantagesCommand

                                          DisadvantagesPurpose

                                          Lowip CPU/RAMroute overhead<dest> (no<mask> protocol calculations).<next-hop>

                                          NotAdd scalablestatic for large, complex networks.route

                                          Highlyip predictableroute and<dest> explicit<mask> traffic flow.<exit-int>

                                          RequiresAdd manualroute interventionvia for every topology change.interface

                                          Secureip (doesroute not0.0.0.0 advertise0.0.0.0 network info).<next-hop>

                                          HighConfigure administrativedefault effort.route

                                          no ip route <dest> <mask> <next-hop>

                                          Delete static route

                                          Configuration MethodsVerification

                                            Next-Hop IP: Recommended for multi-access (Ethernet) segments.Command

                                              Purpose

                                              show ip route

                                              Display entire routing table

                                              show ip route 10.2.static

                                              Show only static routes

                                              show ip route 192.168.1.0

                                              Show route for specific destination

                                              ping <ip>

                                              Test connectivity

                                              traceroute <ip>

                                              Trace path to destination

                                              Example Session

                                              Router# configure terminal

                                              Router(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.10.0.0.2

                                              Router(config)#

                                              Exit Interface: Primarily for point-to-point links.

                                                ip route 10.2.2.192.168.3.0 255.255.255.0 g0/110.0.0.2

                                                Router(config)#

                                                Fully Specified: Provides both interface and next-hop; avoids recursive lookups.

                                                  ip route 10.2.2.0 255.255.255.0 g0/1 192.168.1.2

                                                  5.0 The Default Route: Gateway of Last Resort

                                                  The default route acts as a safety net for packets that do not match any other specific entry in the routing table.

                                                    Syntax: 0.0.0.0 0.0.0.0 (CIDR notation: /0).203.0.113.1

                                                    Router(config)#

                                                    exit


                                                    Logic:Router# Becauseshow ip route

                                                        10.0.0.0/24 is directly connected, GigabitEthernet0/0

                                                    S   192.168.2.0/24 [1/0] via 10.0.0.2

                                                    S   192.168.3.0/24 [1/0] via 10.0.0.2

                                                    S*  0.0.0.0/0 [1/0] via 203.0.113.1


                                                    Router# ping 192.168.2.100

                                                    Type escape sequence to abort.

                                                    Sending 5, 100-byte ICMP Echoes to 192.168.2.100, timeout is 2 seconds:

                                                    !!!!!

                                                    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms


                                                     


                                                     

                                                    Key Differences: Switches vs Routers in Network

                                                    Feature

                                                    Switch

                                                    Router

                                                    Layer

                                                    Layer 2 (Data Link)

                                                    Layer 3 (Network)

                                                    Forwards within/between

                                                    Within LANs

                                                    Between LANs/Networks

                                                    Uses

                                                    MAC addresses

                                                    IP addresses

                                                    Table

                                                    MAC address table

                                                    Routing table

                                                    Decision

                                                    Destination MAC

                                                    Destination IP

                                                    Broadcasts

                                                    Floods to all ports

                                                    Blocks/filters

                                                    Default behavior

                                                    Active

                                                    Interfaces down by default

                                                     


                                                     

                                                    Key Takeaways for CCNA

                                                    ✅ Routing is how packets move between different networks using destination IP addresses

                                                    ✅ Routing table stores all known routes; router uses it hasfor aforwarding prefixdecisions

                                                    length

                                                    ✅ ofStatic zero,routing it= ismanual theconfiguration; leastgood for small, stable networks

                                                    ✅ Dynamic routing = automatic discovery; good for large, complex networks

                                                    ✅ WAN connects separate LANs over large geographic distances

                                                    ✅ Default route (0.0.0.0/0) catches packets with no other matching route

                                                    ✅ Static route syntax: ip route <destination> <mask> <next-hop-ip>

                                                    ✅ Exit interface method used for point-to-point links; next-hop method for multi-access

                                                    ✅ Routes point to next-hop IP or exit interface — tells router where to send packets

                                                    ✅ Most specific route possiblewins andwhen ismultiple onlyroutes used if all other entries fail to match.

                                                    Verification: Identified in the routing table by the code S*. The asterisk (*) signifies the active candidate for the gateway of last resort.

                                                    6.0 Packet Forwarding Mechanics: L2 and L3 Journey

                                                    Asmatch a packet travels across routers, its encapsulation changes.

                                                      IP Addresses (Layer 3): Remain unchanged from source to destination (unlesslongest NATprefix is applied).match)

                                                      ✅

                                                      Router must have routes in both directions for bidirectional communication

                                                      MAC✅ AddressesDirectly connected routes appear as 'C' in routing table; don't need to be configured

                                                      ✅ Local routes (LayerL) 2): Are rewritten at every hop. Each router replacesare the source MAC with itsrouter's own exitIP interfaceaddresses; andhandled the destination MAC with the next hop's address.automatically

                                                      The Forwarding Procedure

                                                        De-encapsulate: Strip the L2 frame to see the L3 packet.

                                                        Lookup: Find the best path in the routing table.

                                                        Re-encapsulate: Wrap the packet in a new L2 frame for the next hop.

                                                        7.0 Core Troubleshooting for Static Routes

                                                          Verify Interface Status: Use✅ show ip interface brief. Interfaces must be up/up. A static route isdisplays removedrouting iftable; itsincludes exitsource interfaceand ismetric down.information

                                                          ✅

                                                          Routers

                                                          Confirmseparate Routebroadcast Presence:domains Use— showbroadcasts ipdon't route. Ensure no typos were made during configuration.

                                                          Recursive Lookup Check: Thecross router must have a valid route to the Next-Hop IP for the static route to be installed in the table.interfaces

                                                          Ensure Route Symmetry: Check that the return path exists on the remote router. Routing is a one-way decision.

                                                          8.0 Summary of Key Concepts

                                                            LPM is the first rule of routing; specificity always wins.

                                                            Static Routes have a default AD of 1.

                                                            Connected Routes have the lowest possible AD of 0.

                                                            Default Routes handle all otherwise unmatchable traffic and use the /0 mask.