0% found this document useful (0 votes)
16 views52 pages

05 IP Routing Basics

The document provides an overview of IP routing, emphasizing the importance of routers in facilitating communication between different IP subnets. It covers key concepts such as route selection, routing tables, and methods for obtaining routing information, including direct, static, and dynamic routes. The course aims to equip learners with a foundational understanding of routing principles and advanced features.

Uploaded by

Fatma Soualmia
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)
16 views52 pages

05 IP Routing Basics

The document provides an overview of IP routing, emphasizing the importance of routers in facilitating communication between different IP subnets. It covers key concepts such as route selection, routing tables, and methods for obtaining routing information, including direct, static, and dynamic routes. The course aims to equip learners with a foundational understanding of routing principles and advanced features.

Uploaded by

Fatma Soualmia
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
You are on page 1/ 52

IP Routing Basics

Page 1 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Foreword
 There are typically multiple IP subnets on a typical data communication network. Layer 3 devices
are required to exchange data between these IP subnets. These devices have the routing capability
and can forward data across subnets.
 Routing is the basic element of data communication networks. It is the process of selecting paths
on a network along which packets are sent from a source to a destination.
 This course introduces the basic concepts of routing.

Page 2 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Objectives
 On completion of this course, you will be able to:
 Understand the basic principles of routers.
 Know how routers select optimal routes.
 Understand the contents of routing tables.
 Master advanced routing features.

Page 3 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
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

4. Advanced Routing Features

Page 4 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Background: Inter-Subnet Communication

M
• An IP address uniquely identifies a node on a network.
Each IP address belongs to a unique subnet, and each
subnet may belong to a different area of the network.

• To implement IP addressing, subnets in different


N
areas need to communicate with each other.

How to communicate with


the network M?

Page 5 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
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.

 A routing device maintains an IP routing table that stores routing information.


Route-based Packet Forwarding

Router R4

Data R1 R2 R3

N M

Gateway Gateway

Destination-based forwarding

Page 6 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Routing Information

 A route contains the following information:


 Destination: identifies a destination subnet.
1.1.1.2
10.1.1.0/24
 Mask: identifies a subnet together with a destination IP
address.
GE0/0/0
1.1.1.3  Outbound interface: indicates the interface through which a
data packet is sent out of the local router.
 Next hop: indicates the next-hop address used by the router to
IP routing table forward the data packet to the destination subnet.
Outbound
Destination/Mask
Interface
Next Hop  The information identifies the destination subnet and
10.1.1.0/24 GE0/0/0 1.1.1.2 specifies the path for forwarding data packets.

Page 7 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
IP Routing Table

14.0.0.0/8 Outbound
Destination/Mask Next Hop
Interface
R4
• Routers discover routes using multiple methods.
11.0.0.0/8 2.2.2.2 GE0/0
1.1.1.2/30
13.0.0.0/8 3.3.3.2 GE0/1 • A router selects the optimal route and installs it in
14.0.0.0/8 1.1.1.2 GE0/2 its IP routing table.

GE0/2 • The router forwards IP packets based on routes in
1.1.1.0/30 1.1.1.1 GE0/2
1.1.1.1/30
1.1.1.1/32 127.0.0.1 GE0/2 the IP routing table.
GE0/0 GE0/1
2.2.2.1/30 3.3.3.1/30 • Routers manage path information by managing
R2
their IP routing tables.

2.2.2.2/30 3.3.3.2/30

R1 R3

11.0.0.0/8 13.0.0.0/8

Page 8 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
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

4. Advanced Routing Features

Page 9 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
How to Obtain Routing Information
• 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.

Direct Routes Static Routes Dynamic Routes


• Direct routes are automatically generated by • Static routes are manually configured by network • Dynamic routes are learned by dynamic routing
devices and point to local directly connected administrators. protocols running on routers.
networks. 40.1.1.0/24

