Router, Routing - PowerPoint PPT Presentation

1 / 169
About This Presentation
Title:

Router, Routing

Description:

Why Routing Protocols are necessary? Distance-Vector Routing / Link ... destination network and selecting the optimum or 'shortest' path to reach that network. ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 170
Provided by: tkwu
Category:
Tags: net | optimum | router | routing

less

Transcript and Presenter's Notes

Title: Router, Routing


1
??????Router, Routing RIPChap 1, 2, 3, 4
5, Semester 2
2
Overview
  • Routers
  • Routing Basics
  • Why Routing Protocols are necessary?
  • Distance-Vector Routing / Link State Routing
  • The Context of Different Routing Protocols
  • RIP

3
Chap 1Router Basics Routing
4
Router Basics
5
Router Basics
  • Routers are Computers
  • OS, CPU, Memory, RAM, Flash (HD), etc
  • Routers are at the network center
  • Routers determine the best path

6
Router Bootup Process
7
Show version
8
Router Interfaces
9
Router OSI 7-layers
10
Basic 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)
13
Routing Table (show ip route)
14
Routing 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
15
Packet forwarding
  • Involves two functions
  • Path determination function
  • Switching function

16
Path 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.

17
Routing Table
18
One of three path determinations results
  • Directly Connected Network
  • Remote Network
  • No Route Determined
  • Is default route configured?

19
Switching 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.

20
Best 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.

21
Two commonly used metrics are
  • Hop count
  • Bandwidth
  • Of course there are many others

22
Hop counts vs Bandwidth
23
Equal 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.

24
Unequal cost load balancing
  • EIGRP (as well as IGRP) are the only routing
    protocols that can be configured for unequal cost
    load balancing.

25
Review
  • A day in the life of a packet
  • Make sure the life of a packet is in your day
    of networking

26
How routers route packets from source to
destination?
  • The KEY IS (again) Network Address Routing
    Table

27
Router OSI 7-layers
28
Chap 2
  • Trouble-shooting
  • Static route
  • CDP Cisco Discovery Protocol

29
Router Trouble-Shooting
30
show ip route?
31
show interface?
32
show running-config
33
show cdp neighbors detail(we did not mention
this before Details later )
34
Verify changes to the routing table with debug
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
38
(No Transcript)
39
CDP Cisco Discovery Protocol
40
Cisco CDP
  • Cisco Discovery Protocol (CDP) is a Layer 2
    protocol that connects lower physical media and
    upper network layer protocols

41
Cisco 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.

42
Cisco 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

43
CDP 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)
45
show 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
46
Terms (of different bridges)
  • T Transparent Bridge
  • Ethernet
  • Bridge that learns Switching Table
    transparently
  • B Source Route Bridge
  • Token Ring
  • Developed by IBM

47
CDP 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).

48
Information 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

49
CDP Commands
50
Show CDP
51
Configure cdp(Setting the holdtime Timer)
52
Getting Neighbor Information
53
Show CDP Entry
Will show neighbors enabled routed protocols
addresses
Version Information
54
Show cdp neighbors detail
CDP version 2
Detail adds network address, enabled protocols,
and software version
55
Show CDP Traffic
56
Show CDP Traffic
57
Show CDP Interface
58
Show CDP Interface
59
Disable CDP
60
Static route
61
A router can learn about remote networks in one
of two ways
  • Manually, from configured static routes
  • Automatically, from a dynamic routing protocol

62
Static vs Dynamic Routes
63
Why use static route?(Stub Network)
Running a routing protocol between R1 and R2 is
a waste of resources
64
Configuring static route (1)
192.168.2.0 255.255.255.0 172.17.2.2
R1
R1
65
Static route setup using next-hop address(Side
effect Recursive Lookup)
66
Configuring static route (2)
67
Differences 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

68
Static route setup using exit interface
69
Modifying Static Routes
70
Verify Static Routeshow ip route
71
Does it matter if the next-hop is via
Point-to-Point or Multi-hop link?
Point-to-point WAN
Ethernet
72
Difference 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)

73
And
  • Remember ARP?
  • which is required for Ethernet to map IP address
    to MAC address

74
Now, 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.

75
Any 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

76
Summary Static Route
77
Route 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

78
Route Summarization - Example
79
Configuring 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
80
How 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
81
Most 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.

82
Default 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.

83
Default 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

84
Default Route
85
Configuring default route
86
Configure 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
87
Practice
  • Please go through the routing process depicted in
    Section 2.7.1 (Static Routes and Packet
    Forwarding)

88
Chap 3Dynamic Routing Protocol
89
What 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.

