show ip route

Download Report

Transcript show ip route

Introduction to IP Routing
Graduate Program in Computer Science
Aristotle University of Thessaloniki
Ver.091014
IP as Routing Protocol
 IP is a connectionless,
unreliable, best-effort delivery
protocol.
 IP accepts whatever data is
passed down to it from the
upper layers and forwards the
data in the form of IP Packets.
 All the nodes are identified
using an IP address.
 Packets are delivered from the
source to the destination using
IP address
IP Routing
Source
Destination
Application
Application
Transport
Router
Transport
Network
Network
Network
Link
Link
Link
 Routing Table
Destination IP address
IP address of a next-hop router
Flags
Network interface specification
IP Routing
 How does a device know where to send a packet?
 All devices need to know what IP addresses are on directly
attached networks
 If the destination is on a local network, send it directly there
IP Routing (cont)
 If the destination address isn’t local
 Most non-router devices just send everything to a single local
router
 Routers need to know which network corresponds to each
possible IP address
Router
 A router is a device that determines the next network point to
which a packet should be forwarded toward its destination
 Allow different networks to communicate with each other
 A router creates and maintains a table of the available routes
and their conditions, and uses this information to determine the
best route for a given packet.
 A packet will travel through a number of network points with
routers before arriving at its destination.
 There can be multiple routes defined. The route with a lower
weight/metric will be tried first.
IP Routing
Packet Propagation
IP Routing Protocols
 Static Routing
 Dynamic Routing
 IGP (Interior Gateway Protocol): Route data within an
Autonomous System
• RIP (Routing Information Protocol)
• RIP-2 (RIP Version 2)
• OSPF (Open Shortest Path First)
• IGRP (Interior Gateway Routing Protocol)
• EIGRP (Enhanced Interior Gateway Routing Protocol)
• IS-IS (Intermediate System to Intermediate System)
 EGP (Exterior Gateway Protocol): Route data between
Autonomous Systems
• BGP (Border Gateway Protocol)
Terminology
 Autonomous System (AS)
 Each AS is a group of networks & routers administered by
a single authority using a common routing protocol.
 Interior Gateway Protocol (IGP)
 Routers within single AS communicate using one of
several dynamic routing protocols, known generically as
an IGP.
 Exterior Gateway Protocols (EGP)
 Communication between routers belonging to different
AS requires additional protocol, so-called EGP.
Terminology
Split
Horizon
• Router B sends info
to Router A about
router’s C
networks
• Router A now
knows about
router’s C
networks
• Router A will NOT
tell B about
router’s C
networks
• Thus, loops are
prevented
Terminology
• Router B sends
info to Router A
about router’s C
networks
Split
• Router A now
Horizon
knows about
router’s C
with
networks
Poison
Reverse • Router A will tell
B that router’s C
networks are
unreachable
through A
Classful Routing Protocols
 Classful routing protocols do not send subnet mask
information in routing updates.
 The first routing protocols, such as RIP
 When network addresses were allocated based on classes.
• Class A, B, or C.
 Routing protocol did not need to include the subnet mask in the
routing update.
• Network mask determined based on value of first octet of the
network address.
Classful & Classless
 Classful (does not support CIDR and VLSM)
 Classless (supports CIDR and VLSM)
Interior Routing Protocols or Interior Gateway Protocols (IGP)
 Distance Vector
 RIPv1 – Simple, Classful, limited metrics (hop count)
 RIPv2 – Simple, Classless, limited metrics (hop count)
Cisco Proprietary
 IGRP – Simple, Classful, better metric (BW, delay, reliab., load)
 EIGRP – Simple, Classless, same metric, DUAL (backup routes)
 Link State
 OSPF – Perceived complex, classless, Cisco metric BW, IETF
 IS-IS - Perceived complex, classless, metric “default”, ISO
Introduction to Distance Vector Routing
Protocols
 Configuring and maintaining static routes for a large network would be
overwhelming.
 What happens when that link goes down at 3:00 a.m.?
Introduction to Distance Vector Routing
Protocols
 RIP: Routing Information Protocol originally specified in RFC 1058.
 Metric: Hop count
 Hop count greater than 15 means network is unreachable.
 Routing updates: Broadcast/multicast every 30 seconds
 IGRP: Interior Gateway Routing Protocol - Cisco proprietary
 Composite metric: Bandwidth, delay, reliability and load
 Routing updates: Broadcast every 90 seconds
 IGRP is the predecessor of EIGRP and is now obsolete
 EIGRP: Enhanced IGRP – Cisco proprietary
 It can perform unequal-cost load balancing.
 It uses Diffusing Update Algorithm (DUAL) to calculate the shortest
