Cisco Systems Networking Academy S2 C 11

Download Report

Transcript Cisco Systems Networking Academy S2 C 11

Cisco Systems Networking
Academy
S2 C 11
Routing Basics
Routing Tables
• An IP routing table consists of destination network
addresses and next hop pairs
• At each stop, the next destination is calculated
• The network layer provides best-effort end-to-end
packet delivery across interconnected networks
• After the path is selected, the router forwards the
packet
How Routers Route
• As frames are received, the data link layer header
is removed and discarded and the network layer
frame is sent to the appropriate network layer
process
• Network protocol header is examined to determine
destination of packet
• Packet is then passed back to data link layer where
it is encapsulated in a new frame and queued for
delivery to appropriate interface
How Routers Route - 2
• Each line between the routers has a number that
routers use as a network address
• Consistency of Layer 3 addresses across
internetwork improves use of bandwidth by
preventing unnecessary broadcasts
• Consistent end-to-end addressing enables network
layer to find a path to destination without
burdening devices or links with broadcasts
Network and Host Addressing
• Network Address – path part used by router
• Host Address – specific port or device
• Destination router Ands subnet mask to
network part of address to determine subnet
that contains the host address
• Most network protocol addressing schemes
use some form of a host or node address.
Path Selection and Packet
Switching
• A router generally relays a packet from one data
link to another, using two basic functions:
– a path determination function
– a switching function
• The switching function allows a router to accept a
packet on one interface and forward it through a
second interface.
• The path determination functions selects best
interface to use to send out the packet
Routed and Routing Protocol
• Routed protocol used between routers to
direct user traffic – examples IP, IPX
• Routing protocol used between routers to
maintain routing tables – examples RIP,
IGRP, EIGRP, OSPF
Network Layer Protocol
Operations
• Layer 2 addresses may be changing constantly as
packets work their way through network but layer
3 addresses are constant
• Each router provides its services to support upperlayer functions (CCNA says 3 levels can be
supported)
• End system addresses frame using MAC address
of intermediate system
Multiple Routing Protocols
• Routers can support multiple independent
routing protocols
– This capability allows router to deliver packets
from several routed protocols over the same
data links
Static Dynamic Routes
• Static Route
– Uses programmed route the network
administrator physically enters into router
• Dynamic Route
– Uses route that routing protocol adjusts
automatically for topology or traffic changes
Static Routes
• Allow you to hide parts of network
– Dynamic routing reveals everything known
about a network
– Static routing allows you to specify information
to reveal
• Stub network (only one possible path) –
conserves resources
Default Route
• Default route used when next hop is not
specified in routing table
– Assumes and trusts next router will have a best
path to destination or contain another default
route
Why Dynamic Routing?
• An alternate route can substitute for a failed
route
• Dynamic routing protocols can also direct
traffic from the same session over different
paths in a network for better performance
– Known as load sharing
Dynamic Routing Operations
• Success depends on:
– Maintenance of routing tables
– Timely distribution of knowledge in form of routing
updates
• Routing Protocol describes
–
–
–
–
How to send updates
What knowledge is contained in updates
When to send updates
How to locate recipients of the updates
Routing Metric Components
The smaller the metric the better
•
•
•
•
•
•
•
Hop Count
Ticks
Cost
Bandwidth
Delay
Load
Reliability
Three Classes of Routing
Protocols
• Distance Vector
– Determines direction and distance (hop count)
• Link State a.k.a. Shortest Path First
– Recreates exact topology of entire network
• Hybrid – combination of distance vector
and link state
– Combines aspects of distance vector & link
state
Time to Convergence
• The time it takes all routers to share the
same information about the network
• When topology changes routers must
recompute routes (disrupts routing)
• Time to reconvergence varies with routing
protocols
Distance Vector
• Routers pass period copies of routing tables
communicating topology changes
• Each routeer receives routing tables from directly
connected routers
• Accumulates network distances
• Does not allow router to know exact topology of
entire network
• Each router sends entire routing table
– Contains total path cost and logical address of first
router on path
Routing Loops
• Occur when slow convergence causes inconsistent
routing entries
• New updates contain paths to failed routes
– Information is propagated to other routers
– Invalid updates will continue to loop until some process
stops the looping
• Condition called “COUNT TO INFINITY”
– Avoid by defining infinity (number of loops)
– Hold-down timers (route marked inaccessible and holddown timer started) – no conflicting poorer information
accepted from other routers until time expires
Split Horizon
• Incorrect information sent to a router
contradicts correct information it just sent
• Split Horizon solves problem
– if a routing update about Network 1 arrives
from Router A, Router B or Router D cannot
send information about Network 1 back to
Router A.
– Thus is reduces incorrect routing information
and routing overhead
Link State Basics
• Shortest Path First
– Complex database of topology information
– Table maintains full knowledge of distant
routers
• Uses
–
–
–
–
link-state advertisements (LSAs)
a topological database
the SPF algorithm, and the resulting SPF tree
a routing table of paths and ports to each
network
Link State Routing 2
• Algorithms rely on using same link-state updates
– Whenever topology changes, routers share information
• Convergence achieved because each router
– keeps track of its neighbors: each neighbor's name,
whether the neighbor is up or down, and the cost of the
link to the neighbor.
– constructs an LSA packet that lists its neighbor router
names and link costs, including new neighbors,
changes in link costs, and links to neighbors that have
gone down.
–
Achieving Convergence
Continued
– sends out this LSA packet so that all other routers
receive it.
– when it receives an LSA packet, records the LSA
packet in its database so that it updates the most
recently generated LSA packet from each router.
– completes a map of the internetwork by using
accumulated LSA packet data and then computes routes
to all other networks by using the SPF algorithm.
• Each time LSA packet caused change in link-state
database, SPF (link-state algorithm) recalculates
best paths & updates routing table
Link State Concerns
• Processing Requirements
– Use Dijkstra’s algorithm to compute the SPF (requires
processing task proportional to number of links in
network multiplied by number of routers)
• Memory Requirements
• Bandwidth requirements
– During initial discovery process, all routers send LSA
packets to each other – floods network and temporarily
reduce bandwidth available for routed traffic
Link State Continued
• Most important aspect to to make certain all
routers get necessary LSA packets
• Need to synchronize large networks to keep
updates correct
• Order of router startup alters topologies learned
• If LSA distribution is not done correctly, result is
invalid routes
• Scaling up on large networks can expand the
problem
Comparison
• Distance Vector
– Views topology from
neighbor’s view
– Adds distance vectors
from router to router
– Frequent, periodic
updates; slow
convergence
– Copies of routing
tables passed to
neighbors
• Link State
– Common view of
entire network
topology
– Shortest path
calculated to routers
– Event-triggered
updates; faster
convergence
– Link-state routing
updates passed
Hybrid
• Balanced-hybrid routing
– Uses distance vectors with more accurate
metrics
– Use topology changes to trigger routing
database updates
– Converges rapidly
– Uses fewer resources (bandwidth & memory)
• Example is OSI’s IS-IS and Cisco EIGRP
LAN to WAN Routing
• Routers enable LAN-to-WAN packet flow
by keeping the end-to-end source and
destination addresses constant while
encapsulating the packet in data link frames,
as appropriate, for the next hop along the
path.
Routers
• Devices that implement network services
• Provide interfaces for wide range of links and
subnetworks at wide range of speeds
• Active and intelligent network nodes that help
manage the network
– Provide dynamic control over resources
– Support tasks and goals for connectivity, reliable
performance, mgm control, & flexibility
– Route and switch but also sequence based on priority
and filtering