0% found this document useful (0 votes)
7 views11 pages

Lecture 4 IP Routing Basics

The document provides an overview of IP routing, including basic concepts, static and dynamic routing, and advanced routing features. It explains the classification of routing protocols, the differences between distance vector and link state protocols, and the role of interior and exterior gateway protocols. Additionally, it covers how routers manage routing tables and the methods for obtaining routing information.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views11 pages

Lecture 4 IP Routing Basics

The document provides an overview of IP routing, including basic concepts, static and dynamic routing, and advanced routing features. It explains the classification of routing protocols, the differences between distance vector and link state protocols, and the role of interior and exterior gateway protocols. Additionally, it covers how routers manage routing tables and the methods for obtaining routing information.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

22/10/2021

Contents
1. Overview of IP Routing
▪ Basic Concepts of Routing

▫ Generation of Routing Entries

▫ Optimal Route Selection

▫ Route-based Forwarding

2. Static Routing

3. Dynamic Routing

IP Routing Basics 4. Advanced Routing Features

Page 0 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 1 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Classification of Routing and Routing Protocols Dynamic Vs Static Routing

● There are three main classification of routing and routing protocols: ● Routing tables can contain directly connected, manually configured static
routes and routes learned dynamically using a routing protocol.
Dynamic vs static routing
● Static routing is when you manually configure a router to send traffic for
Interior vs exterior routing protocols
particular destinations in preconfigured directions.
Link state vs distance vector routing protocols
● Dynamic routing is when you use a routing protocol such as OSPF, ISIS,
EIGRP, and/or BGP to figure out what paths traffic should take.

Page 2 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 3 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Dynamic Vs Static Routing Router Example: Forwarding Packets

● The purpose of any routing protocol is to:


dynamically communicate information about all network paths used to reach a destination,

build routing tables,

and to select from those paths, the best path to reach a destination network.

● Some of the most common routing protocols include IGRP, EIGRP, OSPF, IS-
IS and BGP.

● There are two primary routing protocol types although many different routing
protocols defined with those two types

Page 4 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 5 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
1
22/10/2021

Router Example: Forwarding Packets Interior Gateway Routing Protocols


Dest. Nxt Hop

A R1 ● Interior routing protocol designed for networks that are controlled by an organization.
Default to
upstream
router
B B
C
Direct
R3 ● They keep track of paths used to move data from one end system to another inside
Dest. Nxt Hop
R D R1
E R3 a network or set of networks that you administrate (all of the networks you manage combined
R2 A R2
A R
default
R
R1 B
C
R2
Direct
are usually just one Autonomous System).
R1 R3
C D
E
R5
R5
● IGP's fall into two categories:

default R2 Distance Vector Protocols: Routing Information Protocol (RIP), Interior Gateway Routing
R4 R5
Protocol (IGRP), Enhanced Interior Gateway Routing Protocol (EIGRP).
Dest. Nxt Hop
D E
Link State Protocols: Open Shortest Path First (OSPF), Intermediate System to Intermediate System
(IS-IS)
A R4
B R3
C R3
D R4
E Direct
Page 6 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. default R4 Page 7 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Exterior Routing Protocols Exterior Routing Protocols


● Examples of an EGP:
● Exterior Gateway Protocols handle routing outside an Autonomous System
Border Gateway Protocol (BGP)
and get you from your network, through your Internet provider's network and
Exterior Gateway Protocol (Replaced by BGP)
onto any other network.
● For example, a company runs BGP as an exterior routing protocol between the
● Exterior routing protocols are designed for use between two different networks
router of the company with the ISP router.
that are controlled by two different organizations.
● IP exterior gateway protocols require three settings the following information
● Commonly used between ISPs in an ISP or between ISPs with the company.
before the router can be used:
● BGP (Border Gateway Protocol)is used by companies with more than one
List of neighboring routers to exchange routing information
internet provider to allow them to have redundancy and load balancing of their
The list of networks to advertise
data transported to and from the internet.
Number of autonomous system from the local router
Page 8 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 9 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Distance Vector vs Link State Routing Protocols Distance Vector Routing Protocol
Distance: Distance is the cost of reaching a destination, usually based on the number of hosts the
● "Distance Vector" and "Link State" are terms used to describe routing protocols ●