path.
 No periodic updates, only when a change in topology.
 IGRP and EIGRP: Cisco never submitted RFCs to IETF for these protocols.
Meaning of Distance Vector
 Distance vector
 Routes are advertised as vectors of
distance and direction.
 Distance is defined in terms of a metric
 Such as hop count,
 Direction is simply the:
 Next hop router or
 exit interface.
 Routing protocol
 Does not know the topology of an
internetwork.
 Only knows the routing information
received from its neighbors.
 Distance Vector routing protocol does
not have the knowledge of the entire
path to a destination network.
Meaning of Distance Vector
 R1 knows that:
 Distance: to 172.16.3.0/24 is 1 hop
 Direction: out interface S0/0/0 toward R2
 Remember: R1 does not have a topology map, it only knows
distance and direction!
Operation of Distance Vector Routing Protocols
Periodic updates
 Some distance vector routing protocols periodically broadcast the
entire routing table to each of its neighbors. (RIP and IGRP)
 30 seconds for RIP
 90 seconds for IGRP
 Inefficient: updates consume bandwidth and router CPU resources
 Periodic updates always sent, even no changes for weeks, months,…
Operation of Distance Vector Routing Protocols
Neighbor of R1
Neighbor of R1
 Neighbors are:
 routers that share a link
 use the same routing protocol.
 Router is only aware of:
 Network addresses of its own interfaces
 Network addresses that its neighbors know.
 It has no broader knowledge of the network topology.
R3 is unaware
of R1 and
learns R1’s
networks by
R2, R4
Link-State Protocol Operation
 Link-state routing protocol can create a
“complete view,” or topology, of the network.
 Like having a complete map of the network
topology
 Link-state protocols are associated with
Shortest Path First (SPF) calculations.
 A link-state router uses the link-state
information to:
 Create a topology map
 Select the best path to all destination
networks in the topology.
Link-State Protocol Operation
 Link-state protocols work best in situations
where
 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.
Link-state protocols are triggered on events
and do not rely on periodic updates –
30/90 seconds network downtime is
UNACCEPTABLE!
Link-State Protocol Characteristics
 With link-state routing protocols, each router has the full
picture of the network topology, and can independently
make a decision based on an accurate picture of the
network topology.
 To do so, each link-state router keeps a record of:
 Its immediate neighbor routers.
 All the other routers in the network, or in its area of the
network, and their attached networks.
 The best paths to each destination.
Link-State Protocol Advantages
 Respond quickly to network changes.
 Send triggered updates when a network change occurs.
 Send periodic updates (link-state refresh), at long
intervals, such as every 30 minutes.
 Uses LSAs to confirm topology information before the
information ages out of the link-state database.
OSPF Router Tables / Databases
 OSPF maintains three databases which are used to
create three tables.
Database
Adjacency
Database
Link-state
Database
Forwarding
Database
Table
Description
Neighbor
Table
• List of all neighbor routers to which a router has established
bidirectional communication.
• This table is unique for each router.
• Can be viewed using the show ip ospf neighbor command.
Topology
Table
•
•
•
•
Routing
Table
List of information about all other routers in the network.
The database shows the network topology.
All routers within an area have identical link-state databases.
Can be viewed using the show ip ospf database command.
• List of routes generated when an algorithm is run on the linkstate database.
• Each router’s routing table is unique and contains information
on how and where to send packets to other routers.
• Can be viewed using the show ip route command.
Link-State Advertisements (LSAs)
 When a change occurs in the
network topology, the router
experiencing the change creates
a link-state advertisement (LSA)
concerning that link.
 LSAs are also called link-state
protocol data units (PDUs).
 The LSA is multicasted to all
neighboring devices using either
224.0.0.5 or 224.0.0.6. and
confirmed!
 Routers receiving the LSA
immediately forward it to all
neighboring routers.
Link-State Database (LSDB)
 Routers receiving add the LSA to
their link-state database (LSDB).
 The LSDB is used to calculate the
best paths through the network.
 OSPF best route calculation is