GE0/0/0
20.1.1.0/24 30.1.1.0/24
GE0/0/1
10.1.1.0/24

GE0/0/1
Dynamic routing
protocol
GE0/0/2 OSPF

Outbound
Protocol Destination/Mask
Interface Outbound Outbound
Protocol Destination/Mask Protocol Destination/Mask
Direct 10.1.1.0/24 GE0/0/0 Interface Interface
Static 30.1.1.0/24 GE0/0/1 OSPF 40.1.1.0/24 GE0/0/2
Direct 20.1.1.0/24 GE0/0/1

Page 10 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Direct Routes (1)
Direct Routes
• A direct route is automatically generated by a device and
points to a local directly-connected network.
GE0/0/0 • When a router is the last hop router, IP packets to be
10.0.0.2/24
10.0.0.0/24
GE0/0/1
20.1.1.0/24 forwarded will match a direct route and the router will
RTB 20.1.1.2/24 directly forward the IP packet to the destination host.

• When a direct route is used for packet forwarding, the


destination IP address of a packet to be forwarded and
Direct routes in the IP routing table of RTB the IP address of the router‘s outbound interface are in
Destination/Mas Outbound the same subnet.
Protocol Next Hop
k Interface

10.0.0.0/24 Direct 10.0.0.2 GE0/0/0

20.1.1.0/24 Direct 20.1.1.2 GE0/0/1

Page 11 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Direct Routes (2)
Direct routes

GE0/0/0 GE0/0/1
10.0.0.2/24 20.1.1.3/24
• Not all the direct routes generated for interfaces are
GE0/0/0 GE0/0/1
RTA 10.0.0.1/24 RTB 20.1.1.2/24 RTC installed in the IP routing table. Only the direct routes of
which the physical status and protocol status of interfaces
are up are installed in the IP routing table.

Direct routes in the IP routing table of RTB


Outbound
Destination/Mask Protocol Next Hop
Interface
20.1.1.0/24 Direct 20.1.1.2 G0/0/1

• When GE0/0/0 goes down, the direct route for this interface is not installed
in the IP routing table.

Page 12 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
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

4. Advanced Routing Features

Page 13 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Examining the IP Routing Table
<Quidway> display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------------------------------Routing Tables:
Public
Destinations : 6 Routes : 6

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.1/32 Static 60 0 D 0.0.0.0 NULL0


2.2.2.2/32 Static 60 0 D 100.0.0.2 Vlanif100
100.0.0.0/24 Direct 0 0 D 100.0.0.1 Vlanif100
100.0.0.1/32 Direct 0 0 D 127.0.0.1 Vlanif100
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

Destination/Mask Protocol Flag Next-hop Outbound


address interface
Route Cost
preference (Metric)

Page 14 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Fields in the IP Routing Table
 Destination/Mask: indicates the destination network address and mask of a specific route. The subnet address of a destination host or
router is obtained through the AND operation on the destination address and mask. For example, if the destination address is 1.1.1.1
and the mask is 255.255.255.0, the IP address of the subnet to which the host or router belongs is 1.1.1.0.
 Proto (Protocol): indicates the protocol type of the route, that is, the protocol through which a router learns the route.
 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 routing protocols or be manually