path passes through, or the total of all the administrative metrics assigned to the links in the path.
which are used by routers to forward packets between networks.
● Vector: From the standpoint of routing protocols, the vector is the interface traffic will be forwarded
● The terms distance vector and link state are used to group routing protocols out in order to reach a given destination network along a route or path selected by the routing
protocol as the best path to the destination network.
into two broad categories based on whether:
● Distance vector protocols use a distance calculation plus an outgoing network interface (a vector) to
the routing protocol selects the best routing path based on a distance metric (the number choose the best path to a destination network.
of hops) and an interface (the vector), ● Common distance vector routing protocols include:

or selects the best routing path by calculating the state of each link in a path and finding RIP

the path that has the lowest total metric to reach the destination. IGRP
EIGRP

Page 10 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 11 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
2
22/10/2021

A Comparison: Link State vs. Distance Vector


Link State Routing Protocol

● Link state protocols know whether a link is up or down and how fast it is (bandwidth
and delay) and calculates a cost to 'get there'.

● Link State protocols will take a path which has more hops, but that uses a faster
medium over a path using a slower medium with fewer hops.

● Because of their awareness of media types and other factors, link state protocols
require more processing power (more circuit logic in the case of ASICs) and memory.

● Distance vector algorithms, being simpler, require simpler hardware.

Page 12 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 13 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Background: Inter-Subnet Communication Routes


● Routes are the path information used to guide packet forwarding.

● A routing device is a network device that forwards packets to a destination subnet based on routes. The most common
routing device is a router.
• An IP address uniquely identifies a node on a
M ● A routing device maintains an IP routing table that stores routing information.
network.
Route-based Packet Forwarding
• Each IP address belongs to a unique subnet,
Router R4
and each subnet may belong to a different area
N
of the network.
• To implement IP addressing, subnets in different
Data R1 R2 R3
areas need to communicate with each other.
How to communicate with N M
the network M?
Gateway Gateway

Destination-based forwarding

Page 14 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 15 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Routing Information IP Routing Table

● A route contains the following information: [Link]/8 Outbound


Destination/Mask Next Hop
Interface
R4
? Destination: identifies a destination subnet. • Routers discover routes using multiple
[Link]/8 [Link] GE0/0
1.1.1. [Link]/30 methods.
? Mask: identifies a subnet together with a destination IP [Link]/8 [Link] GE0/1
2 [Link]/24
address. [Link]/8 [Link] GE0/2 • A router selects the optimal route and installs

GE0/0/0 GE0/2 it in its IP routing table.
1.1.1. ? Outbound interface: indicates the interface through [Link]/30 [Link] GE0/2
[Link]/30
3 which a data packet is sent out of the local router. [Link]/32 [Link] GE0/2 • The router forwards IP packets based on
GE0/0 GE0/1 routes in the IP routing table.
? Next hop: indicates the next-hop address used by the [Link]/30 R2 [Link]/30
router to forward the data packet to the destination • Routers manage path information by
IP routing table
subnet. managing their IP routing tables.
Outbound [Link]/30 [Link]/30
Destination/Mask Next Hop
Interface
[Link]/24 GE0/0/0 [Link] ● The information identifies the destination subnet and R1 R3

specifies the path for forwarding data packets. [Link]/8 [Link]/8

Page 16 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 17 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
3
22/10/2021

Contents How to Obtain Routing Information


1. Overview of IP Routing • A router forwards packets based on its IP routing table. To implement route-based packet forwarding, the router
needs to obtain routes. The following describes the common methods of obtaining routes.
▫ Basic Concepts of Routing
Direct Routes Static Routes Dynamic Routes
▪ Generation of Routing Entries • Direct routes are automatically generated • Static routes are manually configured by • Dynamic routes are learned by dynamic
by devices and point to local directly network administrators. routing protocols running on routers.
connected networks.
▫ Optimal Route Selection [Link]/24

GE0/0/0
▫ Route-based Forwarding [Link]/24 [Link]/24
GE0/0/1
[Link]/24

2. Static Routing GE0/0/1


