RouterA(config)# ip route

Download Report

Transcript RouterA(config)# ip route

Routing Protocols
• A router ‘knows’ only of networks attached to it directly – unless you
configure a static route or use routing protocols
• Routing protocols share this information among immediate neighbors first,
and then throughout the network
• Routers do not calculate the entire path to a destination
 They select the next hop leading to that destination
 Rely on the next hop router to select a further hop that gets the packet
closer to its destination
A router’s routing tables contains information about the networks directly
connected to it, as well as information that the router has “learned” about
more distant networks (sample of a routing table)
4/5/2016
Page 1
Routing Protocols (cont.)
•Important function of a router (layer 3):
 Examine incoming data packets and make path selection based on
information stored in their routing tables
Router evaluates the available paths to a destination to establish the best
path for routing a packet.
Most routing protocols use the shortest and best path - but by different
means.
4/5/2016
Page 2
Static Routing
Characteristics of static routing:
• administrators manually configure static routes
• routes do not change, unless changed by the administrator
• are useful in environments where there is a single link in or out of
the networks (know as a stub network)
• because there is only one link to get to the neighbor network, we
conserve bandwidth not being used by routing protocols
4/5/2016
Page 3
Static Routing
Static route can be defined by:
RouterA(config)# ip route <dest network> <subnet mask> < interface | next hop>
s0
192.16.10.1
Network 200.10.10.0/24
Router A
Router B
(Packets arriving at Router A with network 200.10.10.0 as their destination
will be sent to the serial port of the next router – that is, the next hop)
RouterA(config)# ip route 200.10.10.0 255.255.255.0 192.16.10.1
(The same thing can be accomplished by this:
Packets arriving at Router A with network 200.10.10.0 as their destination
will be sent out of Router A via Serial port 0)
RouterA(config)# ip route 200.10.10.0 255.255.255.0 s0
4/5/2016
Page 4
Static Routing
192.16.10.1
s0
Network 200.10.10.0
Router A
Router B
e0
195.10.10.0 net
Static address command for network 195.10.10.0 to get to network
200.10.10.0 is:
RouterA(config)# ip route 200.10.10.0 255.255.255.0 192.16.10.1
OR
RouterA(config)# ip route 200.10.10.0 255.255.255.0 s0
Note that when the interface option is specified, it’s our interface (
RouterA - not the neighbor’s).
4/5/2016
Page 5
Static Routing
s0
192.16.10.1
Network 200.10.10.0
Router A
Router B
RouterA(config)# ip route 200.10.10.0 255.255.255.0 192.16.10.1
RouterA(config)# show ip route
The above example will have an administrative distance of 1 in the
routing table.
RouterA(config)# ip route 200.10.10.0 255.255.255.0 s0
The above example will have an administrative distance of 0 in the
routing table.
4/5/2016
Page 6
Static Routing
s0
192.16.10.1
Network 200.10.10.0
Router A
Router B
RouterA(config)# ip route 200.10.10.0 255.255.255.0 192.16.10.1
If the network 192.16.10.0 goes down for any reason, the static
address on RouterA will be removed from the routing table.
4/5/2016
Page 7
Static Routing
4/5/2016
Page 8
Default Route
Gateway of last resort for routers that do not have a
network entry in the routing table
If router doesn’t know where to send a packet, it uses a default route:
RouterA(config)# ip route 0.0.0.0 0.0.0.0 < interface | next hop>
Packets going to any network for which I don’t have an entry in the
routing table, just send them to the next hop
192.16.10.1
s0
Router A
Internet
RouterA(config)# ip route 0.0.0.0 0.0.0.0 192.16.10.1
OR
RouterA(config)# ip route 0.0.0.0 0.0.0.0 s0
4/5/2016
Page 9
Default Route on non-directly connected networks
4/5/2016
Page 10
Default/Static Route
To verify a static route or default route use the commands:
show running-config
Or
show ip route
To test a static route or default route use the commands:
ping
Or
traceroute
4/5/2016
Page 11
4/5/2016
Page 12
Examine the Show ip route command
[Administrative distance / Hop count]
4/5/2016
Page 13
Default Administrative Distances
Routed Source
Default Distance
Connected
0
Static Route
1
EIGRP(internal)
90
OSPF
110
RIPv1 AND v2
120
EIGRP(external)
170
4/5/2016
Page 14
Routed Vs. Routing Protocols
Routed vs. Routing:
Routed protocols are protocols are protocols used to carry the data
across the networks – like those in the IP protocol (such as Telnet) and
Novel lIPX
Routing protocols route routed protocols through a network. (Routers
use routing protocols to talk to each other about networks & paths.
• Dynamically advertise and learn routes, determine which routes
are available and which are the most efficient routes to a
destination)
• IGRP (Interior Gateway Routing Protocol)
• EIGRP ( Enhanced IGRP)
• BGP (Border Gateway Protocol)
• OSPF (Open Shortest Path First)
• APPN (Advanced Peer-to-Peer Networking)
• IS-IS (Intermediate System-to Intermediate System)
• RIP (Routing Information
4/5/2016Protocol)
Page 15
Autonomous Systems
An autonomous system (AS) is a collection of networks under a common
administration.
The American Registry of Internet Numbers (ARIN) assigns an identifying
number to each AS.
AS is a 16 bit number.
Some routing protocols such as IGRP, EIGRP requires AS for their
configurations.
4/5/2016
Page 16
Routing Protocols
When complex networks have multiple interconnections, static routes are
not a practical solution – they can’t react to changes in the topology
When all routers in an internetwork are operating with the same
knowledge of the routes in a network is said to have converged.
Fast convergence is desirable because it reduces the period of time in
which routers would continue to make incorrect routing decisions.
In routers that use dynamic routing protocols, it is important to have fast
convergence because routers could make incorrect forwarding decisions
until the network has fully converged.
4/5/2016
Page 17
Routing Protocols (cont.)
4/5/2016
Page 18
Routing Protocols (cont.)
Routing protocols are divided into 2 classes:
• interior - used for routing information within networks that are under
a common network administrator
• RIP
• IGRP
• OSPF
• EIGRP
• exterior - used for routing information between networks that do not
share a common administrator.
• EGP (exterior gateway protocol)
• BGP
4/5/2016
Page 19
Classes of Routing Protocols
Classes of Routing Protocols
• distance-vector - determines the direction & distance
• IGRP
• RIP
• link-state (also called shortest path first) re-creates the exact
topology of the entire network.
• OSPF
• IS-IS
4/5/2016
Page 20
Distance Vector Routing Protocols
Distance vector routing algorithms pass periodic copies of a routing table
from router to router. These regular updates are based on the routing
algorithm know as ‘Bellman-Ford’ algorithm.
However distance vector algorithms do not allow a router to know the
exact topology of an internetwork as each router only sees its neighbor
routers.
4/5/2016
Page 21
Distance Vector Routing Protocols
Neighbor to
neighbor
ONLY
4/5/2016
Page 22
Distance Vector Routing Protocols
4/5/2016
Page 23
Distance Vector Routing Protocols
Routing table updates
take place
periodically.
Router to router
(neighbor tells
neighbor)
Distance vector – each
router sends its entire
routing table to
neighbor table
4/5/2016
Page 24
Link-state Routing Protocol
Link-state algorithms are also known as Dijkstras algorithm or SPF
(shortest path first) algorithm.
Link-state routing algorithms maintain a complex database of topology
information. It maintains full knowledge of distant routers and how they are
interconnected.
Link-state routing uses:
• Link-state Advertisements (LSAs)
Small packets of routing info that are sent between routers
• Topological database
• SPF algorithm
• Routing tables
4/5/2016
Page 25
Link-state Routing Protocol
Link-state makes an update only when there is a topology change.
Link-state concerns itself with:
• processor overhead
• memory requirements
• bandwidth consumption
After the initial flood, it passes small event-triggered updates to all other
routers
4/5/2016
Page 26
Routing Metrics
A responsibility of a Routing Protocol is to build routing tables to
determine optimal routing paths
They need to have a way to measure (metrics) which routes are preferred
when there are multiple paths to a destination
Different routing protocols use different metrics
1. Hop count: number of routing devices the packet needs to travel to
reach the destination network
2. Bandwidth: cumulative bandwidth of the links to the destination
measured in kilobits per second
3. Delay: length of time (in microseconds) a packet takes from source to
destination
4. Reliability: consistency of the links and paths toward the destination
based on the interfaces’ error rates
5. Load: cumulative amount of congestion of the links in the direction of
the destination
4/5/2016
Page 27
Routing Metrics (cont.)
1. Hop count: number of routing devices the packet needs to travel to
reach the destination network - counts router hops
2. Bandwidth: cumulative bandwidth of the links to the destination
measured in kilobits per second
3. Delay: length of time (in microseconds) a packet takes from source to
destination
4. Reliability: consistency of the links and paths toward the destination
based on the interfaces’ error rates
5. Load: cumulative amount of congestion of the links in the direction of
the destination
6. MTU: maximum frame size that is allowed to cross the links to the
destination
7. Cost: arbitrary number typically based on the bandwidth of the link
4/5/2016
Page 28
The Routing Process
192.168.1.56
01-00-A5-C3-26-6B
• The protocol address (IP)
always remains the same.
192.168.1.56
34-7E-33-12-C9-20
192.168.1.56
6A-5F-0D-09-8B-AA
192.168.1.56
192.168.1.56
BC-48-03-8F-FF-AA
4/5/2016
• The physical address
(MAC) changes at each
hop.
Page 29
RIP Routing Protocol
Characteristics of RIP are:
• distance vector
• metric is hop count
• if the hop count is greater than 15, the packet is discarded
• is updated every 30 seconds
For RIP, each router that it has to go through to get to a network is
considered a hop count. That is, if you have to go through 2 routers to get
to a network, then the hop count is 2.
If the network is on the next router, then the hop count is 0. (That is a
directly connected serial port.)
4/5/2016
Page 30
IGRP Routing Protocol
IGRP:
• must be assigned an AS (autonomous system number - 16 bit number)
• Cisco proprietary
• distance-vector
• metrics
• delay
• bandwidth (1200 bps - 10 Gbps)
• reliability (1-224) (higher the number, more reliable)
• load (1-244) (higher the number, more it is under load)
•sends updates every 90 seconds
• maximum hop count is 255 (default 100)
4/5/2016
Page 31
OSPF Routing Protocol
Characteristics of OSPF are:
• link-state routing protocol
• open standard
• uses the SPF algorithm to calculate the lowest cost to a
destination
• routing updates are flooded as topology changes occur.
4/5/2016
Page 32
EIGRP Routing Protocol
Characteristics of EIGRP are:
• distance-vector
• Cisco proprietary
• uses load balancing
• uses a combination of distance vector & link-state features
• use Diffused Update Algorithm (DUAL) to calculate the shortest
path
• updates broadcast every 90 seconds
4/5/2016
Page 33
BGP Routing Protocol
Characteristics of BGP are:
• distance vector exterior routing protocol
• used between ISP and clients
• used to route internet traffic between autonomous systems
4/5/2016
Page 34
Configure Routing Protocols
RouterA#config t
RouterA(config)# router <routing protocol> [AS number]
RouterA(config-router)# network <networks on the routers interfaces>
Example:
RouterA(config)# router rip
RouterA(config-router)# network 192.16.10.0
Example:
RouterA(config)# router igrp 100
RouterA(config-router)# network 192.16.10.0
‘advertises’ networks directly connected to it
4/5/2016
Page 35
Configure RIP Routing Protocol
210.45.20.0 net
s0
s1
192.10.10.0 net
e0
172.120.0.0 net
RouterA# config t
RouterA(config)# router rip
RouterA(config-router)# network 192.10.10.0
RouterA(config-router)# network 172.120.0.0
RouterA(config-router)# network 210.45.20.0
4/5/2016
Page 36