Chapter-6 Presentation

Download Report

Transcript Chapter-6 Presentation

Routing and Routing
Protocols
CCNA 2 – Chapter 6
Routing Types
Static Route Operation
Hoboken#show ip route
Codes: C - connected, S - static,
S
172.16.1.0/24 [1/0] is directly connected, Serial0
C
192.168.2.0/24 is directly connected, Ethernet0
ip route command
RTR(config)# ip route prefix mask
{address | interface} [distance]
prefix
IP route prefix for the destination.
mask
Prefix mask for the destination.
address
IP address of the “next hop” that can be
used to reach that network.
interface
Network interface to use (exit-interface)
distance
(Optional) An administrative distance.
Static Route Operation
•
If the exit interface (gateway) is “down” the static route will
not be put in the routing table.
Administrative Distance and
Metric
Hoboken#show ip route
Codes: C - connected, S - static,
S
172.16.1.0/24 [1/0] is directly connected, Serial0
C
192.168.2.0/24 is directly connected, Ethernet0
[ administrative distance / routing metric (or
cost) ]
The cost for all static routes is “0”
The default administrative distance for static
routes is “1”
Administrative Distance
Administrative Distance is the “trustworthiness” of the routing
information.
Lower the administrative distance the more trustworthy the
information.
If the router hears about a route to the same network from more
than one source it will use the administrative distance to
decide which route to put in the routing table.
Examples
Examples
•
•
•
The network 0.0.0.0 and mask 0.0.0.0 are known as a
“default route”
Can be written 0.0.0.0/0
Known as a “quad zero” route”
Static Routing
Configuring static routes
Routers do not need to configure static routes for their own
directly connected networks.
We need to configure static routes for networks this router
needs to reach.
We will need to configure static routes for the other routers as
well, as “routing information about a path from one network
to another does not provide routing information about the
reverse, or return path.”
Convergence – When all the routers in the network (AS) have
accurate and consistent information, so that proper routing
and packet forwarding can take place.
Convergence will not happen until all the routers have complete
and accurate routing information, meaning we must
configure static routes on all the routers before packets will
be correctly delivered.
Static Routing
192.168.2.0/24
e0
172.16.0.0/16
RTA
.1
s0
s0
.1
.2
192.168.1.0/24
RTB
s1
s1
.1
.2
10.1.0.0/16
RTC
e0
.1
RTA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.2
2
1
RTA#show ip route
Codes: C - connected, S - static,
C
172.16.0.0/16 is directly connected, Serial0
S
192.168.1.0/24 [1/0] via 172.16.0.2
C
192.168.2.0/24 is directly connected, Ethernet0
Recursive Lookup
The router knows it can get to 192.168.1.0/24 network by forwarding the packets
to the router at the ip address of 172.16.0.2
How does the router know how to get to the ip address 172.16.0.2?
Common uses for Static Routes
ISP
10.1.1.1/24
ip route 172.16.0.0 255.255.0.0 10.1.1.2
10.1.1.2/24
ABC
172.16.0.0/16
Static routes in the real-world
In the example above, there is only one route, link, between ABC’s network and
the ISP.
When there is only a single route to a network, this is known as a stub network.
It is very common for the ISP to have a static route pointing to it’s customers’
networks, in this case ABC.
Common uses for Static Routes
Default
ISP
10.1.1.1/24
ip route 172.16.0.0 255.255.0.0 10.1.1.2
10.1.1.2/24
ABC
ip route 0.0.0.0 0.0.0.0 10.1.1.1
Static routes in the real-world (continued)
172.16.0.0/16
What about ABC and sending packets to the ISP – packets going to the Internet?
It is also common for customer networks to use a special kind of static route, known as a
default static route.
Of course we will examine this later throughout the rest of this course, but for now we specify
the network and mask as “0.0.0.0 0.0.0.0” (pronounced “quad-zero”).
This tells the router to forward all packets to this next-hop address (or exit interface) that do
not have an explicit route in the routing table.
Common uses for Static Routes
Default
ISP
10.1.1.1/24
ip route 172.16.0.0 255.255.0.0 10.1.1.2
10.1.1.2/24
ABC
ip route 0.0.0.0 0.0.0.0 10.1.1.1
172.16.0.0/16
RTB#show ip route
Gateway of last resort is 10.1.1.1 to network 0.0.0.0
C
172.16.0.0/16 is directly connected, Ethernet0
10.0.0.0/24 is subnetted, 1 subnets
C
10.1.1.0 is directly connected, Serial1
S*
0.0.0.0/0 [1/0] via 10.1.1.1
Any packets not matching the routes 172.16.0.0/16 or 10.1.1.0/24 are sent to the
router 10.1.1.1 – where it is now their “problem.”
Summarizing static routes
There are many times when a
single static route can
replace several static
routes.
In other words, summarizing
several static routes into a
single static route.
172.16.0.0/24
Summarizing static routes
Baypointe
The three static routes can be summarized into a single route:
Baypointe(config)# ip route 172.16.1.0 255.255.255.0
192.168.1.2
Baypointe(config)# ip route 172.16.2.0 255.255.255.0
192.168.1.2
Baypointe(config)# ip route 172.16.3.0 255.255.255.0
192.168.1.2
Summarized route:
Baypointe(config)# ip route 172.16.0.0 255.255.0.0
192.168.1.2
The summarized route will now include all three subnets!
Be sure to use the proper mask – 255.255.0.0!
Using a 255.255.255.0 mask will only route for 172.16.0.0/24
subnet and not 172.16.1.0/24, 172.16.2.0/24 or 172.16.3.0/24.
Summarizing static routes
172.16.0.0/24
Baypointe
Summarized route:
Baypointe(config)# ip route 172.16.0.0 255.255.0.0 192.168.1.2
Advantages:
Fewer routes in the routing table – faster routing table lookup.
Subnets can be added and deleted on 172.16.0.0 network without having to
change static route on Baypointe router.
Verify static routes
Copy running-config startup-config
Dynamic Routing
Protocols
Routed Protocols vs. Routing
Protocols
Autonomous Systems
•
•
•
An autonomous system (AS) is a collection of networks under a common
administration sharing a common routing strategy.
To the outside world, an AS is viewed as a single entity. The AS may be run by
one or more operators while presenting a consistent view of routing to the
external world.
The American Registry of Internet Numbers (ARIN), a service provider, or an
administrator assigns an identifying 16-bit number to each AS.
Routing Protocols
•
•
•
The goal of a routing protocol is to build and maintain the routing table.
This table contains the learned networks and associated ports for those
networks.
Routers use routing protocols to manage information received from other
routers, information learned from the configuration of its own interfaces, along
with manually configured routes.
Types of Routing Protocols
•
•
•
•
Distance Vector: RIP, IGRP, EIGRP
Link State: OSPF, IS-IS
Path Vector: BGP
Note: IGRP and EIGRP are Cisco Proprietary
Distance Vector Routing Protocols
Router B receives information
from Router A.
Router B adds a distance vector
number (such as a number of
hops), which increases the
distance vector.
Then Router B passes this new
routing table to its other
neighbor, Router C.
This same step-by-step process
occurs in all directions
between neighbor routers.
•
•
“Routing by rumor”
Each router receives a routing table from its directly
connected neighbor routers.
Distance Vector Routing
Protocols
Distance Vector Routing
Protocols
• Routing table updates occur when the topology changes. As with the
•
network discovery process, topology change updates proceed step-bystep from router to router.
With some routing protocols routing tables updates happen on a
periodic basis.
Link State Routing Protocol
Operations
• Link-state advertisements (LSAs) – A link-state advertisement (LSA)
•
•
•
is a small packet of routing information that is sent between routers.
Topological database – A topological database is a collection of
information gathered from LSAs.
SPF algorithm – The shortest path first (SPF) algorithm is a
calculation performed on the database resulting in the SPF tree.
Routing tables – A list of the known paths and interfaces.
Link State Routing Protocol
Operations
Path Determination
A router determines the path of a packet from one data link to
another, using two basic functions:
• A path determination function
• A switching function
Path Determination
• The switching function is the internal process used by a router to
•
accept a packet on one interface and forward it to a second interface
on the same router.
A key responsibility of the switching function of the router is to
encapsulate packets in the appropriate frame type for the next data
link.
Configuring Dynamic Routing
Configuring Dynamic Routing
GAD(config)#router rip
GAD(config-router)#network 172.16.0.0
Router(config)#router rip
Router(config-router)#network 172.16.0.0
Router(config-router)#network 160.89.0.0
• The network command is used on only
•
directly connected networks.
With RIP and IGRP, only need to use the
classful address (no subnets).
Network command two things:
Tells the router which interfaces that will participate in
this dynamic routing protocol, which interfaces it will
send and receive routing updates on.
Tells other routers the networks in its routing updates
that it is directly connect to.
Distance Vector vs. Link State



Requests routing
information from
directly connected
neighbors
Slower Convergence
Decisions based upon
information provided
by neighbors



Flood routing
information to all
routers
Event-triggered
updates, so
convergence is fast
Complete view of the
internetwork topology