Dynamic routing
protocol
3. Dynamic Routing GE0/0/2 OSPF

4. Advanced Routing Features Outbound


Protocol Destination/Mask
Interface Outbound Outbound
Protocol Destination/Mask Protocol Destination/Mask
Direct [Link]/24 GE0/0/0 Interface Interface
Static [Link]/24 GE0/0/1 OSPF [Link]/24 GE0/0/2
Direct [Link]/24 GE0/0/1

Page 18 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 19 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Direct Routes (1) Direct Routes (2)


Direct Routes Direct routes
• A direct route is automatically generated by a
device and points to a local directly-connected
network. GE0/0/0 GE0/0/1
GE0/0/0 [Link]/24 [Link]/24
[Link]/24 • Not all the direct routes generated for interfaces are
[Link]/24 [Link]/24 • When a router is the last hop router, IP packets to GE0/0/0 GE0/0/1
GE0/0/1 installed in the IP routing table.
RT [Link]/24 RT [Link]/24 RT
RT [Link]/24 be forwarded will match a direct route and the A B C
B • Only the direct routes of which the physical status
router will directly forward the IP packet to the
and protocol status of interfaces are up are
destination host.
installed in the IP routing table.
Direct routes in the IP routing table of RTB • When a direct route is used for packet forwarding, Direct routes in the IP routing table of RTB

Destination/M Outbound the destination IP address of a packet to be Outbound


Protocol Next Hop Destination/Mask Protocol Next Hop
ask Interface Interface
forwarded and the IP address of the router‘s [Link]/24 Direct [Link] G0/0/1
[Link]/24 Direct [Link] GE0/0/0
outbound interface are in the same subnet.
[Link]/24 Direct [Link] GE0/0/1 • When GE0/0/0 goes down, the direct route for this interface is not
installed in the IP routing table.

Page 20 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 21 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Contents Examining the IP Routing Table


1. Overview of IP Routing <Quidway> display ip routing-table
Route Flags: R - relay, D - download to fib
▫ Basic Concepts of Routing ------------------------------------------------------------------------------------------------------Routing
Tables: Public
Destinations : 6 Routes : 6
▫ Generation of Routing Entries
Destination/Mask Proto Pre Cost Flags NextHop Interface
▪ Optimal Route Selection
[Link]/32 Static 60 0 D [Link] NULL0
[Link]/32 Static 60 0 D [Link] Vlanif100
▫ Route-based Forwarding [Link]/24 Direct 0 0 D [Link] Vlanif100
[Link]/32 Direct 0 0 D [Link] Vlanif100
2. Static Routing [Link]/8 Direct 0 0 D [Link] InLoopBack0
[Link]/32 Direct 0 0 D [Link] InLoopBack0
3. Dynamic Routing
Destination/Mask Protocol Flag Next-hop Outbound
4. Advanced Routing Features address interface
Route Cost
preference (Metric)

Page 22 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 23 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
4
22/10/2021

Fields in the IP Routing Table Route Preference - Basic Concepts


Destination/Mask: indicates the destination network address and mask of a specific route. The subnet address of a

Comparing Route Preferences • When a router obtains routes to the same destination
destination host or router is obtained through the AND operation on the destination address and mask. For example, if
the destination address is [Link] and the mask is [Link], the IP address of the subnet to which the host or subnet from different routing protocols (these routes
router belongs is [Link]. Routes have the same destination network address and
● Proto (Protocol): indicates the protocol type of the route, that is, the protocol through which a router learns the route.
mask), the router compares the preferences of these
● Pre (Preference): indicates the routing protocol preference of the route. There may be multiple routes to the same
destination, which have different next hops and outbound interfaces. These routes may be discovered by different routes and prefers the route with the lowest
Destination Different Installed in the IP
routing protocols or be manually configured. A router selects the route with the highest preference (with the lowest subnet/mask routing table preference value.
preference value) as the optimal route.
● Cost: indicates the cost of the route. When multiple routes to the same destination have the same preference, the route Same • A lower preference value indicates a higher
with the lowest cost is selected as the optimal route.
Higher Preference
preference.
● NextHop: indicates the local router’s next-hop address of the route to the destination network. This field specifies the Preference
• The route with the highest preference is installed in
next-hop device to which packets are forwarded.
● Interface: indicates the outbound interface of the route. This field specifies the local interface through which the local the IP routing table.
router forwards packets.

