Sunteți pe pagina 1din 56

1 Routing Concepts

1.

NET3008
Advanced Routing

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 1
Functions of a Router
Why Routing?
Routing allows a packet to be sent to a different network
than the packet's
packet s source network (i
(i.e.
e it facilitates packet
movement between broadcast domains).

192.168.1.0/24 192.168.2.0/24

f0/0 f0/1

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 2
Functions of a Router
Routers Choose Best Paths
 Routers have full information about the networks to which their
interfaces are connected … these are called directly-connected
networks.
 In addition, routers learn about remote networks through
administrator configured static routes and dynamic routing
administrator-configured
protocols.
 A router's routing table stores the information about all the
networks
t k it knows
k (connected
( t d or remote),
t ) including
i l di where
h a packet
k t
must be sent to reach each destination.
 Upon receiving a packet, a router examines the destination IP
address and consults its routing table to determine the best path
along which to send it – must determine the next hop IP address
where the packet must be sent and the egress interface to use.
• If no entry in the routing table matches the packet's destination IP,
the packet is dropped.

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 3
Functions of a Router
Quick Review – What's in a Layer?
 Layer 1 is used to send bits between L2 devices: serves to
propagate signals representing information bits over the network
medium, possibly through other intermediary L1 devices (e.g.
hubs, repeaters).
 Layer 2 is used to send frames between L3 devices: serves to
deliver frames directly from one L3 node to another, within a single
network or broadcast domain, possibly through other intermediary
L2 devices
de ices (e.g.
(e g sswitches).
itches) L2 uses
ses L1 to stream the bits making
up the frame.
 Layer 3 serves to map out how a packet must hop from one
network
t k to
t another
th ini order
d tot reach
h that
th t packet’s
k t’ destination
d ti ti
network.

 Each router works at L3 to do this mapping (i.e.


selection of the best path), then uses L2 to send the
packet one hop closer.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 4
Functions of a Router
Quick Review - Sending an IP Packet
 When an IP host wishes to send a packet, it determines if the intended
destination is on the same network or not … how?
 If it is, it can deliver the packet directly ... how?
 If not, the host delivers the packet to its gateway router.
• NOTE:
NOTE The
Th packet's
k t' destination
d ti ti address
dd remains
i ththatt off th
the fi
finall recipient
i i t - never changes!
h !
• The packet is delivered to the router only because it is framed with the router's MAC ID as the
destination – this frame sent by the originator is delivered to the router by L2 mechanisms.

 The receiving router examines the ingress packet's


packet s destination IP address
and consults its routing table to determine the best path to reach the
destination, and therefore, the next hop IP and the egress interface to be
used.
• The
Th packet
k t iis fframed
d with
ith th
the nextt h
hop IP'
IP's MAC ID as th
the d
destination
ti ti andd sentt outt
the egress interface to be direct-delivered by L2 mechanisms.
• This step is repeated until the last-hop router is reached.
 The last-hop
last hop router seeing that its best path is a directly
directly-connected
connected network
network,
frames the packet with the recipient's MAC ID as the destination. This then
delivers the packet via L2 mechanisms, directly to the final recipient.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 5
Switching Packets between Networks
OSI layers 1
1, 2 and 3 – at each hop

3 Look up destination IP in the routing table


3. table,
determine next hop IP and exit interface

2. Validate, check 4. Encapsulate with


L2 address & framing needed to
decapsulate reach next hop
p

1. Receive signals 5. Encode


from cable, synch, binary place
binary,
convert to binary. signals on cable

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 6
Switching Packets between Networks
Example - Routed Packet Delivery
Packet
Encapsulation / Decapsulation
at each Hop

00-10 0A-10 0B-31 00-20 7E-0F-00-… 0B-20 0C-22

Ethernet Ethernet Cisco HDLC Ethernet

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 7
Switching Packets between Networks
1.
1 IP Host Wants to Send a Packet
Because destination IP 192
192.168.4.10
168 4 10 is on a

Original sender PC1


PC1, passes packet to Gateway R1 (192
(192.168.1.1)
168 1 1)
for delivery to destination 192.168.4.10 on a remote network.

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 8
Switching Packets between Networks
2.
2 Packet Routing In
In-transit
transit
R1 R2

R1 determines the best path to reach packet destination IP


192.168.4.10 is via next-hop 192.168.2.2, out interface f0/1.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 9
Switching Packets between Networks
3.
3 Packet Routing Still In
In-transit
transit

Flag-Addr
7E-0F

Next Hop is a Serial Link


L2 encapsulation across
the serial link is Cisco
HDLC, not Ethernet.

R2 determines the best path to reach packet destination IP


192.168.4.10 is via next-hop 192.168.3.2, out interface s0/0/0.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 10
Switching Packets between Networks
4. Last-Hop
4 Last Hop Router Delivers to Destination

destination IP 192.168.4.10

R3 sees the best path to reach 192.168.4.10 has no next-hop,


so it delivers directly to the destination, out interface f0/0.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 11
Path Determination
Routing
R ti D Decisions
i i

Sett exitit i/f to


S t be
b
the connected
one; set next
hop-IP to be the
destination IP

Set the next


hop-IP and exit
i/f based on the
matching route Frame the packet (in
accordance with the exit
i/f) so it is delivered to
the next hop; check ARP
cache as applicable
Set the next (ARP rqst if needed) and
hop-IP and exit direct the frame to the
i/f from the exit i/f for transmission
default route

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 12
The Routing Table
Routing
R ti T Table
bl Entries
E ti
Interpreting the entries in the routing table.

sometimes called the signature of the routing entry

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 13
The Routing Table
Routing
R ti T Table
bl Sources
S
The show ip route command displays the contents of the
routing
ti ttable:
bl
 Local route interfaces - Added to the routing table
when an interface is configured and active
active.
(only displayed in IOS 15 or newer)
 Directly
y connected interfaces - Added to the routing
g
table when an interface is configured and active.
 Static routes - Added when a route is manually
configured and the exit interface is active.
 Dynamic routing protocol - Added when routes are
learned via a routing protocol (e
(e.g.
g RIP
RIP, EIGRP
EIGRP, OSPF)
OSPF).

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 14
Path Determination
Administrative
Ad i i t ti Distance
Di t
If multiple paths to a destination become known to a router, the path
installed in the routing table is the one with the lowest Administrative
Distance (AD).
• AD is another attribute of a route, stored alongside the obvious
aspects such as
as, network prefix
prefix, mask and exit interface.
interface
• AD is a measure of route reliability. A lower AD is interpreted as
being more reliable and therefore, preferred – this should be easy
to remember because naturally
naturally, we prefer shorter distances.
distances
• A route's AD value is assigned depending upon the source from
which it was learned – for example:
• A route known because of a directly connected network is completely
reliable (since the router is connected to it), so its AD is 0.
• Next, is a static route which by default is assigned an AD of 1. This is
based on the presumption the administrator has configured the route
due to specific knowledge and/or requirements.

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 15
Path Determination
Default Administrative
D f lt Ad i i t ti Distances
Di t
Aside from Connected and Static routes, the only other sources of
routes are those learned through dynamic routing protocols. This is a
table of Default Administrative Distances set by IOS:

• This table reveals the implicit


p jjudgment
g Cisco has made on the
various routing protocols based on the characteristics and
behaviour unique to each. Of course, some say it reflects the
company's bias as well!
• There is one more reason why having AD is useful, and that has to
do with route metrics.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 16
Path Determination
Route
R t M Metric
t i ((a.k.a
k Cost)
C t)
Metric is a numeric value associated with each route
to provide a valuation about the quality of the route.
route
 Every routing protocol has its own underlying philosophy about what
constitutes a better path and this is reflected in what is used as its metric
and what's
what s taken into consideration when calculating itit.

Listed below are some common dynamic routing


protocols and what each uses to calculate route
metrics:
 RIP (Routing Information Protocol) - uses Hop Count (0 to 15)
 OSPF (Open Shortest Path First) - uses Cost based on cumulative
bandwidth of all links in the path from source to destination (0 to infinity)
 EIGRP (Enhanced Interior Gateway Routing Protocol) - uses a composite
metric based on the slowest link bandwidth in the path and accumulated
delay, with optional consideration of load and reliability (0 to infinity)

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 17
Path Determination
What's
Wh t' Better
B tt (a.k.a
( k Lower
L Cost)?
C t)?
Consider this topology.

Q. What's the best path from


from R2 to R3?

 Using RIP based on hop count, the lowest metric would be 1 hop from R2 across
the serial link direct to R3.
 U
Using
i OSPF b based d on cost,
t it would
ld d
depend
d upon th
the b
bandwidth
d idth off th
the lilinks.
k B Butt
given the vast difference between Ethernet and serial speeds, it would most likely
be computed as being lower cost to go from R2 to R1 to R4, then R3.

• How meaningful is it to compare a RIP route which has 3 hops


hops,
against another learned from OSPF with a cost of, say 782? As the
saying goes, "You can't compare apples to oranges."
• With a common AD value being assigned to each protocol
protocol, we can
use this to ensure we only compare metric values between routes
from the same routing source.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 18
Path Determination
Route
R t S Selection
l ti
 Whenever we need to route a packet to a destination IP, we surely
want the most specific, the most reliable and the lowest cost one. We
therefore select the best matching entry from all known paths by
considering the following criteria, in order, top to bottom:
1. Longest Bit Match – the route prefix that matches the destination IP
with the most number of bits wins because it's
it s the most specific route.
route
2. Lowest Administrative Distance – if two or more routes have the
same specificity, the one with the lowest AD wins.
3
3. Lowest Metric – if two or more routes have the same match length and
AD, then the one with the lowest metric wins.
• If we still have 2 or more matching routes, these must be routes of
equal cost, so load balancing (discussed shortly) will occur.
 When IOS learns a route, if another with the same signature (i.e.
prefix/mask) also exists, only the one with the lowest AD, then metric,
is stored in the routing table. Therefore, if we only select routes from
th routing
the ti ttable,
bl criteria
it i 2 & 3 above
b are automatically
t ti ll mett ((since
i only
l
routes with the lowest AD and lowest costs are stored there). Now,
let's take a closer look at what we mean by Longest Bit Match.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 19
Path Determination
Longest
L t Bit Match
M t h
 Consider a packet bound for 10.0.4.6 – which route would be used
((selected as the best)) from the following
g routing
g table?

 10.0.0.0/16 matches all 16 bits (eligible to be used)


 10.0.0.0/24 same in 21 of 24 significant bits => no match
• Similarly
Si il l no match
t h for
f 10.0.2.0/24,
10 0 2 0/24 10
10.0.3.0/24,
0 3 0/24 10
10.0.7.0/24
0 7 0/24
 10.0.4.0/24 matches all 24 bits  this will be used
 What if route 10
10.0.4.4/30
0 4 4/30 was also present?
 So, overlapping routes can peacefully co-exist!
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 20
Path Determination
Load
L d Balancing
B l i
When a router has two or more paths to a destination with
th same AD and
the d equall costt metrics,
ti th
then allll such
h paths
th
are placed in the routing table and can be used for packet
forwarding (in round robin fashion) – this is called
equal-cost load balancing.
• The maximum number of simultaneous paths used
depends upon the platform in use (hardware and IOS
version), but 4 is typically the default, and 6 or more
can be custom-configured.
• This technique can improve network performance
because it naturally guards against traffic congestion.
• Equal cost load balancing can occur over routes
derived from any routing source, static or dynamic.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 21
Statically Learned Routes
Static
St ti Routes
R t
Static routes and static default routes can be implemented after
y connected interfaces are added to the routing
directly g table:
 A static route is manually configured and explicitly defines the next
hop needed to reach a remote destination network.
• Disadvantage: must be manually updated if the topology changes
• Advantages: improved security and lower resource usage
 Configure a static route to a specific network with the command:
ip route network
network-prefix
prefix mask {exit
{exit-intf
intf [next
[next-hop-ip]
hop ip] | next
next-hop-ip}
hop ip}
• “network-prefix mask” identifies the destination network (not the next-hop one)
• “exit-intf” is the interface through which the packet will exit this router
• “next-hop-ip”
p p is on a neighbouring
g g router;; the target
g IP for the hopp

 A default route is used when the routing table does not contain a
specific path matching the packet's destination address.
 We can config
configure
re a static default
defa lt route
ro te by
b specif
specifying
ing a net
network-
ork
prefix and mask of all zeroes … 0.0.0.0 (known as quad-zero)
ip route 0.0.0.0 0.0.0.0 {exit-intf [next-hop-ip] | next-hop-ip}
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 22
Statically Learned Routes
Static
St ti RRoute
t with
ith Exit
E it Interface
I t f
 A static route can be configured with exit interface, next-hop IP or both:
ip route network
network-prefix
prefix mask {exit
{exit-intf
intf [next
[next-hop-ip]
hop ip] | next
next-hop-ip}
hop ip}
 Consider static routes from LabC (n.b. LabD will NAT 192.168.5.x to ISP):

LabC(config)# ip route 192.168.5.48 255.255.255.240 s0/0/1


LabC(config)# ip route 0.0.0.0 0.0.0.0 f0/1
• The first route will correctly provide reachability towards network B.3 (S2).
• The second route is intended to provide a default route towards ISP,
ISP but …
− Consider : LabC# ping 1.1.1.1 … this will fail. Why?
− Consider : LabC# ping 192.168.5.114 … this might succeed. Why?
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 23
Specifying AD in Static Routes
Floating
Fl ti Static
St ti Routes
R t
 Floating static routes are those used to provide a backup path to a
i
primary t (static
route ( t ti or dynamic),
d i ) in
i th
the eventt off a topology
t l f il
failure.
 The floating static route is
only used when the primary
route is not available. 1.0.0.0/8

 To accomplish this, the


floating
g static route is
configured with a higher
administrative distance
than the primary route.

Branch(config)# ip route 1.0.0.0 255.0.0.0 172.16.1.1


Branch(config)# ip route 1.0.0.0 255.0.0.0 209.165.200.241 210

If Branch had a connection to a second provider, say ISP2 through s0/2/0,


we could configure another level of failover using an AD > 210.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 24
Floating Static Routes
C fi
Configure a Fl
Floating
ti Static
St ti Route
R t

S0/0/0
DCE Internet
.1 ISP
.2 192.0.2.0/30
S0/2/0

n.b. Only the primary


route is installed in
the routing table.
Why?
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 25
Dynamic Routing Protocols
Dynamic
D i Routing
R ti
 The fundamental purpose of a routing protocol is to provide a
mechanism for each router in a group to dynamically maintain
optimal L3 reachability to all operational networks known to at least
one of the group.
 That is,
is routers must exchange
information about
known routes
usingg a common
metric.
 Any two routers
exchanging
information via the
same dynamic
routing protocol,
are known as routing peers.

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 26
Dynamic Routing Protocols
IPv4 Routing
IP 4 R ti P Protocols
t l
Cisco ISR routers can support a variety of dynamic IPv4
routing protocols including:
 EIGRP – Enhanced Interior Gateway Routing Protocol
 OSPF – Open
O Shortest
Sh P
Path
h Fi
First
 IS-IS – Intermediate System-to-Intermediate System
(pronounced: "I"
I "S"
S to "I"
I "S")
S)
 RIP – Routing Information Protocol (v2 is classless)

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 27
Dynamic Routing Protocols
IPv6 Routing
IP 6 R ti P Protocols
t l
Cisco ISR routers can support a variety of dynamic IPv6
routing protocols including:
 RIPng – RIP next generation
 OSPFv3
OSPF 3 (can also route IPv4 via address family feature)
 EIGRP for IPv6
 MP-BGP4 – Multi-Protocol Border Gateway Protocol v4
• able to carry BGP routes and also payloads for other routing
protocols via address family feature

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 28
Dynamic versus Static Routing
Difference
Diff iin F
Fundamental
d t l Strategy
St t
Static Routing pushes traffic:
 Each administratively
administratively-configured
configured static route identifies a
reachable network and an exit interface and/or next-hop through
which that destination can be reached.
 This effectively pushes traffic out of that router.
router

Dynamic Routing pulls traffic:


 Dynamic routes originate where the destination network resides.
 The router directly connected to that network advertises the
existence of that destination to its peers and eventually, the route
information ripples throughout the entire routing domain.
 When
Wh any router t receives
i a route
t advertisement
d ti t on an interface
i t f
(say f0/0), it is now eligible to route packets for the identified
network out that same interface (f0/0 in this case).
 Therefore,
Therefore any router advertising a dynamic route route, pulls that
traffic towards it (and ultimately, to the router directly connected
to the destination network).
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 29
Configure IPv4 Summary Routes
Route
R t S Summarization
i ti
Route summarization (a.k.a. route aggregation) is the
process of representing a contiguous set of networks
residing in the same binary block, as a single network
prefix with a shorter ((i.e. less specific)
p p ) subnet mask:
 CIDR supernetting is a form of route summarization.
• CIDR avoids the limitation of classful boundaries and allows the
representation of an IP block with a mask shorter than the
classful one corresponding to that network prefix.
• n.b. A shorter mask represents a larger block of IP addresses.
 Summarization reduces the number/size of routing
updates and lowers the number of entries in routing
t bl
tables.
• It also enhances routing stability. (discussed later)
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 30
Configure IPv4 Summary Routes
Topology
T l Suited
S it d to
t Route
R t Summarization
S i ti

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 31
Configure IPv4 Summary Routes
Calculate
C l l t Summary
S Route
R t

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 32
Configure IPv4 Summary Routes
CIDR S
Specification
ifi ti
 Each CIDR prefix/mask represents a block of IP addresses,
specifying where the block starts, starts and how far it extends.
extends
• The block starts at the IP value given by prefix with mask significant bits … that is,
all bits to the right of the first mask bits are not fixed - can be either 0 or 1.
172 20
172.20. 0.
0 0 10101100 00010100 00000000 00000000
172.20.0.0/16
/
. . . . . .
172.20.255.255 10101100 00010100 11111111 11111111
172.21. 0. 0 10101100 00010101 00000000 00000000 172.20.0.0/15
. . . . . .
172.21.255.255 10101100 00010101 11111111 11111111
172.22. 0. 0 10101100 00010110 00000000 00000000 172.20.0.0/14
. . . . . .
172.22.255.255 10101100 00010110 11111111 11111111
172.23. 0. 0 10101100 00010111 00000000 00000000
. . . . . .
172.23.255.255 10101100 00010111 11111111 11111111

• Q1. What CIDR specification represents the block: 172.22.0.0 to 172.23.255.255?


• Q2. What CIDR specification represents the block: 172.23.0.0 to 172.23.255.255?
• Q3. What CIDR specification represents the block: 172.21.0.0 to 172.22.255.255?
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 33
Configure IPv4 Summary Routes
Configure
C fi Static
St ti Summary
S Route
R t

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 34
Configure IPv4 Summary Routes
Static
St ti Summary
S Route
R t - Example
E l 2

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 35
Configure IPv4 Summary Routes
Summary
S Route
R t C Calculation
l l ti

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 36
Configure IPv4 Summary Routes
Configure
C fi Summary
S Route
R t - Example
E l 2

R3(config)#no ip route 172.16.1.0 255.255.255.0 192.168.1.2


R3(config)#no
g ip
p route 172.16.2.0 255.255.255.0 192.168.1.2
Q. What would the
R3(config)#no ip route 172.16.3.0 255.255.255.0 192.168.1.2 impact be,
be if these
R3(config)#ip route 172.16.0.0 255.255.252.0 192.168.1.2 original routes were
R3(config)#do sh ip route static | begin Gateway NOT removed?
Gateway of last resort is not set - what would show
in the routing table?
172.16.0.0/22
/ is subnetted, 1 subnets - which routes
S 172.16.0.0 [1/0] via 192.168.1.2 would be used to
route packets?
R3(config)#
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 37
Configure IPv6 Summary Routes
IPv6
IP 6 Summarization
S i ti
 Although IPv6 addresses are 128 bits long and written
in hexadecimal, summarizing IPv6 addresses is quite
similar to the summarization of IPv4 addresses. A few
extra steps
p are required
q due to p
possible IPv6 address
abbreviations and hex conversion.
 Just as we did for IPv4, multiple IPv6 routes can be
summarized into a single IPv6 route if:
• The destination networks all fall within the same binary
boundary.
y
• The multiple static routes all use the same exit interface or
next-hop IPv6 address.

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 38
Configure IPv6 Summary Routes
Calculating
C l l ti IPv6
IP 6 Summary
S Addresses
Add
Follow these steps to summarize IPv6 networks into a single IPv6
prefix:
fi
Step 1. List the network addresses (prefixes) and identify the part
where the addresses differ.
Step 2. Expand the IPv6 prefix if it is abbreviated.
Step 3. Convert the differing section from hex to binary.
Step 4. Count the number of matching bits from the left to determine
the prefix-length for the summary route.
Step 5. Copy the matching bits and then add zero bits to determine
the summarized network address (prefix).
Step 6. Convert the binary section back to hex.
Step 7. Append the prefix of the summary route (result of Step 4).

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 39
Configure IPv6 Summary Routes
IPv6
IP 6 Summarization
S i ti Example
E l

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 40
Configure IPv6 Summary Routes
IPv6
IP 6 Summary
S Calculations
C l l ti

Find Matching bits:

Summary Prefix is:

Summary Route is: 2001:DB8:ACAD::/61

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 41
Configure IPv6 Summary Routes
IPv6
IP 6 Summary
S Configuration
C fi ti

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 42
Accessing the Internet
Connecting
C ti tto th
the Internet
I t t
Customer ISP
Internal Static summary route
Provider
customer s0/0/1 networks
s0/0/0
networks CE PE & Internet
Static default route
205.211.48.0 to 205.211.63.0
(Supernet of 16 consecutive public class C's registered to Algonquin College)

 Except
cep for
o larger
a ge aand
d more
o e co
complex
p e dep
deployments,
oy e s, there’s
e e s typically
yp ca y NO
O
dynamic routing configured between the Customer AS and the ISP
(Internet Service Provider) AS.
 The Customer Edge (CE) router has a static default route configured
towards the Provider Edge (PE) router.
CE(config)#ip route 0.0.0.0 0.0.0.0 s0/0/0
 ISP’s
ISP s PE has a static route to the CE for the CIDR block representing
ALL public IP addresses registered to the Customer AS.
PE(config)#ip route 205.211.48.0 255.255.240.0 s0/0/1
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 43
Accessing the Internet
Propagating
P ti Default
D f lt Route
R t
 The static default route just described, gives Internet reachability
t the
to th CE router.
t But
B t what
h t about
b t networks
t k deep
d inside
i id ththe AS?
 For the entire AS to reach the Internet, all internal routers behind
g default traffic to the edge.
CE will need a route directing g
 To do this, we configure CE (the Border Router) to dynamically
propagate a default route into the whole routing domain.
• This pulls all Internet-bound traffic (packets destined for external
addresses) originating in the native AS, to CE at the border, who will
then route that traffic towards the provider network (following the
static default route configured on CE)
CE).
 Supposing this enterprise is using RIP as its IGP, this command
advertises a quad-zero default to CE’s routing peers:
CE(config-router)#default-information originate

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 44
Accessing the Internet
Routing
R ti IInternet
t t Traffic
T ffi – Outbound
O tb d
Customer ISP Internet Src: 205.211.49.5
Dest: 1.1.1.1
Src: 205.211.49.5
Dest: 1.1.1.1 1 2 3
s0/0/1
CE s0/0/0 PE Rx
R1

1. Internet-bound traffic originating inside the AS is routed to CE


following
g the dynamic
y default route p
propagated
p g byy CE.
• It is assumed that all customer routers (including CE) have full routes to
internally-reachable networks. Therefore, externally-destined packets
follow the default route originated by CE.
2. CE routes traffic bound for the external destination to PE following
its static default route. Note that the Packet's source IP is a public
address registered to the customer.
3. PE routes traffic to Internet destination following Internet routing
tables (learned via BGP).
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 45
Accessing the Internet
Routing
R ti IInternet
t t Traffic
T ffi – Inbound
I b d
Customer ISP Internet

s0/0/1
CE s0/0/0 PE Rx
R1

Src: 1.1.1.1 Src: 1.1.1.1


Dest: 205.211.49.5
5 4 Dest: 205.211.49.5
6
4 R
4. Reply
l ffrom IInternet
t t host
h t is
i routed
t d back
b k to
t PE in
i the
th ISP network
t k (via
( i
BGP) because the destination IP is part of the public address block
registered to that ISP (or that customer).
5. PE routes customer-bound traffic to CE following static routing for
all public addresses belonging to this customer.
6. CE routes reply
pyppacket back through
g its own internal network,
eventually reaching the network where the originating IP source
resides.
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 46
Built-in Virtual Interface
Null
N ll Interface
I t f
 Null0 is a built-in virtual interface functioning as a black hole
– sometimes referred to as the "bit bit bucket"
bucket .
• Packets sent to the null0 interface are discarded, never to return!
• Packets dropped by a router normally trigger an "ICMP unreachable"
condition
diti which,
hi h b
by ddefault,
f lt generates
t an error reporting
ti packet
k t back
b k to
t
the original packet's source IP.
• To configure null0 to quietly dispose of traffic sent there:
R2(config)#int
R2( fi )#i t null0
ll0
R2(config-if)#no ip unreachables

 Null0 can be used as the egress interface in a static route.


R2(config)#ip route 192.168.0.0 255.255.0.0 null0

 Wait … wouldn’t all traffic matching this route be dropped?!


• Well, what if you had this route on your border CE router?
• This is called a discard route. (... more shortly)
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 47
Summary Routes – Revisited
Redistribution
R di t ib ti
 Through a process called route redistribution, a dynamic routing
protocol can be configured to advertise routes learned via another
routing source – such as static routes or routes learned from other
dynamic protocols.
 For example,
example the following commands will configure R2
R2's
s RIP process
to advertise all active static routes on R2:
R2(config)#router rip
R2(config router)#redistribute static metric 1
R2(config-router)#redistribute
• All static routes configured on R2 will be advertised to its RIP peers, as if
they were RIP routes, with a metric of 1.
• [Advanced: There are different techniques to filter the routing source in
order to select just the routes you want, instead of getting all of them.
Route redistribution and filtering are covered later in NET3008.]

 Hint: To clarify what this means


means, when you see the command
"redistribute" substitute the word "import" … try it!
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 48
Summary Routes – Revisited
Enterprise
E t i Example
E l
 Here, the Class A address 24.0.0.0/8 is registered to the enterprise.
 CE is dynamically advertising quad
quad-0
0 to draw Internet
Internet-bound
bound traffic.
traffic
 As shown, R1 is connected on its left to an internetwork where
subnets of the private class B 172.16.0.0/16 are located.
 The listed ones are active but the remainder are not yet deployed.
 For routing efficiency the design calls for the whole 172.16.0.0/16
block to be summarized in a single route advertised upstream by R1
throughout the AS.
• How do we actually get this summary routing to happen?
All 172.16.0.0/24 subnets R4
0 0 0 0/0
0.0.0.0/0 ISP
located here 0.0.0.0/0
172.16.0.0/16
172.16.20.0/24 s0/0/1
.1 .5 CE s0/0/0 PE
172.16.16.0/24
f0/0 f0/1 Rx 24.0.0.0/8
R1 192.168.1.0/24
192 168 1 0/24
s0/0/0
172.16.17.0/24
A 24.0.5.5/24
24.0.1.0/24 R2 R3
172.16.19.0/24
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 49
Summary Routes – Revisited
Summary
S Discard
Di d Route
R t
 One way to advertise all private class B networks as a single route is
to redistribute a summary y discard route at R1:
R1(config)#ip route 172.16.0.0 255.255.0.0 null0
R1(config)#router rip
R1(config-router)#redistribute
( g )# static metric 1
172.16.0.0/16
 Note: Later, we'll cover how to filter route
172.16.20.0/24
advertisements to stop the detailed 172.16.16.0/24
f0/0
routes from being advertised to the s0/0/0
R1

right and the summary to the left. 172.16.17.0/24

172.16.19.0/24
R1#sh ip route
172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
S 172.16.0.0/16 is directly connected, Null0
R 172.16.16.0/24 [120/1] via 172.16.20.5, 00:00:24, Serial0/0/0
R 172.16.17.0/24 [120/1] via 172.16.20.5, 00:00:24, Serial0/0/0
R 172.16.19.0/24 [120/1] via 172.16.20.5, 00:00:24, Serial0/0/0
C 172 16 20 0/24 is
172.16.20.0/24 i directly
di tl connected,
t d Serial0/0/0
S i l0/0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
R 192.168.2.0/24 [120/1] via 192.168.1.5, 00:00:07, FastEthernet0/0
R* 0.0.0.0/0 [120/2] via 192.168.1.5, 00:00:07, FastEthernet0/0/0
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 50
Summary Routes – Revisited
Packet
P k tM Movementt
 At neighbour Rx, the summary route appears as:
R 172 16 0 0/16 [120/1] via 192.168.1.1,
172.16.0.0/16 192 168 1 1 00:00:23,
00:00:23 FastEthernet0/1

 Let's examine what happens when host A attempts to ping various IP


addresses:
• 172.16.16.100
1 2 16 16 100
• 24.0.1.1
• 205.211.48.100
• 172.16.18.1
• 192.168.5.100
All 172.16.0.0/24 subnets R4
0 0 0 0/0
0.0.0.0/0 ISP
located here 0.0.0.0/0
172.16.0.0/16
172.16.20.0/24 s0/0/1
.1 .5 CE s0/0/0 PE
172.16.16.0/24
f0/0 f0/1 Rx 24.0.0.0/8
R1 192.168.1.0/24
192 168 1 0/24
s0/0/0
172.16.17.0/24
A 24.0.5.5/24
24.0.1.0/24 R2 R3
172.16.19.0/24
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 51
Summary Routes – Revisited
RIP Manual
M l Summarization
S i ti
Router(config-if)#
ip summary address rip ip_prefix
summary-address ip prefix network_mask
network mask
Specifies a summary address to be advertised
out the selected interface.
 summarized route will only be advertised if an active
route exists within the range of this summary
 this overrides any classful auto summary that might
overlap the given prefix
 only
l one summary advertisement
d ti t iis allowed
ll d per
classful network prefix
 Note: This is not implemented in Packet Tracer!

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 52
Summary Routes – Revisited
Manual
M l Summary
S Example
E l
 We will now revisit the Enterprise Example used earlier to
demonstrate a manually configured RIP summary route at
R1 without using “redistribute” (not in Packet Tracer!):
R1(config)#int f0/0
R1(config-if)#ip summary-addr
R1(config if)#ip summary addr rip 172.16.0.0 255.255.0.0
172 16 0 0 255 255 0 0 172.16.0.0/16
172.16.20.0/24
 Unlike the previous method 172.16.16.0/24
f0/0
R1
of redistributing g a static discard: 172 16 17 0/24
172.16.17.0/24
s0/0/0

• detailed routes are automatically 172.16.19.0/24


suppressed to the right, and the summary
isn't advertised to the left
• in most IOS versions, a RIP manual summary does not provide a
matching discard route on R1 to protect against routing loops.
However, such a discard could be manually y configured.
g ((In contrast,
a summary route manually-configured via EIGRP or OSPF, will
automatically generate the corresponding discard route.)
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 53
Summary Routes – Revisited
Conclusions
C l i Using
U i Summary
S Discard
Di d
 A normal static route is configured to egress on the actual
interface used to route that traffic OUT
OUT, pushing it to the
next hop, towards the destination.
 A summary discard route is configured to egress to the
Null0 interface.
 A summaryy discard route can be advertised to the rest of
the routing domain, to pull that traffic to the boundary
router, whereupon more specific routes there will route the
traffic out towards the destination.
• Any traffic belonging to the summarized block for which a more
specific route does NOT exist, will follow the summary discard route
(i.e. be routed to Null0), where it will be dropped, thereby avoiding
potential routing loops.

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 54
Summary Routes – Revisited
Summary
S Routing
R ti Provides
P id Stability
St bilit
 A dynamically advertised summary route will continue to
be advertised while at least one of the contained routes
remains valid.
• Consider our previous example ...
R1(config)#int f0/0
R1(config-if)#ip summary-addr rip 172.16.0.0 255.255.0.0 172.16.0.0/16
... the 172.16.0.0/16 summary will 172.16.16.0/24
172.16.20.0/24
continue
ti to
t be
b advertised
d ti d as long
l as R1 f0/0
s0/0/0
one or more of the "172.16" /24 172.16.17.0/24
subnets in the cloud stays up.
172.16.19.0/24

 This promotes routing stability because a contained


network that is flapping won't cause a routing update
(unless it's
it s the last active one).

17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 55
17F NET3008 © 2007 – 2017, David Bray, Algonquin College, Cisco Systems, Inc. All rights reserved. 56

S-ar putea să vă placă și