A network device that is used to move packets between logical networks
Primary functions of a router
Determine the best path to forward packets based on the information in its routing table
Forward packets toward their destination
Other beneficial functions of routers
Broadcast containment by limiting their propagation within the local network
Interconnect geographically separated locations
Group users logically by application or department within an organization
Provide enhanced security by filtering unwanted traffic through access control lists
Routing table
A data structure stored in RAM to track the list of known networks and how to reach them
Contents of the routing table
Directly Connected Networks
Remote Networks
Commands to display the routing table
1. show ip route
2. show ipv6 route
Routing table entry contents
Route source
Destination network (prefix and prefix length)
Administrative distance
Metric
Next-hop
Route timestamp
Exit interface
Next hop
The IP address of the next router to which the packet would be forwarded
Exit interface
The egress interface to use for outgoing packets to reach their final destination
Directly connected networks
Networks that a router is a member of through one of its interfaces
Remote networks
Networks that a router must use a neighboring router to reach
Route source codes
L - local
C - connected
S - static
O/R/D, etc - dynamically learned
* - candidate for default route
Directly connected routes
Automatically added when an interface is configured with an IP address and is activated
Local route
A route for each directly connected network, used by the router to efficiently differentiate when it receives a packet for its own interface instead of a packet that needs to be forwarded
Static routes
Manually configured paths between two networking devices
Dynamic routes
Routes learned automatically from other routers using routing protocols
Default route
Specifies a next-hop router to use when the routing table does not contain a specific route that matches the destination IP address
Route metric
A quantitative representation of the distance to the destination network, automatically calculated by the router based on the rules of the routing protocol
Administrative distance (AD)
Represents the "trustworthiness" of the route source, used to determine which route to install into the IP routing table when multiple routes to the same destination are learned
Administrative distance values for different route sources
Directly connected - 0
Static route - 1
EIGRP summary route - 5
External BGP - 20
Internal EIGRP - 90
OSPF - 110
IS-IS - 115
RIP - 120
External EIGRP - 170
Internal BGP - 200
When choosing among several route options to a destination, a router prioritizes the lowest AD followed by the lowest metric
Administrative Distance (AD)
Represents the "trustworthiness" of the route source. Lower AD = more trustworthy route source.
Route Source
Directly connected
Static route
EIGRP summary route
External BGP
Internal EIGRP
OSPF
IS-IS
RIP
External EIGRP
Internal BGP
Metric
Used to choose among several route options to a destination, a router prioritizes the lowest AD followed by the lowest metric
Every router makes its decision alone, based on the information it has in its own routing table
The information in a routing table of one router does not necessarily match the routing table of another router
Routing information about a path does not provide return routing information
Child route
A destination network that is a subnet of a classful network
Parent route
A classful network appearing above a child route, indicating which classful network the child route was subnetted from
The concept of network classes was never part of IPv6, so the structure of an IPv6 routing table is very straight forward
Static routing
Manually configured by a network administrator to define an explicit path between two networking devices, not automatically updated
Dynamic routing
Uses routing protocols so that routers automatically share information among themselves about the reachability and status of remote networks
Routing protocol
Used to exchange routing information and populate the routing table with the choice of best paths
Prefix
Network address
Prefix length
Subnet mask
To determine if a route is suitable for forwarding, a packet destination must match the route prefix by a number of far-left bits that is equal to or more than the prefix length
When the routing table contains several routes that fulfill the prefix match requirement for a packet, the preferred route is the one with the longest matched prefix to the packet destination
Prefix
A number of far-left bits that is equal to or more than the prefix length
Longest Match
When the routing table contains several routes that fulfill the prefix match requirement for a packet, the preferred route is the one with the longest matched prefix to the packet destination