Page 24 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 25 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Route Preference - Comparison Process Metric - Comparison Process


Comparing Route Preferences Metric comparison

Dynamic routing • RTA learns two routes with the same destination
Dynamic routing protocol [Link]/30
protocol [Link]/30 • RTA discovers two routes to [Link]/30, one is an address ([Link]/30) and preference through
OSPF
OSPF Cost=10 Cost=10 [Link]/30
[Link]/30
OSPF route and the other a static route. In this OSPF. In this case, RTA needs to compare the
[Link]/30
[Link]/30 Cost=10
case, RTA compares the preferences of the two RTA
metrics of the two routes.
RTA [Link]/30 [Link]/30
[Link]/30 [Link]/30 routes and selects the route with the lowest • The two routes have different metrics. The
preference value. OSPF route with the next hop being [Link]

• Each routing protocol has a unique preference. has a lower metric (with the cost 10), so it is
IP routing table of RTA
IP routing table of RTA installed in the IP routing table.
• OSPF has a higher preference. Therefore, the Destination/Mask Protocol Cost Next Hop
Destination/Mask Protocol Preference Next Hop Installed
OSPF route is installed in the IP routing table. [Link]/30 OSPF 20 [Link]
Installed in in the IP
[Link]/30 Static 60 [Link] [Link]/30 OSPF 10 [Link]
the IP routing
[Link]/30 OSPF 10 [Link] routing table
table

Page 26 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 27 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Route Preference - Common Default Values Metric - Basic Concepts


● The following table lists the default preference values of common route types: Comparing Metrics • When a router discovers multiple routes to the
same destination network through the same
Routes
routing protocol, the router selects the optimal

Protocol Route Type Default Preference route based on the metrics of these routes if these
Different
Installed in the routes have the same preference.
Destination/mask IP routing table
Direct Direct route 0
• The metric of a route indicates the cost of reaching
Static Static route 60 Same
the destination address of the route.
OSPF internal route 10 Higher preference
Dynamic routing protocol Preference • Common metrics include the hop count,
OSPF external route 150
bandwidth, delay, cost, load, and reliability.
Same
preference • The route with the lowest metric is installed in the
Lower metric IP routing table.
Metric
• The metric is also known as the cost.

Page 28 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 29 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
5
22/10/2021

Contents Longest Matching


1. Overview of IP Routing ● When a router receives an IP packet, it compares the destination IP address of the packet with all routing
entries in the local routing table bit by bit until the longest matching entry is found. This is the longest
▫ Basic Concepts of Routing
matching mechanism.
▫ Generation of Routing Entries
Bit-by-bit matching
▫ Optimal Route Selection Destination IP
172.16.2.
address 172. 16. 00000010 00000001
▪ Route-based Forwarding 1

2. Static Routing Routing entry 1


[Link] 172. 16. 00000001 xxxxxxxx
[Link]
3. Dynamic Routing
[Link]
Routing entry 2 172. 16. 00000010 xxxxxxxx
4. Advanced Routing Features [Link]

[Link] 172. 16. xxxxxxxx xxxxxxxx


Routing entry 3
[Link]

Page 30 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 31 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Example of Longest Matching (1) Example of Longest Matching (2)


Example of Longest Matching Example of Longest Matching

Destination IP [Link]/30 • There are two routes to [Link] in the IP Destination IP [Link]/30
address: address:
[Link] routing table of RTA, one has the 16-bit mask and [Link]
RTA RTA
[Link]/30 the other has the 24-bit mask. According to the [Link]/30
• According to the longest matching rule, only the route
DAT longest matching rule, the route with the 24-bit Data
A
to [Link]/24 in the IP routing table matches the
mask is preferred to guide the forwarding of
destination IP address [Link]. Therefore, this
[Link]/30 packets destined for [Link]. [Link]/30
IP routing table of RTA route is used to forward packets destined for
IP routing table of RTA
Destination/Mask Next Hop [Link].
Destination/Mask Next Hop
[Link]/16 [Link]
[Link]/16 [Link]
[Link]/24 [Link]
[Link]/24 [Link] Match
[Link]/24 [Link] Match
[Link]/24 [Link]