based on Edsger Dijkstra's
shortest path first (SPF) algorithm.
SPF Routing Algorithm
 The SPF algorithm accumulates
costs along each path, from
source to destination.
 The accumulated costs is then
used by the router to build a
topology table.
SPF Tree and Routing Table
 The topology table is essentially
an SPF tree which contains a
listing of all OSPF networks and
the costs to reach them.
 The resulting best routes are
then considered to be added
to the routing table.
OSPF Areas
 To minimize processing and memory requirements, OSPF
can divide the routing topology into a two-layer
hierarchy called areas.
 Characteristics of OSPF areas include:
 Minimizes routing table entries.
 Localizes impact of a topology change within an area.
 Detailed LSA flooding stops at the area boundary.
 Requires a hierarchical network design.
OSPF Two-Layer Hierarchy
 Backbone Area
 Referred to as Area 0
 Also known as the Transit Area
 Regular (Standard) Areas
 Also known as non-backbone
areas
 All regular areas must connect
to the backbone area
 Standard areas can be further
defined as stub areas, totally
stubby areas, and Not-sostubby areas (NSSAs)
 Cisco recommends:
• An area should have no more than 50 routers.
• A router should not be in more than 3 areas.
If link between A – B
goes down, it is of no
general interest
Purpose of a Metric
 Routing protocol metrics:
 RIP: Hop count
 IGRP and EIGRP: Bandwidth, delay, reliability and load
 OSPF (Cisco’s version): Bandwidth
 IS-IS: Four values (Cisco uses “default”) – Covered in CCNP
 BGP: Attributes – Covered in CCNP
Metric Parameters
56 Kbps
 R1 to reach the 172.16.1.0/24 network.
 RIP: Fewest number of hops via R2.
 OSPF: Path with the lowest cost through R3.
 This results in faster packet delivery.
Configuring RIP Example
10.64.0.0 /24
.1
R1
Fa0/0
R1(config)# router
R1(config-router)#
R1(config-router)#
R1(config-router)#
R1(config-router)#
rip
version 2
network 10.0.0.0
no auto-summary
exit
R2(config)# router
R2(config-router)#
R2(config-router)#
R2(config-router)#
R2(config-router)#
rip
version 2
network 10.0.0.0
no auto-summary
exit
10.2.1.0 /24
.2
.2
Fa0/0
R2
S0/0/1
64 kbps
.1
S0/0/1
R3
Verifying RIP
Command
Description
show ip protocols
Displays networks router is advertising, route
sources & administrative distance
show ip route
Displays the routing table
OSPF Metric Calculation
Lower Cost
 The OSPF metric calculation is based on
cost.
Bandwidth
 Cost is an indication of the overhead
required to send packets across a certain
interface.
High
 The cost of an interface is inversely
proportional to the bandwidth of that
interface.
 A higher bandwidth is attributed a lower
cost.
 A lower bandwidth is attributed a higher
cost.
Low
Higher Cost
OSPF Cost Formula
 Cost = 100,000,000 / Bandwidth (bps)
 For example:
