Routing
Objectives:
● 1.4 - Explain common networking ports, protocols, services, and traffic types
● 2.1 - Explain characteristics of routing technologies
● Introduction
○ Router
■ Forwards traffic between subnets, between an internal and external
network, or between two external networks
■ Each subnet or external network is going to be its own broadcast domain
■ Multlayer switches also perform routing functions
● Exam Tip: Even if a multilayer switch is being used, it is functioning
as a router, so it will be called a router on the exam
○ If the word Switch is used, they are referring to a Layer 2
Switch
○ If the word Multilayer Switch or Router, they are referring
to the Layer 3 functionality of a router
145
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Routing Fundamentals
○ Router
■ Crucial for connecting subnets within a network or connecting internal
and external networks
■ Routes traffic between different subnets or networks
■ Separates broadcast domains, unlike switches which maintain one
broadcast domain
■ Layer 3 switches can function as routers, handling both Layer 2
forwarding and Layer 3 routing
● In the exam, a multi-layer switch is treated as a router
○ For the exam
■ Switch – standard Layer 2 switch
■ Multi-layer switch (router) – Layer 3 device
○ Basic Router Functionality
■ Routers forward traffic between networks based on IP addresses
■ To connect two networks, routers use WAN connections like fiber, serial,
satellite, or VPN links
■ When a packet needs to travel between networks, it is forwarded to the
router (default gateway)
■ Routers use IP addresses (Layer 3) to route packets between networks
● MAC addresses are used internally, but IP addresses are used at
Layer 3 for communication between routers
146
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Routers repackage data frames (Layer 2) as packets (Layer 3) for
transmission over the WAN
■ Routers strip off the IP header and convert packets back to data frames
for delivery to the destination device on the local network
■ Communication between devices on different networks involves routers
forwarding packets based on IP addresses and switches delivering data
frames based on MAC addresses
○ Routing becomes more complex when packets are sent over the internet, which
is the world's largest WAN
● Routing Tables
○ Routing Table
■ Helps determine which route entry is the best fit for the network
■ Used to decide where packets need to go inside and outside of networks
■ Routing decisions are based on Layer 3 information and map to Layer 2
● ARP Cache
○ Used by routers to map IP addresses to MAC addresses
within a local area network
■ Kept by routers to determine the best route for routing traffic
■ Entries in a routing table contain a prefix
● Longer prefixes indicate more specific networks
● A longer prefix means fewer available IP addresses in that range
147
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ Routing Information Sources
■ Directly Connected Route
● Learned by a physical connection between routers
■ Static routes
● Configured manually by an administrator
● 0.0.0.0/0
○ Default static route to handle unknown destinations
■ Dynamic route
● Learned through dynamic routing protocols
● Learned by exchanging informations automatically between
routers based on the protocols
● Dynamic Routing Protocols
○ Negotiate based on factors like number of hops and link
bandwidth
○ Preventing Routing Loops
■ Split Horizon
● Prevents a route learned on one interface from being advertised
back out the same interface
■ Poison Reverse
● Advertises a route back out the same interface but with a high
cost to prevent its use
148
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Routing Protocols
○ Dynamic Routing Protocols
■ Internal
● Interior Gateway Protocol (IGP)
○ Operates within an autonomous system
■ External
● Exterior Gateway Protocol (EGP)
○ Operates between autonomous systems on exterior
networks
○ Routing Protocol Characteristics
■ Router Advertisement Method
● Distance Vector
○ Sends full routing table to directly connected routers at
regular intervals
○ Convergence Time
■ Time for all routers to update routing tables in
response to topology changes
■ Slow
○ Hold-down Timer
■ Prevents updates for a specific period of time and
speeds up convergence
149
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
○ Hop Count
■ Number of routers from the source router through
which data must pass to reach the destination
network
■ Used as metric for routing decisions
● Link State
○ Requires all routers to know about the paths that all other
routers can reach in the network
○ Faster convergence time compared to distance vector
○ Considers cost, including link speed, as metric for routing
decisions
● Hybrid
○ Combines aspects of both distance vector and link state
protocols
○ Routing Protocols
■ RIP (Routing Information Protocol)
● An interior gateway protocol that is used internal to the networks
● Oldest dynamic routing protocol
● Uses distance vector and hop count
○ 15 max hops
● Updates every 30 seconds
● Easy to configure
150
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Runs over UDP
■ OSPF (Open Shortest Path First)
● Another interior gateway protocol
● Uses link state and cost for routing decisions
○ Cost is based on link speed
● Faster convergence than RIP
■ IS-IS (Intermediate System to Intermediate System)
● An interior gateway protocol similar to OSPF
● Uses cost based on link speed for routing decisions
● Functions like OSPF but not as widely popular
■ EIGRP (Enhanced Interior Gateway Routing Protocol)
● Advanced distance vector protocol
● Hybrid of distance vector and link state
● Uses bandwidth, delay, and cost for routing decisions
● A Cisco-developed upgrade to OSPF that is popular in Cisco-only
networks
■ BGP (Border Gateway Protocol)
● An external gateway protocol
● Uses path vector and autonomous system hops for routing
decisions
● Backbone protocol of the internet
● Slow convergence time
151
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Route Selection
○ Route Selection
■ Traffic across routers determines the path
○ Believability of a Route
■ Administrative Distance (AD)
● An index of believability used by routers
● Lower value – more believable
● Administrative Distance of Routing Protocols (for exam
understanding, not memorization)
○ Directly connected – 0 (most believable)
○ Static – 1
○ EIGRP – 90
○ OSPF – 110
○ RIP – 120
○ External EIGRP – 170
○ Unknown/Unbelievable – 255 (unreachable)
○ Metrics for Route Selection
■ Factors
● Hop count
● Believability
● Reliability
● Bandwidth
152
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Delay
● Costs
● Other metrics
■ Each protocol will use a different metric based on its programming to
determine which route to use
■ Lower numbers are better
○ Summary Slide
■ Useful for exam preparation and understanding protocol characteristics
Routing Protocol Type Interior/Exterior
RIP Distance vector Interior
OSPF Link state Interior
EIGRP Advanced distance
vector
Interior
IS-IS Link state Interior
BGP Path vector Exterior
A network can simultaneously support more than one routing
protocol through route redistribution. This allows a router to
participate in OSPF on one interface and EIGRP on another
interface. The router can then translate from one protocol for
redistribution as the other protocol.
153
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Address Translation
○ IPv4 faced address exhaustion, prompting the development of address
translation
○ Address Translation
■ Allows private IP addresses to be translated into public IP addresses for
routing over public networks like the internet
○ Network Address Translation (NAT)
■ Conserves limited IPv4 addresses by translating private IPs into public IPs
■ Dynamic NAT (DNAT)
● Automatically assigns IP addresses from a pool of IPs for
one-to-one translation
■ Static NAT (SNAT)
● Manually assigns private IPs to public IPs for one-to-one
translation
● Used as security feature
○ Port Address Translation (PAT)
■ Allows multiple devices to share a single public IP address by using
different port numbers to differentiate traffic
■ Many-to-one translation
○ NAT IP Address Terminology
■ Inside Local
● Private IP address referencing an inside device
154
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Inside Global
● Public IP address referencing an inside device
■ Outside Local
● Private IP address referencing an outside device
■ Outside Global
● Public IP address referencing an outside device
○ Comparison of NAT and PAT
■ NAT translates private IPs to public IPs for individual devices
■ PAT uses port numbers to differentiate between multiple devices sharing
a single public IP
● Routing Redundancy Protocols
○ Routing Redundancy Protocol
■ A network protocol that prevents disruptions in communication by
automatically rerouting data traffic in case of path or device failure
○ First Hop Redundancy Protocol (FHRP)
■ Group of protocols ensuring network reliability by providing automatic
failover to a backup router if the primary router fails
■ Benefits
● Reliability
○ Ensures communications remain up even if a router fails
155
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Load Balancing
○ Distributes network traffic across multiple routers to
prevent overload
● Seamless Transitions
○ Makes quick and seamless transitions from sending data to
one router to another
■ Components
● Virtual IP
○ Represents one or more devices
○ Used as default gateway for devices in the network
● Subinterface
○ Allows a single physical interface to be divided into
multiple logical interfaces, improving network
management and security
■ Protocols
● Hot Standby Router Protocol (HSRP)
○ Establishes a fault-tolerant default gateway for devices on
a local network segment
○ Enables two or more riders to work together
■ Active router
● Handles all the networks routing
responsibilities
156
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ Standby router
● Designed to wait to take over when the
active router fails
○ Preempting
■ Allows a higher priority router to take over as the
active router
● Virtual Router Redundancy Protocol (VRRP)
○ Functions similarly to HSRP but is an open standard
■ Not tied to a specific vendor
○ Enables multiple routers to act as a single virtual router
○ Provides a simple and automatic election scheme
● Gateway Load Balancing Protocol (GLBP)
○ Adds load balancing capabilities, allowing multiple routers
to simultaneously forward packets to distribute traffic load
○ Assigns different virtual MAC addresses to each group
member for load balancing
○ Automatically redirects traffic to other routers in the group
if any fail
○ Importance
■ Critical for network designs to ensure continuous network availability,
reliability, and efficiency especially as networks are relied upon for global
communications and entertainment
157
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Understanding Routing: Demonstration
● Multicast Routing
○ Multicast Routing
■ Sending traffic to a class D IP address (multicast group) to deliver
messages to multiple recipients efficiently
■ Objective:
● Send traffic out once and have all interested devices receive it,
while others ignore it
○ Methods of Multicast Routing
■ IGMP (Internet Group Management Protocol)
● Used by clients and routers to let the routers know which
interfaces have multicast receivers
● Allows clients to join multicast groups and receive messages
● More about clients and servers together
● IGMPv1
○ Caused unnecessary traffic due to periodic group queries
● IGMPv2
○ Improved by allowing clients to send leave messages
● IGMPv3
○ Added support for source-specific multicast
158
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
■ PIM (Protocol Independent Multicast)
● Enables multicast traffic routing between multicast-enabled
routers
● Forms multicast distribution trees
● Focuses more on routing
● PIM Dense Mode (PIM-DM)
○ Uses flood and prune behavior, causing network
performance issues
■ Floods traffic initially, then prunes non-optimal
routes
■ High network performance impact due to periodic
flooding
○ Not commonly used in modern networks
● PIM Sparse Mode (PIM-SM)
○ Uses shared distribution tree initially, then switches to
optimal tree (Shortest Path Tree/SPT)
○ Lower impact on network performance
○ Preferred in modern networks for efficiency
159
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Generic Routing Encapsulation
○ Generic Routing Encapsulation (GRE)
■ A tunneling protocol used to encapsulate a wide variety of network layer
protocols inside a virtual point-to-point link over an Internet Protocol
network
■ GRE tunnels operate at Layer 3 or the network layer of the OSI model
■ Serves as a universal translator
● Allows different protocols to communicate and traverse over a
shared network infrastructure
● Useful for connecting similar network topologies over a different
intermediate network
○ Use Cases
■ Connecting branch offices securely and efficiently over the internet
without expensive dedicated leased lines
■ Encapsulating protocols for tunneling without the additional overhead of
encryption techniques inside a VPN, making it ideal for connecting
heterogeneous networks
○ Comparison with VPN
■ GRE
● Favored for its simplicity and efficiency in encapsulating multiple
protocol types, making it lightweight compared to a full
site-to-site VPN
160
https://www.DionTraining.com
CompTIA Network+
(N10-009) (Study Notes)
● Preferred when the main objective is to encapsulate protocols for
tunneling without the additional overhead created by encryption
techniques
■ VPN
● Could provide more robust security features, but with additional
overhead due to encryption
○ GRE also provides versatility and integration by allowing different network
protocols to co-exist and collaborate in heterogeneous network environments
○ GRE tunnels are set up and configured on network routers
○ GRE tunnels can be used with additional encryption techniques for securing data
over untrusted networks like the internet