Page 32 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 33 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Route-based Forwarding Process Summary of the IP Routing Table


Outbound
Destination/Mask Next Hop
Interface
• When a router obtains routes to the same destination subnet with the same mask from different routing
Destination [Link]/24 [Link] GE0/0 protocols, the router prefers the route with the lowest preference value of these routing protocols. If these
IP address:
[Link]/24 [Link] GE0/1
[Link] routes are learned from the same routing protocol, the router prefers the route with the lowest cost. In
[Link]/24 [Link] GE0/0
[Link]/24 [Link] GE0/1 summary, only the optimal route is installed in the IP routing table.
IP routing table of R2
Data • When a router receives a packet, it searches its IP routing table for the outbound interface and next hop
Gateway Gateway
[Link]/24
GE0/1 GE0/0
[Link]/24
GE0/0 GE0/1
[Link]/24
GE0/0 GE0/1
[Link]/24
based on the destination IP address of the packet. If it finds a matching routing entry, it forwards the packet
[Link] [Link] [Link] [Link] [Link] [Link]
according to the outbound interface and next hop specified by this entry. Otherwise, it discards the packet.
R1 R2 R3
• Packets are forwarded hop by hop. Therefore, all the routers along the path from the source to the
IP routing table of R1 IP routing table of R3
Destination/Mask Next Hop
Outbound
Destination/Mask Next Hop
Outbound destination must have routes destined for the destination. Otherwise, packet loss occurs.
Interface Interface
[Link]/24 [Link] GE0/1 [Link]/24 [Link] GE0/1 • Data communication is bidirectional. Therefore, both forward and backward routes must be available.
[Link]/24 [Link] GE0/0 [Link]/24 [Link] GE0/0
[Link]/24 [Link] GE0/0 [Link]/24 [Link] GE0/0
[Link]/24 [Link] GE0/0 [Link]/24 [Link] GE0/0

Page 34 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 35 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
6
22/10/2021

Contents Application Scenarios of Static Routes


Static Routes • Static routes are manually configured by network
1. Overview of IP Routing
administrators, have low system requirements, and
2. Static Routing apply to simple, stable, and small networks.

3. Dynamic Routing Destined for


[Link]/24 GE0/0/0 GE0/0/1 • The disadvantage of static routes is that they cannot
[Link]/24 [Link]/24
automatically adapt to network topology changes and
4. Advanced Routing Features GE0/0/0 GE0/0/1
RT [Link]/24 RT [Link]/24 RT so require manual intervention.
A B C
• RTA needs to forward the packets with the
destination address [Link]/24. However, the IP
Destination Protocol Next Hop
routing table of RTA has only one direct route, which
[Link] Static [Link]
[Link] Direct [Link] does not match [Link]/24. In this case, a static
route needs to be manually configured so that the
packets sent from RTA to [Link]/24 can be
forwarded to the next hop [Link].
Page 36 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 37 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Static Route Configuration Configuration Example


● Specify a next-hop IP address for a static route.
GE0/0/0 S1/0/0
[Huawei] ip route-static ip-address { mask | mask-length } nexthop-address [Link]/24 [Link]/24

GE0/0/0 S1/0/0 Configure RTA.


RT [Link]/24 RT [Link]/24 RT
● Specify an outbound interface for a static route. [RTA] ip route-static [Link] [Link] [Link]
A B C
[Huawei] ip route-static ip-address { mask | mask-length } interface-type interface-number Destined for Destined for
[Link]/24 [Link]/24
● Specify both the outbound interface and next hop for a static route. Configure RTC.
• Configure static routes on RTA and RTC for communication
[Huawei] ip route-static ip-address { mask | mask-length } interface-type interface-number [ nexthop-address ] between [Link]/24 and [Link]/24.
[RTC] ip route-static [Link] [Link] S1/0/0
When creating a static route, you can specify both the outbound interface and next hop. Alternatively, you can • Packets are forwarded hop by hop. Therefore, all the routers
specify either the outbound interface or next hop, depending on the interface type: along the path from the source to the destination must have
For a point-to-point interface (such as a serial interface), you must specify the outbound interface. routes destined for the destination.
For a broadcast interface (for example, an Ethernet interface) or a virtual template (VT) interface, you must specify • Data communication is bidirectional. Therefore, both forward and
the next hop. backward routes must be available.