• 10BaseT
• T1
= 100,000,000 / 10,000,000
= 100,000,000 / 1,544,000
= 10
= 64
Configuring Single-Area OSPF Example
OSPF Area 0
10.64.0.0 /24
.1
R1
Fa0/0
10.2.1.0 /24
.2
.2
Fa0/0
R2
R1(config)# interface Fa0/0
R1(config-if)# ip address 10.64.0.1 255.255.255.0
R1(config-if)# no shut
R1(config-if)# exit
R1(config)#
R2(config)# interface Fa0/0
R2(config-if)# ip address 10.64.0.2 255.255.255.0
R2(config-if)# no shut
R2(config-if)# interface S0/0/1
R2(config-if)# ip address 10.2.1.2 255.255.255.0
R2(config-if)# bandwidth 64
R2(config-if)# no shut
R2(config-if)# exit
R2(config)#
R3(config)# interface S0/0/1
R3(config-if)# ip address 10.2.1.1 255.255.255.0
R3(config-if)# bandwidth 64
R3(config-if)# no shut
R3(config-if)# exit
R3(config)#
S0/0/1
64 kbps
.1
S0/0/1
R3
Configuring Single-Area OSPF Example
OSPF Area 0
10.64.0.0 /24
.1
R1
Fa0/0
10.2.1.0 /24
.2
.2
Fa0/0
R2
S0/0/1
R1(config)# router ospf 1
R1(config-router)# network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#
R2(config)# router ospf 50
R2(config-router)# network 10.2.1.2 0.0.0.0 area 0
R2(config-router)# network 10.64.0.2 0.0.0.0 area 0
R2(config-router)#
R3(config)# router ospf 100
R3(config-router)# network 10.2.1.1 0.0.0.0 area 0
R3(config-router)#
64 kbps
.1
S0/0/1
R3
Configuring Multi-Area OSPF Example
OSPF Area 1
OSPF Area 0
10.64.0.0 /24
.1
R1
Fa0/0
10.2.1.0 /24
.2
.2
Fa0/0
R2
S0/0/1
R1(config)# router ospf 1
R1(config-router)# network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#
R2(config)# router ospf 50
R2(config-router)# network 10.2.1.2 0.0.0.0 area 1
R2(config-router)# network 10.64.0.2 0.0.0.0 area 0
R2(config-router)#
R3(config)# router ospf 100
R3(config-router)# network 10.2.1.1 0.0.0.0 area 1
R3(config-router)#
64 kbps
.1
S0/0/1
R3
Alternate Multi-Area OSPF
Configuration
OSPF Area 1
OSPF Area 0
10.64.0.0 /24
.1
R1
Fa0/0
10.2.1.0 /24
.2
.2
Fa0/0
R2
S0/0/1
R1(config)# router ospf 1
R1(config-router)# network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#
R2(config)# interface S0/0/1
R2(config-if)# ip ospf 50 area 1
R2(config-if)# exit
R2(config)#
R2(config)# router ospf 50
R2(config-router)# network 10.64.0.2 0.0.0.0 area 0
R2(config-router)#
R3(config)# router ospf 100
R3(config-router)# network 10.2.1.1 0.0.0.0 area 1
R3(config-router)#
64 kbps
.1
S0/0/1
R3
Verifying OSPF
Command
Description
show ip protocols
Displays OSPF process ID, router ID, networks
router is advertising & administrative
distance
show ip ospf neighbors
Displays OSPF neighbor relationships.
show ip route
Displays the routing table.
show ip ospf interface
Displays hello interval and dead interval
show ip ospf
Displays OSPF process ID, router ID, OSPF
area information & the last time SPF
algorithm calculated
LSNDI RMRA
4 Feb 2008
OSPF vs…
 OSPF requires more resources from router
 Fast convergence
 Less overhead – good for large networks
 Supports VLSM
 Complex to configure for advanced needs!
43
LSNDI RMRA
4 Feb 2008
…vs EIGRP
 EIGRP – Cisco proprietary routing protocol
 Uses partial updates and neighbour discovery
 Like OSPF but easier to configure
 Good for large multiprotocol networks that use Cisco
routers
44
LSNDI RMRA
4 Feb 2008
Setting up EIGRP
Needs Autonomous System Number
Router(config)#router eigrp
123
Router(config-router)#net 192.168.1.1 0.0.0.3
Router(config-router)#net 22.22.22.0
0.0.0.255
Router(config-router)#exit
Uses Wildcard Mask
45
LSNDI RMRA
4 Feb 2008
Verifying EIGRP
Router# show ip protocols
 This shows the routing protocol in use and other
useful information too
Router# sh ip eigrp ?
interfaces
IP-EIGRP interfaces
neighbors
IP-EIGRP neighbors
topology
IP-EIGRP Topology Table
traffic
IP-EIGRP Traffic Statistics
46
LSNDI RMRA
4 Feb 2008
Εργασία
 Στο zip αρχείο διάλεξη 10 - εργασία.zip υπάρχει ένα
pkt αρχείο με μια δικτυακή τοπολογία που της λείπει
το routing, με αποτέλεσμα οι υπολογιστές των
διαφόρων υποδικτύων να μην μπορούν να
επικοινωνήσουν μεταξύ τους.
 Αποκαταστήστε την δρομολόγηση μεταξύ των
υποδικτύων σύμφωνα με τις οδηγίες των διαφανειών
που επίσης βρίσκονται εντός του zip αρχείου.
 Παραδοτέο: ένα pdf με όλα τα βήματά σας καθώς
και τα αποτελέσματα των βημάτων.
47