2) Routing Protocol Basis.pdf

26
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved www.huawei.com Routing Protocol Basis

Transcript of 2) Routing Protocol Basis.pdf

Page 1: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved

www.huawei.com

Routing Protocol Basis

Page 2: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 2

Route technology is the key point that

internet is running continuously.

Route is a very interesting and complex

task, and eternal topic.

Page 3: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 3

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

Page 4: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 4

What’s The Route?

A route is the path information to guide IP packets to be

transferred.

Destination

network N

Other networks

E0/0 S0/0

E0/1

RTA

RTB

RTC

Page 5: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 5

IP Routing Process

RTA

.1

E0 10.1.2.0/24 10.2.1.0/24

E1

RTC RTB

.2

E0

.1 .2

E0

10.3.1.0 10.4.1.0

destination Next hop interface

10.1.2.0 10.1.2.1 E0

10.2.1.0 10.1.2.2 E0

10.3.1.0 10.3.1.1 E1

10.4.1.0 10.1.2.2 E0

destination Next hop interface

10.1.2.0 10.1.2.2 E0

10.2.1.0 10.1.2.1 E0

10.3.1.0 10.1.2.1 E0

10.4.1.0 10.2.1.2 E1

destination Next hop interface

10.1.2.0 10.2.2.2 E0

10.2.1.1 10.2.1.2 E0

10.3.1.0 10.2.1.1 E0

10.4.1.0 10.4.1.1 E1

E1 E1

Page 6: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 6

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

Page 7: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 7

Routing Table Establishment

E0/0

E1/0

protocol destination interface

DIRECT 10.1.1.0 E0/0

OSPF 192.168.2.0 E1/0

10.1.1.0

192.168.2.0

Page 8: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 8

Routes—Discovered by Data Link Layer

[RTB]display ip routing-table

Routing Tables: Public

Destinations : 8 Routes : 8

Destination/Mask Proto Pre Cost NextHop Interface

10.1.1.0/30 Direct 0 0 10.1.1.1 Serial0/0/0

10.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0

……

10.1.2.1/32 Direct 0 0 127.0.0.1 InLoopBack0

10.1.2.2/32 Direct 0 0 10.1.2.2 Serial0/0/1

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0

10.1.1.0/30 RTA

10

.1.2

.0/2

4

.1

.1 .2

.2

RTB

RTC

Page 9: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 9

Routes—Static Route

[RTA] display ip routing-table

Routing Tables: Public

Destinations : 8 Routes : 8

Destination/Mask Proto Pre Cost NextHop Interface

2.2.2.2/32 Static 60 0 10.1.2.2 Ethernet0

10.1.1.0/30 Direct 0 0 10.1.1.1 Serial0

10.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0

10.1.1.2/32 Direct 0 0 10.1.1.2 Serial0

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0

RTB

2.2.2.2/32

10.1.1.0/30

RTA

.1 .2

Configure static route towards

destination network 2.2.2.2/32

Page 10: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 10

Routes—Discovered by Dynamic Routing

Protocol

[RTB]display ip routing-table

Routing Tables: Public

Destinations : 10 Routes : 10

Destination/Mask Proto Pre Cost NextHop Interface

10.1.1.0/30 Direct 0 0 10.1.1.2 Serial0/0/0

10.1.1.1/32 Direct 0 0 10.1.1.1 Serial0/0/0

……

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0

172.16.1.1/32 OSPF 10 1563 10.1.2.2 Serial0/0/1

192.168.1.0/24 RIP 100 1 10.1.1.1 Serial0/0/0

10.1.1.0/8

RTB

10

.1.2

.0/2

4 .1

.1

OSPF

RIP RTA

RTC

172.16.1.1/32

192.168.2.1/24 .2

.2

Page 11: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 11

Static and Dynamic Route

Static route Dynamic route

The route configured

manually by network

administrator

When network topological

is changed, administrator

need to update static route

The route that router gets

from other routers via

routing protocol

When network topological

is changed, routers will

update route information

automatically

Page 12: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 12

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.

Page 13: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 13

Routing Protocols Classification——Working

Area

IGPs:RIP OSPF ISIS

EGPs:BGP

AS100 AS200

Page 14: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 14

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.

Page 15: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 15

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.

Page 16: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 16

Routing Table

[Quidway] display ip routing-table

Routing Tables:

Destination/Mask proto pref Metric Nexthop Interface

0.0.0.0/0 Static 60 0 120.0.0.2 Serial0/0

8.0.0.0/8 RIP 100 3 120.0.0.2 Serial0/1

9.0.0.0/8 OSPF 10 50 20.0.0.2 Ethernet0/0

9.1.0.0/16 RIP 100 4 120.0.0.2 Serial0/0

11.0.0.0/8 Static 60 0 120.0.0.2 Serial0/1

20.0.0.0/8 Direct 0 0 20.0.0.1 Ethernet0/2

20.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0

Page 17: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 17

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

Routing table

10.0.0.0 R0

10.0.0.0 R1

10.0.0.0 R1

Page 18: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 18

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

Page 19: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 19

Route Metric

2

5 2

6

3

1

A

B D

F

C

E

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.

Page 20: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 20

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

A→C→D, total metric 10+8=18

5

8

5

10

A

B

C D

Page 21: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 21

Equal Cost Multi-Path

[RTB] display ip routing-table

Routing Tables: Public

Destinations : 13 Routes : 15

Destination/Mask Proto Pre Cost NextHop Interface

3.3.3.0/24 Direct 0 0 3.3.3.2 Serial2

3.3.3.1/32 Direct 0 0 3.3.3.1 Serial2

3.3.3.2/32 Direct 0 0 127.0.0.1 InLoopBack0

10.1.1.1/32 Static 60 0 1.1.1.1 Serial0

Static 60 0 2.2.2.1 Serial1

Static 60 0 3.3.3.1 Serial2

20.1.1.1/32 Direct 0 0 127.0.0.1 InLoopBack0

127.0.0.0/8 Direct 0 0 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 127.0.0.1 InLoopBack0

Equal Cost Multi-Path

realizes load-balance

Page 22: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 22

The Longest Match

match

Destination makes

logical AND operation

with mask

Compare the destination

address in the routing table

Lookup routing table

Select the longest

matched route

Page 23: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 23

The Example of Longest Match

[Quidway] display ip routing-table

Routing Tables:

Destination/Mask proto pref Metric Nexthop Interface

0.0.0.0/0 Static 60 0 120.0.0.2 Serial0/0

8.0.0.0/8 RIP 100 3 120.0.0.2 Serial0/1

9.0.0.0/8 OSPF 10 50 20.0.0.2 Ethernet0/0

9.1.0.0/16 RIP 100 4 120.0.0.2 Serial0/0

11.0.0.0/8 Static 60 0 120.0.0.2 Serial0/1

20.0.0.0/8 Direct 0 0 20.0.0.1 Ethernet0/2

20.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0

The data packet of destination 9.1.2.1 will match the route 9.1.0.0/16

Page 24: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 24

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.

Packet towards

network N

TTL-2

TTL-1

Network N RTA

RTB

RTC RTD

TTL-2

Page 25: 2) Routing Protocol Basis.pdf

HUAWEI TECHNOLOGIES CO., LTD.. All rights reserved Page 25

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?

Page 26: 2) Routing Protocol Basis.pdf

Thank You

www.huawei.com

T