Page 38 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 39 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Default Routes Application Scenarios of Default Routes


• Default routes are used only when packets to be forwarded do not match any routing entry in an IP routing ● Default routes are typically used at the egress of an enterprise network. For example, you can configure a
table. default route on an egress device to enable the device to forward IP packets destined for any address on

• In an IP routing table, a default route is the route to network [Link] (with the mask [Link]), namely, the Internet.

[Link]/0. RTA needs to forward packets


to a subnet that is not directly
Enterprise
connected to it and forwards network RT
the packets to [Link]. A [Link]/24 Internet
GE0/0/1 GE0/0/0 [Link]
[Link]/24 PC [Link] [Link]
RT RT [Link]
[Link]/24
A GE0/0/0 GE0/0/0 B Gateway: [Link]
[Link]/24 [Link]/24
10.0.0. .
10.0.0. .
1 2 [Link]/24
[RTA] ip route-static [Link] 0 [Link]

[RTA] ip route-static [Link] 0 [Link]

Page 40 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 41 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
7
22/10/2021

Contents Overview of Dynamic Routing


1. Overview of IP Routing Static Routing Dynamic Routing
• To use static routes on • Dynamic routes can be
2. Static Routing Static routing any device, you must Dynamic routing automatically discovered
manually configure OSPF and learned.
them. • Dynamic routes can
3. Dynamic Routing • Static routes cannot
adapt to link changes.
adapt to topology
changes.

4. Advanced Routing Features

• When the network scale expands, it becomes increasingly • Dynamic routing protocols automatically discover and
complex to manually configure static routes. In addition, when generate routes, and update routes when the topology
the network topology changes, static routes cannot adapt to changes. These protocols effectively reduce the workload of
these changes in a timely and flexible manner. network administrators and are widely used on large
networks.

Page 42 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 43 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Classification of Dynamic Routing Protocols Review of Lab 1


Classification by the application scope

Interior Gateway Protocol (IGP) Exterior Gateway Protocol (EGP)

RIP OSPF IS-IS BGP

Classification by working mechanism and routing algorithm

Distance-vector routing protocol Link-state routing protocol

RIP OSPF IS-IS

Page 44 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 45 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Review of Lab 1 Contents


1. Overview of IP Routing

2. Static Routing

3. Dynamic Routing

4. Advanced Routing Features

Page 46 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 47 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
8
22/10/2021

Equal-Cost Route Equal-Cost Route


Route Recursion Floating Route Route Recursion Floating Route
Route Summarization Route Summarization

Route Recursion (1) Route Recursion (2)


● Route recursion is a recursive search process of the IP routing table where the next-hop IP
GE0/0/0 GE0/0/1
address is wanted to route packets towards its destination but when found it is not part of any [Link]/24 [Link]/24
[Link]/24
GE0/0/0 GE0/0/1
directly connected network. RT [Link]/24 RT [Link]/24 RT
GE0/0/0 GE0/0/1 A B C
[Link]/24 [Link]/24
[Link]/24
GE0/0/0 GE0/0/1
RT [Link]/24 RT [Link]/24 RT Destination/M Outbound
A B C Next Hop
ask Interface
[RTA] ip route-static [Link] 24 [Link]
Recursio
[Link]/24 [Link] GE0/0/0
n [Link]/24 [Link] GE0/0/0
[RTA] ip route-static [Link] 24 [Link]
[RTA] ip route-static [Link] 24 [Link]

The next hop of the route to [Link]/24 is [Link], Configure a route to [Link], with the next hop pointing to [Link] on the directly connected network.
which is not on a directly connected network of RTA. In this way, RTA can recurse the route with the destination [Link]/24 to the route with the destination
If the IP routing table does not have a route to [Link].
[Link], this static route does not take effect and
cannot be installed in the IP routing table.

