Title: Router, Routing
1??????Router, Routing RIPChap 1, 2, 3, 4
5, Semester 2
2Overview
- Routers
- Routing Basics
- Why Routing Protocols are necessary?
- Distance-Vector Routing / Link State Routing
- The Context of Different Routing Protocols
- RIP
3Chap 1Router Basics Routing
4Router Basics
5Router Basics
- Routers are Computers
- OS, CPU, Memory, RAM, Flash (HD), etc
- Routers are at the network center
- Routers determine the best path
6Router Bootup Process
7Show version
8Router Interfaces
9Router OSI 7-layers
10Basic Router Configuration
- Naming the router
- Setting passwords
- Configuring interfaces
- Configuring a banner
- Saving changes on a router
- Verifying basic configuration and router
operations
11(No Transcript)
12(No Transcript)
13Routing Table (show ip route)
14Routing Table (show ip route)
Next hop address
exit interface
Hop count
Administrative Distance
seconds passed since last update
Destination network
RIP is actually running on this router
15Packet forwarding
- Involves two functions
- Path determination function
- Switching function
16Path Determination
- The process of how the router determines which
path to use when forwarding a packet. - To determine the best path, the router searches
its routing table for a network address that
matches the packet's destination IP address.
17Routing Table
18One of three path determinations results
- Directly Connected Network
- Remote Network
- No Route Determined
- Is default route configured?
19Switching Function
- The process used by a router to accept a packet
on one interface and forward it out another
interface. - A key responsibility of the switching function is
to encapsulate packets in the appropriate data
link frame type for the outgoing data link.
20Best Path
- Determining a router's best path involves the
evaluation of multiple paths to the same
destination network and selecting the optimum or
"shortest" path to reach that network.
21Two commonly used metrics are
- Hop count
- Bandwidth
- Of course there are many others
22Hop counts vs Bandwidth
23Equal Cost Load Balancing
- When a router has multiple paths to a destination
network and the value of that metric is the same - equal cost metric ? the router will perform equal
cost load balancing - The routing table will contain the single
destination network but will have multiple exit
interfaces, one for each equal cost path.
24Unequal cost load balancing
- EIGRP (as well as IGRP) are the only routing
protocols that can be configured for unequal cost
load balancing.
25Review
- A day in the life of a packet
- Make sure the life of a packet is in your day
of networking
26How routers route packets from source to
destination?
- The KEY IS (again) Network Address Routing
Table
27Router OSI 7-layers
28Chap 2
- Trouble-shooting
- Static route
- CDP Cisco Discovery Protocol
29Router Trouble-Shooting
30show ip route?
31show interface?
32show running-config
33show cdp neighbors detail(we did not mention
this before Details later )
34Verify changes to the routing table with debug
35(No Transcript)
36(No Transcript)
37(No Transcript)
38(No Transcript)
39CDP Cisco Discovery Protocol
40Cisco CDP
- Cisco Discovery Protocol (CDP) is a Layer 2
protocol that connects lower physical media and
upper network layer protocols
41Cisco CDP
- When a Cisco device boots up, CDP starts up
automatically and allows the device to detect
neighboring devices that are also running CDP. - It runs over the data link layer and allows two
systems to learn about each other, even if they
are using different network layer protocols.
42Cisco CDP
- CDP is used to obtain information about
neighboring devices, such as - types of devices connected,
- the router interfaces they are connected to,
- the interfaces used to make the connections,
- the model numbers of the devices.
- CDP is media and protocol independent
43CDP provides the following information about each
CDP neighbor device
- Device identifiers - For example, the configured
host name of a switch - Address list - Up to one Network layer address
for each protocol supported - Port identifier - The name of the local and
remote port-in the form of an ASCII character
string such as ethernet0 - Capabilities list - For example, whether this
device is a router or a switch - Platform - The hardware platform of the device
for example, a Cisco 7200 series router
44(No Transcript)
45show cdp neighbors
How long is this information valid
CDP frame can retrieve a great deal of useful
information about connected neighboring Cisco
devices. This information can be used to create a
network map of the connected devices
46Terms (of different bridges)
- T Transparent Bridge
- Ethernet
- Bridge that learns Switching Table
transparently - B Source Route Bridge
- Token Ring
- Developed by IBM
47CDP Version
- CDP Version 2 (CDPv2) is the most recent release
of the protocol. - Cisco IOS (Release 12.0(3)T or later) supports
CDPv2. - CDP Version 1 (CDPv1) is enabled by default with
Cisco IOS (Release 10.3 to 12.0(3)T).
48Information exchanged through CDP
- CDP provides information about each CDP neighbor
device by transmitting type length values (TLVs),
which are blocks of information embedded in CDP
advertisements. - Device TLVs include
- Device ID, Local Interface, Holdtime, Capability,
Platform, Port ID - (CDPv2 only) VTP Management Domain Name, Native
VLAN, Full/Half-Duplex
49CDP Commands
50Show CDP
51Configure cdp(Setting the holdtime Timer)
52Getting Neighbor Information
53Show CDP Entry
Will show neighbors enabled routed protocols
addresses
Version Information
54Show cdp neighbors detail
CDP version 2
Detail adds network address, enabled protocols,
and software version
55Show CDP Traffic
56Show CDP Traffic
57Show CDP Interface
58Show CDP Interface
59Disable CDP
60Static route
61A router can learn about remote networks in one
of two ways
- Manually, from configured static routes
- Automatically, from a dynamic routing protocol
62Static vs Dynamic Routes
63Why use static route?(Stub Network)
Running a routing protocol between R1 and R2 is
a waste of resources
64Configuring static route (1)
192.168.2.0 255.255.255.0 172.17.2.2
R1
R1
65Static route setup using next-hop address(Side
effect Recursive Lookup)
66Configuring static route (2)
67Differences of the above two
- Using Interface
- Default Administrative Distance 0
- the same as a directly connected network
- Using Next-Hop IP address
- Default Administrative Distance 1
- Default Administrative Distance can be changed
- waycross(config)ip route 172.16.3.0
255.255.255.0 172.16.4.1 130
68Static route setup using exit interface
69Modifying Static Routes
70Verify Static Routeshow ip route
71Does it matter if the next-hop is via
Point-to-Point or Multi-hop link?
Point-to-point WAN
Ethernet
72Difference between Point-to-Point and Multi-hop
link?
- Point-to-Point
- ip route 172.16.3.0 255.255.255.0 172.16.4.1
- ip route 172.16.3.0 255.255.255.0 s0/0? s0/0
also directs to 172.16.4.1 - Multihop
- ip route 172.16.3.0 255.255.255.0 172.16.4.1
- ip route 172.16.3.0 255.255.255.0 fa0/0? fa0/0
may link to a number of next-hop
destinations (multi-access connection)
73And
- Remember ARP?
- which is required for Ethernet to map IP address
to MAC address
74Now, do you see the difference between these two?
- ip route 172.16.3.0 255.255.255.0 172.16.4.1
- ip route 172.16.3.0 255.255.255.0 fa0/0
- For static route configured using exit interface
- the Router does not know the next-hop IP address
and therefore it cannot determine the destination
MAC address for the Ethernet frame.
75Any way to fix it?
- ip route 172.16.3.0 255.255.255.0 fa 0/0
172.16.4.1Routing table then looks likeS
172.16.3.0/24 1/0 via 172.16.4.1 FastEthernet0/0
76Summary Static Route
77Route Summarization
- Multiple static routes can be summarized into a
single static route if - The destination networks can be summarized into a
single network address, and - The multiple static routes all use the same
exit-interface or next-hop IP address
78Route Summarization - Example
79Configuring a Summary Route
R3(config)no ip route 172.16.1.0 255.255.255.0
serial0/0/1 R3(config)no ip route 172.16.2.0
255.255.255.0 serial0/0/1 R3(config)no ip route
172.16.3.0 255.255.255.0 serial0/0/1
R3(config)ip route 172.16.0.0 255.255.252.0
serial0/0/1
80How does router deal with this
Part of routing table looks like
And, a packet destined for 172.16.1.100, which
matches both routes, arrives
81Most Specific Match
- The routing table lookup process will use the
most-specific match. - Because 24 bits match the 172.16.1.0/24 route,
and only 16 bits of the 172.16.0.0/16 route
match, the static route with the 24 bit match
will be used. - the longest match.
- The packet will then be encapsulated in a Layer 2
frame and sent via the Serial 0/0/0 interface.
82Default Static Route
- Default static routes are used when a route will
match all packets. - When connecting a company's edge router to the
ISP network. - A stub router.
83Default Route
- Default routes are used to route packets with
destinations that do not match any of the other
routes in the routing table. - Routers are typically configured with a default
route for Internet-bound traffic - since it is often impractical and unnecessary to
maintain routes to all networks in the Internet. - A default route is actually a special static
route that uses this format ip route 0.0.0.0
0.0.0.0 next-hop-address outgoing interface
84Default Route
85Configuring default route
86Configure a default route
R1(config)no ip route 172.16.1.0 255.255.255.0
serial 0/0/0 R1(config)no ip route 192.168.1.0
255.255.255.0 serial 0/0/0 R1(config)no ip route
192.168.2.0 255.255.255.0 serial
0/0/0 R1(config) ip route 0.0.0.0 0.0.0.0
serial 0/0/0
87Practice
- Please go through the routing process depicted in
Section 2.7.1 (Static Routes and Packet
Forwarding)
88Chap 3Dynamic Routing Protocol
89What is dynamic routing protocol?
- Routing protocols are used to facilitate the
exchange of routing information between routers. - Routing protocols allow routers to dynamically
share information about remote networks and
automatically add this information to their own
routing tables.
90Dynamic Routing
- The success of dynamic routing depends on two
basic router functions - Maintenance of a routing table
- Timely distribution of knowledge, in the form of
routing updates, to other routersĀ
91Dynamic Routes Update
92Components of a routing protocol
- Data structures
- Routing information kept in tables and/or
databases and stored in RAM. - Algorithm
- Routing protocols use algorithms for facilitating
routing information and for best path
determination. - Routing protocol messages
- Routing protocols use various types of messages
to discover neighboring routers, exchange routing
information, and other tasks to learn and
maintain accurate information about the network.
93Routing protocol
- A routing protocol defines the set of rules used
by a router when it communicates with neighboring
routers. - For example, a routing protocol describes
- how to send updates
- what knowledge is contained in these updates
- when to send this knowledge
- how to locate recipients of the updates
94Dynamic Routing Protocol Operation
- The router sends and receives routing messages on
its interfaces. - The router shares routing messages and routing
information with other routers that are using the
same routing protocol. - Routers exchange routing information to learn
about remote networks. - When a router detects a topology change the
routing protocol can advertise this change to
other routers.
95Dynamic vs Static Routing
96Dynamic Routing Protocol Classification
97Interior vs Exterior
98Autonomous System??(??)??
- Internet ???????????(??)?????
- IBM ????????? AS
- Hinet (may contain one or many ASs)
- Seednet (so is Seednet)
99Autonomous System
- ?? Autonomous System ?????????? Routing ??
- IGP Interior Gateway Protocol
- ASs ???? Routing ???
- EGP Exterior Gateway Protocol(BGP Border
Gateway Protocol)
100AS ??? Routing
101Distance-Vector
- A router periodically sends all of its neighbors
two pieces of information about the destinations
it knows how to reach - how far away (it thinks) the destination is
- what direction to use to get to the destination
102Distance-Vector Protocol
- Distance ??
- How many hops away from destination(sometimes,
distance may be measured in time delay or else) - Vector ??
- Which way to some destinatione.g., send packet
to me if you want to reach some destination
103Link-State Protocol
- A router provides information about the topology
of the network in its immediate vicinity - links it attaches to
- state (functioning or not) of those links
- The information is then flooded to the network
- Each router computes its best path (bases on the
above information) to all destinations
104Link-State Protocol
- Which path is best is up to each protocol
- path with the least number of hops
- based on bandwidth, current load on the link,
administrative weights, or even policy
information restricting which packets may
traverse the link (e.g., a given link might not
be allowed to carry confidential information)
105Distance vector protocols work best in situations
- The network is simple and flat and does not
require a special hierarchical design. - The administrators do not have enough knowledge
to configure and troubleshoot link-state
protocols. - Specific types of networks, such as hub-and-spoke
networks, are being implemented. - Worst-case convergence times in a network are not
a concern.
106Hub Spoke
Spoke
107Link-state protocols work best in situations
- The network design is hierarchical, usually
occurring in large networks. - The administrators have a good knowledge of the
implemented link-state routing protocol. - Fast convergence of the network is crucial.
- Convergence later
108Distance-vector vs Link-state
109DV vs LS
- ???????
- Neighbors vs All
- ????????
- ?? vs ?????
- ???????
- ????? vs ?????? local ??
- ????????
- ??? vs SPF
110Classful Routing
Classful routing protocols do not send subnet
mask information in routing updates.
111Classless Routing
Classless routing protocols include the subnet
mask with the network address in routing
updates.
112Convergence
- Convergence is when all routers' routing tables
are at a state of consistency. - The network has converged when all routers have
complete and accurate information about the
network.
113Time to Convergence
- Convergence time is the time it takes routers to
share information, calculate best paths, and
update their routing tables. - Fast convergence is a desirable network feature
because it reduces the period of time in which
routers would continue to make incorrect/wasteful
routing decisions.
114Criteria for Path Determination
- When a routing algorithm updates a routing table,
its primary objective is to determine the best
information to include in the table. - Each routing algorithm interprets what is best in
its own way. - The algorithm generates a number, called the
metric value, for each path through the network. - Typically, the smaller the metric number, the
better the path
115Criteria for Path Determination
- You can calculate metrics based on a single
characteristic of a path - You can also calculate more complex metrics by
combining several characteristics.
116Most commonly used metrics - 1
- Hop count - A simple metric that counts the
number of routers a packet must traverse - Bandwidth - Influences path selection by
preferring the path with the highest bandwidth - Load - Considers the traffic utilization of a
certain link
117Most commonly used metrics - 2
- Delay - Considers the time a packet takes to
traverse a path - Reliability - Assesses the probability of a link
failure, calculated from the interface error
count or previous link failures - Cost - A value determined either by the IOS or by
the network administrator to indicate preference
for a route. Cost can represent a metric, a
combination of metrics or a policy.
118The metric for each routing protocol is
- RIP
- Hop count
- IGRP and EIGRP
- Bandwidth, Delay, Reliability, and Load
- IS-IS and OSPF
- Cost
- Cisco's implementation of OSPF uses bandwidth.
- IS-IS is discussed in CCNP.
119Metric Example with RIP
120Load balancing with RIP
The interface pointer cycles through the
interfaces and routes in a deterministic fashion
such as 1-2-3-4-1-2-3-4-1 and so on. Because the
metric for RIP is hop count, no regard is given
to the speed of the links.
121Choose best path from 2 routing tables generated
by 2 routing protocols
How R2 determine the best path to 192.168.6.0
network?
122Administrative Distance
90 vs 120
123Administrative Distance of Various Protocols
The administrative distancecan be modified.
(CCNP)
124Criteria in selecting the best path
- Route with the lowest administrative distance
- Path with the lowest cost or metric to the
destination - If, multiple paths with the same administrative
distance and cost to a destination,
load-balancing can occur.
125Distance Vector Routing Protocol
126With distance vector routing protocol
- A router does not have the knowledge of the
entire path to a destination network. - Instead the router knows only
- The direction or interface in which packets
should be forwarded and - The distance or how far it is to the destination
network
127Distance Vector Routing Protocol
- Periodic Updates
- Neighbors
- Broadcast Updates
- Not necessarily true
- Entire Routing Table Updates
128Advantages Disadvantages of Distance Vector
Protocol
129Routing Protocol Learning Check
Later
130Network Discovery with DVRP
131Dynamic Routing Protocol Evolution
Classification
132Routing Loop
133The loop may be a result of
- Incorrectly configured static routes
- Incorrectly configured route redistribution
(redistribution is a process of handing the
routing information from one routing protocol to
another routing protocol and is discussed in
CCNP-level courses) - Inconsistent routing tables not being updated due
to slow convergence in a changing network - Incorrectly configured or installed discard
routes
134A routing loop can create the following
conditions
- Link bandwidth will be used for traffic looping
back and forth between the routers in a loop. - A router's CPU will be strained due to looping
packets. - A router's CPU will be burdened with useless
packet forwarding that will negatively impact the
convergence of the network. - Routing updates may get lost or not be processed
in a timely manner. These conditions would
introduce additional routing loops, making the
situation even worse. - Packets may get lost in "black holes."
135Mechanisms to eliminate routing loops
- Defining a maximum metric to prevent count to
infinity - Holddown timers
- Split horizon
- Route poisoning or poison reverse
- Triggered updates
136TTL (in IP packet) in effect
137Infinity 16 with RIP
138Holddown Timer
Holddown timers are used to prevent regular
update messages from inappropriately reinstating
a route that may have gone bad. Any other
information for that route containing the same
status, or worse, is ignored for a predetermined
amount of time (the holddown period).
139Route Poisoning
Route poisoning is used to mark the route as
unreachable in a routing update that is sent to
other routers.
140Split Hosizon
The split horizon rule says that a router should
not advertise a network through the interface
from which the update came.
141Split Horizon with Poison Reverse
R3 poisons the metric with a value of 16 and then
sends out a triggered update stating that
10.4.0.0 is unavailable. R2 processes that
update, invalidates the routing entry in its
routing table, and immediately sends a poison
reverse back to R3.
142Triggered Updates
Triggered updates, used in conjunction with route
poisoning, ensure that all routers know of failed
routes before any holddown timers can expire.
143RIPRouting Information Protocol
144(No Transcript)
145Characteristics of RIP
146Configuring RIP
147Verify RIP configuration
Next hop address
exit interface
Hop count
Administrative Distance
seconds passed since last update
Destination network
RIP is actually running on this router
148Verify RIP configuration
Timers
CCNP
Only RIP used
Load balancing route counts
Connected networks
149Debug RIP
150No Router beyond Fa0/0
However, updates keep sendingout through Fa0/0
RIPv1 uses broadcast!
151Stopping Unnecessary RIP Updates(with
passive-interface)
Fa0/0 is not listed here any more
152Automatic Sumarization
- RIP is a classful routing protocol that
automatically summarizes classful networks across
major network boundaries. - ?? Class A, B C
153Automatic Summarization
154Automatic Summarization
155Rules for Automatic Summarization
- If a routing update and the interface on which it
is received belong to the same major network, the
subnet mask of the interface is applied to the
network in the routing update. - If a routing update and the interface on which it
is received belong to different major networks,
the classful subnet mask of the network is
applied to the network in the routing update.
156Rules in Chinese
- ? routing update ???????? update ??????? ?
??????? subnet mask - ? routing update ???????? update ??????? ? ??
routing update ???? default subnet mask (? A, B
C ?)
157Can you figure out the contents of each routers
routing table?
158R2 debug output
159Routing table for R1
160Routing table for R3
WHY??? Look back the rules for summarization
161Advantages of Automatic Summarization
- Smaller routing updates sent and received, which
uses less bandwidth for routing updates between
R2 and R3. - R3 has a single route for the 172.30.0.0/16
network, regardless of how many subnets there are
or how it is subnetted. Using a single route
results in a faster lookup process in the routing
table for R3.
162Disadvantages of Automatic Summarization
Discontinuous networks
163Disadvantages of Automatic Summarization
Routing Table for R1
OOPS ?R1 does not have any routes to the LANs
attached to R3
164Disadvantages of Automatic Summarization
Routing Table for R3
OOPS ?R3 does not have any routes to the LANs
attached to R1
165Disadvantages of Automatic Summarization
Routing Table for R2
OOPS ?R2 has two equal-cost paths to the
172.30.0.0 network ?R2 will load balance traffic
destined for any subnet of 172.30.0.0. This
means that R1 will get half of the traffic
and R3 will get the other half of the traffic
whether or not the destination of the
traffic is for one of their LANs
166Adding Internet Access to the Network
1. Disable RIP routing for network 192.168.4.0 on
R2. 2. Configure R2 with a static default route
to send default traffic to R3. 3. Completely
disable RIP routing on R3. 4. Configure R3 with
a static route to the 172.30.0.0 subnets.
Stub Network
172.30.3.0/24
172.30.2.0/24
172.30.1.0/24
167Configuration
168Routing Tables
169Default Route Propagation