IP Routing and Routing
Table
[Link]
Copyright © Huawei Technologies Co., Ltd. All rights reserved.
Foreword
Route technology is the key point that internet is
running continuously. Route is a very interesting and
complex task, and eternal topic.
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page3
Objectives
Upon completion of this course, you will be able to:
Know the concept of route
Know the classification of routing protocol
Understand the routing process of data packet in the
network
Understand the structure of routing table
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page4
What’s The Route?
A route is the path information to guide IP packets
to be transferred.
Destinatio
n
E0/1
RTC network N
E0/0 S0/0
RTB
RTA
Other networks
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page5
IP Routing Process
E1 E0 E0 E1 E0 E1
[Link] [Link]/24 [Link]/24 [Link]
.1 .2 .1 .2
RTA RTB RTC
destination Next hop interface destination Next hop interface destination Next hop interface
[Link] [Link] E0 [Link] [Link] E0 [Link] [Link] E0
[Link] [Link] E0 [Link] [Link] E0 [Link] [Link] E0
[Link] [Link] E1 [Link] [Link] E0 [Link] [Link] E0
[Link] [Link] E0 [Link] [Link] E1 [Link] [Link] E1
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page6
The Key Function of Router
Check the destination of the data packet
Confirm the information resource
Discover possible route
Select best route
Validate and maintain route information
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page7
Routing Table Establishment
10.1.1.
0
E0/0
192.168.2
E1/0
.0
protocol destination
interface
DIRECT [Link]
E0/0
OSPF [Link]
E1/0
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page8
Routes—Discovered by Data
Link Layer
[Link]/30
RTB RTA
.1 .2
.1
[Link]/24
[RTB]display ip routing-table
Routing Tables: Public
Destinations : 8 Routes : 8
.2
Destination/Mask Proto Pre Cost NextHop Interface
[Link]/30 Direct 0 0 [Link] Serial0/0/0
RTC [Link]/32 Direct 0 0 [Link] InLoopBack0
……
[Link]/32 Direct 0 0 [Link] InLoopBack0
[Link]/32 Direct 0 0 [Link] Serial0/0/1
[Link]/8 Direct 0 0 [Link] InLoopBack0
[Link]/32 Direct 0 0 [Link] InLoopBack0
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page9
Routes—Static Route
RTA RTB
[Link]/30
.1 .2
Configure static route towards [Link]/32
destination network [Link]/32
[RTA] display ip routing-table
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost NextHop Interface
[Link]/32 Static 60 0 [Link] Ethernet0
[Link]/30 Direct 0 0 [Link] Serial0
[Link]/32 Direct 0 0 [Link] InLoopBack0
[Link]/32 Direct 0 0 [Link] Serial0
[Link]/8 Direct 0 0 [Link] InLoopBack0
[Link]/32 Direct 0 0 [Link] InLoopBack0
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page10
Routes—Discovered by Dynamic
Routing Protocol
[Link]/32
[Link]/24 RTC
.2
OSPF
[RTB]display ip routing-table
RTA RIP .1
Routing Tables: Public
[Link]/8
Destinations : 10 Routes : 10
.2 .1
[Link]/24 RTB Destination/Mask Proto Pre Cost NextHop Interface
[Link]/30 Direct 0 0 [Link] Serial0/0/0
[Link]/32 Direct 0 0 [Link] Serial0/0/0
……
[Link]/32 Direct 0 0 [Link] InLoopBack0
[Link]/32 OSPF 10 1563 [Link] Serial0/0/1
[Link]/24 RIP 100 1 [Link] Serial0/0/0
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page11
Static and Dynamic Route
Static route Dynamic route
The route that router gets
The route configured
from other routers via
manually by network
routing protocol
administrator
When network topological
When network topological is changed, routers will
is changed, administrator update route information
need to update static route automatically
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page12
Routing Protocol
Routing protocol is like language that used to exchange information
between routers, routers shares network status and network reachable
information via routing protocol.
The communication peers must run same protocols that used to exchange
routing information.
Routing protocol define a set of rules about communication between the
routers
Routing protocol maintains routing table and provide the best
forwarding path.
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page13
Routing Protocols
Classification—Working Area
IGPs:RIP OSPF ISIS
EGPs:BGP
AS100 AS200
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page14
Routing Protocols
Classification—Protocol
Algorithm
According to protocol algorithm
Distance-Vector routing protocol
It includes RIP and BGP. Thereinto, BGP is also called
Path-Vector routing protocol.
Link-State routing protocol
It is also called the shortest path first routing protocol,
includes OSPF and IS-IS.
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page15
Routing Protocols
Classification—Service
Application
According to service application, routing
protocol can be divide into the following types:
Unicast Routing Protocol: includes RIP、OSPF、BGP
and IS-IS and so on.
Multicast Routing Protocol : includes DVMRP、PIM-
SM、PIM-DM and so on.
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page16
Routing Table
[Quidway] display ip routing-table
Routing Tables:
Destination/Mask proto pref Metric Nexthop Interface
[Link]/0 Static 60 0 [Link] Serial0/0
[Link]/8 RIP 100 3 [Link] Serial0/1
[Link]/8 OSPF 10 50 [Link] Ethernet0/0
[Link]/16 RIP 100 4 [Link] Serial0/0
[Link]/8 Static 60 0 [Link] Serial0/1
[Link]/8 Direct 0 0 [Link] Ethernet0/2
[Link]/32 Direct 0 0 [Link] LoopBack0
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page17
Preference of Routing Protocol
If there are multiple routes, the route with higher
preference (the smaller value, the higher preference)
will be used to guide IP packet to be transferred.
RIP OSPF
[Link] R0 [Link]
R1
[Link] R1
Routing table
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page18
Preference of Routing Protocol
The default route preference on VRP platform
is shown in the following table
Routing protocol Preference
DIRECT 0
OSPF 10
IS-IS 15
STATIC 60
RIP 100
OSPF ASE 150
IBGP 255
EBGP 255
Untrustworthy 255
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page19
Route Metric
There are two routes from router A to D :
Path1: A→B→C→D ,the total route metric is 9
Path2: A→E→F→C→D , the total route metric is 12
The router first selects the smaller metric route, and take it into the
routing table.
B C D
5 2
A 2
1
6
F
3
E
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page20
Equal Cost Multi-Path (ECMP)
Equal Cost Multi-Path
There are several routes towards the same destination with same
route metric, if the route preference is same, these routes are all
added into the routing table, IP packet will be transferred over
these link by turns.
Two equal cost multi-path from A to D:
A→B→C→D,total metric 5+5+8=18
B
A→C→D, total metric 10+8=18
5 5
A C D
8
10
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page21
Equal Cost Multi-Path
[RTB] display ip routing-table
Routing Tables: Public
Destinations : 13 Routes : 15
Destination/Mask Proto Pre Cost NextHop Interface
[Link]/24 Direct 0 0 [Link] Serial2
[Link]/32 Direct 0 0 [Link] Serial2
[Link]/32 Direct 0 0 [Link] InLoopBack0
[Link]/32 Static 60 0 [Link] Serial0
Static 60 0 [Link] Serial1
Static 60 0 [Link] Serial2
[Link]/32 Direct 0 0 [Link] InLoopBack0
[Link]/8 Direct 0 0 [Link] InLoopBack0
[Link]/32 Direct 0 0 [Link] InLoopBack0
Equal Cost Multi-Path
realizes load-balance
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page22
The Longest Match
Lookup routing table
Destination makes
logical AND operation
with mask
Compare the destination
match
Select the longest
address in the routing table matched route
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page23
The Example of Longest Match
The data packet of destination [Link] will match the route
[Link]/16
[Quidway] display ip routing-table
Routing Tables:
Destination/Mask proto pref Metric Nexthop Interface
[Link]/0 Static 60 0 [Link] Serial0/0
[Link]/8 RIP 100 3 [Link] Serial0/1
[Link]/8 OSPF 10 50 [Link] Ethernet0/0
[Link]/16 RIP 100 4 [Link] Serial0/0
[Link]/8 Static 60 0 [Link] Serial0/1
[Link]/8 Direct 0 0 [Link] Ethernet0/2
[Link]/32 Direct 0 0 [Link] LoopBack0
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page24
Routing Loop
Routing LOOP: the data packet is transferred between
the two or more routers circularly until TTL decrease to
0, then it will be discarded.
RTB
TTL-1
TTL-1
RTA Network N
TTL-1
Packet towards RTC RTD
network N
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page25
Summary
How many types of routing protocol? What’s the
characteristic of each?
What’s the classification of dynamic routing
protocol?
What factor does routing table include?
What’s equal cost multi-path?
Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page26
Thank you
[Link]