90
Dynamic 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Ā 

91
Dynamic Routes Update
92
Components 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.

93
Routing 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

94
Dynamic 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.

95
Dynamic vs Static Routing
96
Dynamic Routing Protocol Classification
97
Interior vs Exterior
98
Autonomous System??(??)??
  • Internet ???????????(??)?????
  • IBM ????????? AS
  • Hinet (may contain one or many ASs)
  • Seednet (so is Seednet)

99
Autonomous System
  • ?? Autonomous System ?????????? Routing ??
  • IGP Interior Gateway Protocol
  • ASs ???? Routing ???
  • EGP Exterior Gateway Protocol(BGP Border
    Gateway Protocol)

100
AS ??? Routing
101
Distance-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

102
Distance-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

103
Link-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

104
Link-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)

105
Distance 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.

106
Hub Spoke
Spoke
107
Link-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

108
Distance-vector vs Link-state
109
DV vs LS
  • ???????
  • Neighbors vs All
  • ????????
  • ?? vs ?????
  • ???????
  • ????? vs ?????? local ??
  • ????????
  • ??? vs SPF

110
Classful Routing
Classful routing protocols do not send subnet
mask information in routing updates.
111
Classless Routing
Classless routing protocols include the subnet
mask with the network address in routing
updates.
112
Convergence
  • 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.

113
Time 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.

114
Criteria 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

115
Criteria 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.

116
Most 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

117
Most 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.

118
The 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.

119
Metric Example with RIP
120
Load 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.
121
Choose best path from 2 routing tables generated
by 2 routing protocols
How R2 determine the best path to 192.168.6.0
network?
122
Administrative Distance
90 vs 120
123
Administrative Distance of Various Protocols
The administrative distancecan be modified.
(CCNP)
124
Criteria 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.

125
Distance Vector Routing Protocol
126
With 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

127
Distance Vector Routing Protocol
  • Periodic Updates
  • Neighbors
  • Broadcast Updates
  • Not necessarily true
  • Entire Routing Table Updates

128
Advantages Disadvantages of Distance Vector
Protocol
129
Routing Protocol Learning Check
Later
130
Network Discovery with DVRP
131
Dynamic Routing Protocol Evolution
Classification
132
Routing Loop
133
The 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

134
A 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."

135
Mechanisms to eliminate routing loops
  • Defining a maximum metric to prevent count to
    infinity
  • Holddown timers
  • Split horizon
  • Route poisoning or poison reverse
  • Triggered updates

136
TTL (in IP packet) in effect
137
Infinity 16 with RIP
138
Holddown 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).
139
Route Poisoning
Route poisoning is used to mark the route as
unreachable in a routing update that is sent to
other routers.
140
Split Hosizon
The split horizon rule says that a router should
not advertise a network through the interface
from which the update came.
141
Split 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.
142
Triggered Updates
Triggered updates, used in conjunction with route
poisoning, ensure that all routers know of failed
routes before any holddown timers can expire.
143
RIPRouting Information Protocol
144
(No Transcript)
145
Characteristics of RIP
146
Configuring RIP
147
Verify 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
148
Verify RIP configuration
Timers
CCNP
Only RIP used
Load balancing route counts
Connected networks
149
Debug RIP
150
No Router beyond Fa0/0
However, updates keep sendingout through Fa0/0
RIPv1 uses broadcast!
151
Stopping Unnecessary RIP Updates(with
passive-interface)
Fa0/0 is not listed here any more
152
Automatic Sumarization
  • RIP is a classful routing protocol that
    automatically summarizes classful networks across
    major network boundaries.
  • ?? Class A, B C

153
Automatic Summarization
154
Automatic Summarization
155
Rules 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.

156
Rules in Chinese
  • ? routing update ???????? update ??????? ?
    ??????? subnet mask
  • ? routing update ???????? update ??????? ? ??
    routing update ???? default subnet mask (? A, B
    C ?)

157
Can you figure out the contents of each routers
routing table?
158
R2 debug output
159
Routing table for R1
160
Routing table for R3
WHY??? Look back the rules for summarization
161
Advantages 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.

162
Disadvantages of Automatic Summarization
Discontinuous networks
163
Disadvantages of Automatic Summarization
Routing Table for R1
OOPS ?R1 does not have any routes to the LANs
attached to R3
164
Disadvantages of Automatic Summarization
Routing Table for R3
OOPS ?R3 does not have any routes to the LANs
attached to R1
165
Disadvantages 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
166
Adding 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
167
Configuration
168
Routing Tables
169
Default Route Propagation
Write a Comment
User Comments (0)
About PowerShow.com