Page 48 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 49 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Equal-Cost Route Equal-Cost Route


Route Recursion Floating Route Route Recursion Floating Route
Route Summarization Route Summarization

Equal-Cost Route Floating Route - Basic Concepts


● When there are equal-cost routes in the IP routing table, a router forwards IP packets to be sent to the Floating Route
destination subnet through all valid outbound interfaces and next hops in the equal-cost routes, achieving • Different preferences can be manually configured
load balancing. for static routes. Therefore, you can configure two
RT
B static routes with the same destination
RTA GE0/0/0 GE0/0/0 RT
[Link]/30 Cost=10 [Link]/30 B address/mask but different preferences and next
[Link]/30 [Link]/30
GE0/0/1 Cost=10 GE0/0/1 [Link]/30 hops to implement backup of forwarding paths.
[Link]/30 [Link]/30
[Link]/30 • A backup route is known as a floating route, which
[Link]/30 [Link]/30 is used only when the primary route is unavailable.
If there are multiple routes to the same
RT RT
RTA's IP routing table destination from the same source, with the
A C
That is, a floating route is installed in the IP routing
same cost, but pointing to different next hops,
Destination/Mask Next Hop the routes are installed in the IP routing table table only when the next hop of the primary route
[Link] as equal-cost routes. Traffic to be sent to the Configure a floating route on RTA.
[Link]/30 destination will be distributed to these equal- is unreachable.
[Link]
cost routes. [RTA] ip route-static [Link] 30 [Link]
[RTA] ip route-static [Link] 30 [Link] preference 70

Page 50 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 51 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Equal-Cost Route Equal-Cost Route


Route Recursion Floating Route Route Recursion Floating Route
Route Summarization Route Summarization

Floating Route - Example CIDR


Floating Route Switching • Classless Inter-Domain Routing (CIDR) uses IP addresses and masks to identify networks and subnets. CIDR replaces
the previous addressing architecture of classful network design (such as classes A, B, and C addresses).

• CIDR is based on variable length subnet mask (VLSM). CIDR uses prefixes of any lengths to divide the address space
RT RT
B B with continuous IP addresses. Multiple address segments with continuous prefixes can be summarized into a network,
effectively reducing the number of routing entries.
[Link]/30 [Link]/30
[Link]/30 [Link]/30
192. 168. 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 [Link]/22
[Link]/30 [Link]/30

[Link]/30 [Link]/30 [Link]/30 [Link]/30 192. 168. 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 [Link]/23


RT RT RT RT
A C [Link]/21
A C
Destined for [Link]/24 192. 168. 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 [Link]/21

RTA's IP routing table when the primary link is available RTA's IP routing table when the primary link fails
Destination Next Hop Preference Destination Next Hop Preference 192. 168. 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 [Link]/23
[Link] [Link] 60 [Link] [Link] 70

Page 52 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 53 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
9
22/10/2021

Equal-Cost Route Equal-Cost Route


Route Recursion Floating Route Route Recursion Floating Route
Route Summarization Route Summarization

Background of Route Summarization Overview of Route Summarization


• Subnet division and VLSM resolve the problem of address space waste, but also bring a new challenge:
increasing routing entries in the IP routing table. [Link]/24
[Link]/24
RT RT
• Route summarization can minimize routing entries. A B
... • Route summarization is an approach of summarizing
12.1.1. ...
2 ... routes with the same prefix into one summary route to
12.1.1.
1 [Link]/24 minimize the IP routing table size and improve device
[Link]/24 [Link]/24 [Link]/24 [Link]/24
resource usage.
[Link]/24
• Route summarization uses CIDR to summarize network
RTB's IP routing table [RTA] ip route-static [Link] 16 [Link] segments with the same prefix into a single one.
RT
[Link]/24 A To route traffic to the directly connected network • The routes before being summarized are known as
[Link]/24 segments of RTA, RTB must have routes to these
[Link]/24 On RTA, configure static routes to the directly specific routes, and the routes created after
network segments. If a static route is manually configured connected network segments [Link]/24,
[Link]/24 for each network segment, the configuration workload will summarization are known as summarized routes or
[Link]/24, ..., and [Link]/24 of RTB, with the
RT [Link]/24 be heavy and RTB's IP routing table will have a large
[Link]/24 same next hop. Therefore, these routes can be summary routes.
B number of routing entries. summarized into one route.
[Link]/24