configured. A router selects the route with the highest preference (with the lowest 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 with the lowest
cost is selected as the optimal route.
 NextHop: indicates the local router’s next-hop address of the route to the destination network. This field specifies the 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 router forwards
packets.

Page 15 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route Preference - Basic Concepts
Comparing Route Preferences • When a router obtains routes to the same destination
subnet from different routing protocols (these routes have
Routes the same destination network address and mask), the
router compares the preferences of these routes and

Different
prefers the route with the lowest preference value.
Destination Installed in the IP
subnet/mask routing table
• A lower preference value indicates a higher preference.
Same
• The route with the highest preference is installed in the IP
Higher Preference routing table.
Preference

Page 16 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route Preference - Comparison Process
Comparing Route Preferences

Dynamic routing
protocol 20.1.1.2/30 • RTA discovers two routes to 10.0.0.0/30, one is an OSPF
OSPF
10.0.0.0/30
20.1.1.1/30
route and the other a static route. In this case, RTA
compares the preferences of the two routes and selects
RTA
30.1.1.1/30 30.1.1.2/30 the route with the lowest preference value.

• Each routing protocol has a unique preference.

IP routing table of RTA • OSPF has a higher preference. Therefore, the OSPF
route is installed in the IP routing table.
Destination/Mask Protocol Preference Next Hop

10.0.0.0/30 Static 60 30.1.1.2 Installed in


the IP
10.0.0.0/30 OSPF 10 20.1.1.2 routing
table

Page 17 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Metric - Comparison Process
Metric comparison

Dynamic routing • RTA learns two routes with the same destination
protocol 20.1.1.2/30
OSPF address (10.0.0.0/30) and preference through OSPF. In
Cost=10 Cost=10 10.0.0.0/30
20.1.1.1/30 this case, RTA needs to compare the metrics of the
Cost=10
RTA two routes.
30.1.1.1/30 30.1.1.2/30
• The two routes have different metrics. The OSPF
route with the next hop being 30.1.1.2 has a lower
metric (with the cost 10), so it is installed in the IP
IP routing table of RTA
routing table.
Destination/Mask Protocol Cost Next Hop
10.0.0.0/30 OSPF 20 20.1.1.2 Installed in
the IP
10.0.0.0/30 OSPF 10 30.1.1.2 routing
table

Page 18 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route Preference - Common Default Values
 The following table lists the default preference values of common route types:

Protocol Route Type Default Preference

Direct Direct route 0

Static Static route 60

OSPF internal route 10


Dynamic routing protocol
OSPF external route 150

Page 19 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Metric - Basic Concepts
Comparing Metrics • When a router discovers multiple routes to the same

Routes
destination network through the same routing protocol,
the router selects the optimal route based on the metrics
of these routes if these routes have the same preference.
Different
Installed in the IP
Destination/mask routing table • The metric of a route indicates the cost of reaching the
Same destination address of the route.

Higher preference
• Common metrics include the hop count, bandwidth,
Preference delay, cost, load, and reliability.

• The route with the lowest metric is installed in the IP


Same preference
routing table.
Lower metric
Metric • The metric is also known as the cost.

Page 20 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
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

4. Advanced Routing Features

Page 21 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Longest Matching
 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 matching mechanism.

Bit-by-bit matching
Destination IP address
172.16.2.1
172. 16. 00000010 00000001

172.16.1.0 172. 16. 00000001 xxxxxxxx


Routing entry 1
255.255.255.0

172.16.2.0 172. 16. 00000010 xxxxxxxx


Routing entry 2
255.255.255.0

172.16.0.0 172. 16. xxxxxxxx xxxxxxxx


Routing entry 3
255.255.0.0

Page 22 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Example of Longest Matching (1)
Example of Longest Matching

Destination IP 10.1.1.2/30
address:
• There are two routes to 192.168.2.2 in the IP routing
192.168.2.2
RTA
table of RTA, one has the 16-bit mask and the other has
20.1.1.2/30 the 24-bit mask. According to the longest matching rule,
DATA the route with the 24-bit mask is preferred to guide the
forwarding of packets destined for 192.168.2.2.
30.1.1.2/30

IP routing table of RTA


Destination/Mask Next Hop
192.168.0.0/16 10.1.1.2
192.168.2.0/24 20.1.1.2 Match
192.168.3.0/24 30.1.1.2

Page 23 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Example of Longest Matching (2)
Example of Longest Matching

Destination IP 10.1.1.2/30
address:
192.168.3.2
RTA
20.1.1.2/30
• According to the longest matching rule, only the route to
Data
192.168.3.0/24 in the IP routing table matches the
destination IP address 192.168.3.2. Therefore, this route is
30.1.1.2/30
IP routing table of RTA used to forward packets destined for 192.168.3.2.
Destination/Mask Next Hop
192.168.0.0/16 10.1.1.2
192.168.2.0/24 20.1.1.2
192.168.3.0/24 30.1.1.2 Match

Page 24 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route-based Forwarding Process
Outbound
Destination/Mask Next Hop
Interface
Destination IP 20.0.1.0/24 20.0.1.2 GE0/0
address:
30.0.1.0/24 30.0.1.1 GE0/1
40.0.1.2
10.0.1.0/24 20.0.1.1 GE0/0
40.0.1.0/24 30.0.1.2 GE0/1
IP routing table of R2
Data
Gateway Gateway
GE0/1 GE0/0 GE0/0 GE0/1 GE0/0 GE0/1
10.0.1.0/24 20.0.1.0/24 30.0.1.0/24 40.0.1.0/24
10.0.1.1 20.0.1.1 20.0.1.2 30.0.1.1 30.0.1.2 40.0.1.1
R1 R2 R3

IP routing table of R1 IP routing table of R3


Outbound Outbound
Destination/Mask Next Hop Destination/Mask Next Hop
Interface Interface
10.0.1.0/24 10.0.1.1 GE0/1 40.0.1.0/24 40.0.1.1 GE0/1
20.0.1.0/24 20.0.1.1 GE0/0 30.0.1.0/24 30.0.1.2 GE0/0
30.0.1.0/24 20.0.1.2 GE0/0 10.0.1.0/24 30.0.1.1 GE0/0
40.0.1.0/24 20.0.1.2 GE0/0 20.0.1.0/24 30.0.1.1 GE0/0

Page 25 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Summary of the IP Routing Table
• When a router obtains routes to the same destination subnet with the same mask from different routing protocols, the
router prefers the route with the lowest preference value of these routing protocols. If these routes are learned from the
same routing protocol, the router prefers the route with the lowest cost. In summary, only the optimal route is installed
in the IP routing table.

• When a router receives a packet, it searches its IP routing table for the outbound interface and next hop based on the
destination IP address of the packet. If it finds a matching routing entry, it forwards the packet according to the
outbound interface and next hop specified by this entry. Otherwise, it discards the packet.

• Packets are forwarded hop by hop. Therefore, all the routers along the path from the source to the destination must
have routes destined for the destination. Otherwise, packet loss occurs.

• Data communication is bidirectional. Therefore, both forward and backward routes must be available.

Page 26 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. Overview of IP Routing

2. Static Routing

3. Dynamic Routing

4. Advanced Routing Features

Page 27 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Application Scenarios of Static Routes
Static Routes • Static routes are manually configured by network
administrators, have low system requirements, and apply to
simple, stable, and small networks.
Destined for
20.1.1.0/24 GE0/0/0 GE0/0/1 • The disadvantage of static routes is that they cannot
10.0.0.2/24 20.1.1.3/24
automatically adapt to network topology changes and so
GE0/0/0 GE0/0/1
RTA 10.0.0.1/24 RTB 20.1.1.2/24 RTC require manual intervention.

• RTA needs to forward the packets with the destination


address 20.1.1.0/24. However, the IP routing table of RTA
Destination Protocol Next Hop
20.1.1.0 Static 10.0.0.2 has only one direct route, which does not match
10.0.0.0 Direct 10.0.0.1 20.1.1.0/24. In this case, a static route needs to be manually
configured so that the packets sent from RTA to 20.1.1.0/24
can be forwarded to the next hop 10.0.0.2.

Page 28 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Static Route Configuration
 Specify a next-hop IP address for a static route.
[Huawei] ip route-static ip-address { mask | mask-length } nexthop-address

 Specify an outbound interface for a static route.


[Huawei] ip route-static ip-address { mask | mask-length } interface-type interface-number

 Specify both the outbound interface and next hop for a static route.
[Huawei] ip route-static ip-address { mask | mask-length } interface-type interface-number [ nexthop-address ]

When creating a static route, you can specify both the outbound interface and next hop. Alternatively, you can specify either the
outbound interface or next hop, depending on the interface type:
For a point-to-point interface (such as a serial interface), you must specify the outbound interface.
For a broadcast interface (for example, an Ethernet interface) or a virtual template (VT) interface, you must specify the next hop.

Page 29 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Configuration Example
GE0/0/0 S1/0/0
10.0.0.2/24 20.1.1.3/24
GE0/0/0 S1/0/0 Configure RTA.
RTA 10.0.0.1/24 RTB 20.1.1.2/24 RTC
[RTA] ip route-static 20.1.1.0 255.255.255.0 10.0.0.2

Destined for Destined for


20.1.1.0/24 10.1.1.0/24
Configure RTC.
• Configure static routes on RTA and RTC for communication between [RTC] ip route-static 10.0.0.0 255.255.255.0 S1/0/0
10.0.0.0/24 and 20.1.1.0/24.

• Packets are forwarded hop by hop. Therefore, all the routers along the
path from the source to the destination must have routes destined for
the destination.

• Data communication is bidirectional. Therefore, both forward and


backward routes must be available.

Page 30 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Default Routes
• Default routes are used only when packets to be forwarded do not match any routing entry in an IP routing table.

• In an IP routing table, a default route is the route to network 0.0.0.0 (with the mask 0.0.0.0), namely, 0.0.0.0/0.

RTA needs to forward packets to a


subnet that is not directly
connected to it and forwards the
packets to 10.0.0.2.

192.168.1.0/24
RTA RTB 192.168.2.0/24
GE0/0/0 GE0/0/0
10.0.0.0/24 192.168.3.0/24
10.0.0.1 .
10.0.0.2 .
192.168.254.0/24

[RTA] ip route-static 0.0.0.0 0 10.0.0.2

Page 31 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Application Scenarios of Default Routes
 Default routes are typically used at the egress of an enterprise network. For example, you can configure a default route
on an egress device to enable the device to forward IP packets destined for any address on the Internet.

Enterprise
network RTA
1.2.3.0/24 Internet
GE0/0/1 GE0/0/0 1.2.3.254
PC 192.168.1.254 1.2.3.4
192.168.1.100
Gateway: 192.168.1.254

[RTA] ip route-static 0.0.0.0 0 1.2.3.254

Page 32 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. Overview of IP Routing

2. Static Routing

3. Dynamic Routing

4. Advanced Routing Features

Page 33 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Overview of Dynamic Routing
Static Routing Dynamic Routing

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

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

Page 34 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Classification of Dynamic Routing Protocols
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 35 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Contents
1. Overview of IP Routing

2. Static Routing

3. Dynamic Routing

4. Advanced Routing Features

Page 36 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Route Recursion (1)


 Route recursion is a recursive search process of the IP routing table where the next-hop IP address is wanted
to route packets towards its destination but when found it is not part of any directly connected network.

GE0/0/0 GE0/0/1
10.0.0.2/24 20.1.1.3/24
30.1.2.0/24
GE0/0/0 GE0/0/1
RTA 10.0.0.1/24 RTB 20.1.1.2/24 RTC

[RTA] ip route-static 30.1.2.0 24 20.1.1.3

The next hop of the route to 30.1.2.0/24 is 20.1.1.3, which is


not on a directly connected network of RTA. If the IP routing
table does not have a route to 20.1.1.3, this static route does
not take effect and cannot be installed in the IP routing
table.

Page 37 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Route Recursion (2)

GE0/0/0 GE0/0/1
10.0.0.2/24 20.1.1.3/24
30.1.2.0/24
GE0/0/0 GE0/0/1
RTA 10.0.0.1/24 RTB 20.1.1.2/24 RTC

Destination/Mas Outbound
Next Hop
k Interface
[RTA] ip route-static 30.1.2.0 24 20.1.1.3
Recursion
30.1.2.0/24 20.1.1.3 GE0/0/0
20.1.1.0/24 10.0.0.2 GE0/0/0
[RTA] ip route-static 20.1.1.0 24 10.0.0.2

Configure a route to 20.1.1.3, with the next hop pointing to 10.0.0.2 on the directly connected network.
In this way, RTA can recurse the route with the destination 30.1.2.0/24 to the route with the destination 10.0.0.2.

Page 38 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Equal-Cost Route
 When there are equal-cost routes in the IP routing table, a router forwards IP packets to be sent to the destination
subnet through all valid outbound interfaces and next hops in the equal-cost routes, achieving load balancing.

RTA GE0/0/0 GE0/0/0 RTB


20.1.1.1/30 Cost=10 20.1.1.2/30
10.0.0.0/30
GE0/0/1 Cost=10 GE0/0/1
30.1.1.1/30 30.1.1.2/30

If there are multiple routes to the same destination


RTA's IP routing table from the same source, with the same cost, but
Destination/Mask Next Hop pointing to different next hops, the routes are
installed in the IP routing table as equal-cost routes.
20.1.1.2 Traffic to be sent to the destination will be
10.0.0.0/30
30.1.1.2 distributed to these equal-cost routes.

Page 39 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Floating Route - Basic Concepts


Floating Route
• Different preferences can be manually configured for

RTB static routes. Therefore, you can configure two static


routes with the same destination address/mask but
different preferences and next hops to implement
10.1.1.2/30
20.0.0.0/30 backup of forwarding paths.
10.1.1.1/30 • A backup route is known as a floating route, which is
10.1.2.1/30 10.1.2.2/30 used only when the primary route is unavailable. That is,
RTA RTC
a floating route is installed in the IP routing table only
when the next hop of the primary route is unreachable.
Configure a floating route on RTA.
[RTA] ip route-static 20.0.0.0 30 10.1.1.2
[RTA] ip route-static 20.0.0.0 30 10.1.2.2 preference 70

Page 40 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Floating Route - Example


Floating Route Switching

RTB RTB

10.1.1.2/30 10.1.1.2/30
20.0.0.0/30 20.0.0.0/30

10.1.1.1/30 10.1.1.1/30

10.1.2.1/30 10.1.2.2/30 10.1.2.1/30 10.1.2.2/30


RTA RTC RTA RTC
Destined for 20.1.1.0/24

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
20.0.0.0 10.1.1.2 60 20.0.0.0 10.1.2.2 70

Page 41 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

CIDR
• 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 with continuous IP
addresses. Multiple address segments with continuous prefixes can be summarized into a network, effectively reducing the number of
routing entries.

192. 168. 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 192.168.12.0/22

192. 168. 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 192.168.10.0/23


192.168.8.0/21
192. 168. 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 192.168.9.0/21

192. 168. 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 192.168.14.0/23

Page 42 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Background 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.

• Route summarization can minimize routing entries.

192.168.3.0/24 192.168.4.0/24 192.168.5.0/24 192.168.6.0/24

192.168.2.0/24

RTB's IP routing table


RTA
192.168.1.0/24 To route traffic to the directly connected network segments of
192.168.1.0/24
192.168.2.0/24 RTA, RTB must have routes to these network segments. If a
192.168.3.0/24 static route is manually configured for each network segment,
192.168.4.0/24 the configuration workload will be heavy and RTB's IP routing
RTB table will have a large number of routing entries.
192.168.5.0/24
192.168.6.0/24

Page 43 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Overview of Route Summarization

10.1.1.0/24
10.1.2.0/24
RTA RTB
... • Route summarization is an approach of summarizing routes
12.1.1.2 ...
12.1.1.1 ... with the same prefix into one summary route to minimize the IP
10.1.10.0/24
routing table size and improve device resource usage.

• Route summarization uses CIDR to summarize network


segments with the same prefix into a single one.
[RTA] ip route-static 10.1.0.0 16 12.1.1.2
• The routes before being summarized are known as specific
routes, and the routes created after summarization are known
On RTA, configure static routes to the directly as summarized routes or summary routes.
connected network segments 10.1.1.0/24, 10.1.2.0/24,
..., and 10.1.10.0/24 of RTB, with the same next hop.
Therefore, these routes can be summarized into one
route.

Page 44 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Summarization and Calculation


192 168 X 0

192.168.1.0/24 1 1 0 000 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

192.168.2.0/24 1 1 0 000 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0

192.168.3.0/24 1 1 0 000 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0
Network address Host address

192.168.0.0/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

• To summarize routes to multiple continuous network segments into one summary route that just includes these network
segments, ensure that the mask length of the summary route is as long as possible.

• 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 45 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Problems Caused by Route Summarization (1)


Routing Loop

[RTB] ip route-static 0.0.0.0 0 12.1.1.2 [RTA] ip route-static 10.1.0.0 16 12.1.1.1

10.1.1.0/24
10.1.2.0/24 RTB RTA
... 12.1.1.2 Internet
... 12.1.1.1
...
1 2
10.1.10.0/24

RTB receives traffic destined for Routes are summarized on RTA.


10.1.20.0/24 and forwards the Therefore, RTA forwards the traffic back
traffic to RTA according to the to RTB according to the summary route
default route. Loop to 10.1.0.0/16.

Page 46 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Problems Caused by Route Summarization (2)


Solution for Preventing Routing Loops

[RTB] ip route-static 0.0.0.0 0 12.1.1.2 [RTA] ip route-static 10.1.0.0 16 12.1.1.1

10.1.1.0/24
10.1.2.0/24 RTB RTA
... 12.1.1.2 Internet
...
... 12.1.1.1
10.1.10.0/24

[RTB] ip route-static 10.1.0.0 16 0 NULL0

• Configure a route pointing to Null0 on RTB to prevent


routing loops when summarizing routes.

Page 47 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Accurate Route Summarization (1)


RTB 172.16.1.0/24
10.0.0.2 172.16.2.0/24
...
RTA 172.16.31.0/24

20.0.0.2
RTC
172.16.32.0/24
172.16.33.0/24
...
172.16.63.0/24

[RTA] ip route-static 172.16.0 16 10.0.0.2

• To simplify the configuration, an administrator may configure a static summary route on RTA to allow RTA to reach network segments
172.16.1.0/24 to 172.16.31.0/24 of RTB. However, this summary route also includes the network segments of RTC. As a result, RTA forwards the
traffic destined for network segments of RTC to RTB, causing data packet loss. This problem is caused 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 48 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Route
Route Recursion Equal-Cost Route Floating Route
Summarization

Accurate Route Summarization (2)


10 1 0 0

10.1.1.0/24 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

10.1.2.0/24 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0

10.1.3.0/24 0 0 0 0 10 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0

/22
ip route-static 10.1.1.0 24 12.1.1.2
ip route-static 10.1.2.0 24 12.1.1.2
ip route-static 10.1.1.0 22 12.1.1.2
ip route-static 10.1.3.0 24 12.1.1.2

Accurately calculate the summarized network


address and mask to ensure accurate route
summarization.

Page 49 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Quiz
1. How does a router select the optimal route?

2. How do I configure a floating route?

3. What is the summary route for routes to 10.1.1.0/24, 10.1.3.0/24, and 10.1.9.0/24?

Page 50 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 51 Copyright © 2020 Huawei Technologies Co., Ltd. All rights reserved.
Thank You
www.huawei.com

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

You might also like