Page 54 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 55 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Equal-Cost Route Equal-Cost Route


Route Recursion Floating Route Route Recursion Floating Route
Route Summarization Route Summarization

Summarization and Calculation Problems Caused by Route Summarization (1)


192 168 X 0 Routing Loop

[Link]/24 1 1 0 000 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 00 1 0 0 0 0 0 000 [RTB] ip route-static [Link] 0 [Link] [RTA] ip route-static [Link] 16 [Link]

[Link]/24 1 1 0 000 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 01 0 0 0 0 0 0 0 0 0
[Link]/24
[Link]/24 RT RT
[Link]/24 1 1 0 000 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 01 1 0 0 0 0 0 000 B A
... 12.1.1. Internet
Network address Host address ... 2
12.1.1.
... 1
1 2
[Link]/24

[Link]/22 1 1 0 000 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RTB receives traffic destined Routes are summarized on RTA.
for [Link]/24 and forwards Therefore, RTA forwards the traffic
the traffic to RTA according to back to RTB according to the
• To summarize routes to multiple continuous network segments into one summary route that just includes these Loop
the default route. summary route to [Link]/16.
network segments, ensure that the mask length of the summary route is as long as possible.
3
• The key to achieve this is to convert the destination addresses of specific routes into binary numbers and then find
out the identical bits in these binary numbers.

Page 56 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 57 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Equal-Cost Route Equal-Cost Route


Route Recursion Floating Route Route Recursion Floating Route
Route Summarization Route Summarization

Problems Caused by Route Summarization (2) Accurate Route Summarization (1)


Solution for Preventing Routing Loops RT
[Link]/24
10.0.0. B
[Link]/24
[RTB] ip route-static [Link] 0 [Link] [RTA] ip route-static [Link] 16 [Link] 2 ...
RT [Link]/24
A

[Link]/24
20.0.0.
[Link]/24 RT RT RT
2 [Link]/24
... B 12.1.1. A C
Internet [Link]/24
... 2
... 12.1.1. ...
1 [Link]/24
[Link]/24

[RTA] ip route-static 172.16.0 16 [Link]

[RTB] ip route-static [Link] 16 0 NULL0 • To simplify the configuration, an administrator may configure a static summary route on RTA to allow RTA to reach network
segments [Link]/24 to [Link]/24 of RTB. However, this summary route also includes the network segments of RTC. As
• Configure a route pointing to Null0 on RTB to prevent a result, RTA forwards the traffic destined for network segments of RTC to RTB, causing data packet loss. This problem is caused
routing loops when summarizing routes. by inaccurate route summarization. To resolve this problem, the summary route must be as accurate as possible; that is, it just
covers all specific routes that are to be summarized, with no extra route included.

Page 58 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 59 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
10
22/10/2021

Equal-Cost Route
Route Recursion Floating Route
Route Summarization

Accurate Route Summarization (2) Quiz


10 1 0 0 1. How does a router select the optimal route?
[Link]/24 0 0 0 010 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 00 0 2. How do I configure a floating route?

[Link]/24 0 0 0 010 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 00 0
3. What is the summary route for routes to [Link]/24, [Link]/24, and [Link]/24?

[Link]/24 0 0 0 0101 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 00 0

/22
ip route-static [Link] 24 [Link]
ip route-static [Link] 24 [Link]
ip route-static [Link] 22 [Link]
ip route-static [Link] 24 [Link]

Accurately calculate the summarized


network address and mask to ensure
accurate route summarization.

Page 60 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved. Page 61 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

Summary
● This section presents the basic concepts of routes, how routes instruct routers to
forward IP packets, common route attributes, and default routes (special static routes).

● In addition, this section describes advanced routing features including route recursion,
floating routes, and equal-cost routes, which are widely used on live networks.

Page 62 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.

11

You might also like