basic routing principles v1.2. objectives understand the function of router know the basic...

41
Basic Routing Principles V1.2

Upload: lorin-anderson

Post on 14-Jan-2016

267 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Basic Routing Principles

V1.2

Page 2: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Objectives

Understand the function of router Know the basic conception in routing Know the working principle of router Understand IP routing process

Page 3: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Course Outline

Router Definition and Function Basic Conception Working Principle of Router IP Routing Process

Page 4: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Router definition(1)

Router——A kind of computer device used to interconnect network

Router must have the following features: Multiple three layer interfaces to interconnect different

networks Implement the protocol up to the network layer Have the function of storing、 forwarding、 path-findi

ng

Page 5: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Router functions(2)

The core function of router is interconnecting networks and data forwarding. routing: building route table and refreshing switching: forwarding packet between networks. Insulate broadcast packets, define access rule. Connecting different kinds of networks. Rate adapting between networks.

Page 6: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Course Outline

Router Definition and Function Basic Conception Working Principle of Router IP Routing Process

Page 7: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Basic concepts

Routed protocol Routing protocol

Connected route Static route Dynamic route Default route

Page 8: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

NetworkProtocol

DestinationNetwork

ConnectedRIP

OSPF

10.120.2.0172.16.2.0172.17.3.0

Exit Interface

fei_0/1e1_1e1_2

Routed protocol: IPRouting protocol: RIP, OSPF

172.17.3.0

172.16.2.010.120.2.0

E0S0

Routing protocol and routed protocol

Page 9: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Route table

The information that router need to forward data is stored in a table, called ’route table’

Router check the destination address of the packet,and choose the next hop based on the information in route table.

Route table is stored in RAM

Page 10: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Route table composition

Route table composition: Destination address Mask Next hop address (Gateway) Forwarding physical interface Source of the information(Owner) Route priority metric

Page 11: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Route table composition

Example

172.16.8.0 -- Destination network address255.255.255.0 -- Destination network mask1.1.1.1 -- Next hop address fei_0/1.1 -- Route learning interface and forwarding interfacestatic -- how does router learns this entry1 -- route priority0 -- Metric

Dest Mask Gw Interface Owner pri metric

172.16.8.0 255.255.255.0 1.1.1.1 fei_0/1.1 static 1 0

Page 12: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Route table establishing and refreshing

How is route established at the beginning? How to maintain the route table after it is

established?

Page 13: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Route Types

Default route

Static route Dynamic route

Directly connected route

Page 14: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

192.168.0.1/30

192.168.0.2/30

10.0.0.1/24

172.16.0.1/24

IPv4 Routing Table: Dest Mask Gw Interface Owner pri metric

10.0.0.0 255.255.255.0 10.0.0.1 fei_0/1 direct 0 010.0.0.1 255.255.255.255 10.0.0.1 fei_0/1 address 0 0192.168.0.0 255.255.255.252 192.168.0.1 fei_1/1 direct 0 0192.168.0.1 255.255.255.255 192.168.0.1 fei_1/1 address 0 0ZXR10#

Directly connected route

Directly connected route When network address is configured and the status of the interfa

ce is valid, the network configured on this network will appear in the route table and associated with this interface, the route will change with the status of the interface.

BA

Page 15: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Static route configuration

This is a unidirectional route, there should be an opposite route configured on the counterpart router.

ip route 10.0.0.0 255.0.0.0 172.16.2.2

Stub Network

172.16.2.1

SO

172.16.1.0

B172.16.2.2Network

10.0.0.0B A

Page 16: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Example

Default route configuration

Default route is configured on the egress router in a stub network.

Stub Network

ip route 0.0.0.0 0.0.0.0 172.16.2.2

172.16.2.1

SO

172.16.1.0

172.16.2.2Network A B

Page 17: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

RIPOSPF RIPOSPF

1.0.0.0/8 2.0.0.0/8 3.0.0.0/8

Dynamic route

Routing protocol is a software process running on the router. It will exchange routing information with other routers, studying route information of network not directly connected and adjusting the route information when topology changes.

Page 18: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

RIP OSPF

Route table

10.0.0.0/16 fei_1/1

Notice : the comparison of route priority must be between identical routes.

10.0.0.0/16 fei_1/3

10.0.0.0/16 fei_1/3

Route priority

Select the route that has the highest priority to the route table.

Page 19: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Connected interface 0Static route 1External BGP 20OSPF 110IS-IS 115RIP v1, v2 120Internal BGP 200Special (For inner process) 255

Connected interface 0Static route 1External BGP 20OSPF 110IS-IS 115RIP v1, v2 120Internal BGP 200Special (For inner process) 255

Route SourceRoute SourceRoute SourceRoute Source Default priorityDefault priorityDefault priorityDefault priority

Default route priority

Page 20: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Network

DDN

PSTN

fei_1/1 e1_2/1.1

serial_3/1

Float static route

How to configure static route when there are redundant links?

Page 21: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

ZXR10(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1 tag150ZXR10(config)#ip route 10.0.0.0 255.0.0.0 30.0.0.1 tag155

Network

DDN

PSTN

fei_1/1 e1_2/1.1

serial_3/1

Float static route

Page 22: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Longest match principle

10.1.1.1?

ZXR10#show ip routeIPv4 Routing Table: Dest Mask Gw Interface Owner pri metric

1.0.0.0 255.0.0.0 1.1.1.1 fei_1/1.1 direct 0 01.1.1.1 255.255.255.255 1.1.1.1 fei_1/1.1 address 0 02.0.0.0 255.0.0.0 2.1.1.1 fei_1/1.2 direct 0 02.1.1.1 255.255.255.255 2.1.1.1 fei_1/1.2 address 0 03.0.0.0 255.0.0.0 3.1.1.1 fei_1/1.3 direct 0 03.1.1.1 255.255.255.255 3.1.1.1 fei_1/1.3 address 0 010.0.0.0 255.0.0.0 1.1.1.1 fei_1/1.1 ospf 110 1010.1.0.0 255.255.0.0 2.1.1.1 fei_1/1.2 static 1 010.1.1.0 255.255.255.0 3.1.1.1 fei_1/1.3 rip 120 50.0.0.0 0.0.0.0 1.1.1.1 fei_1/1.1 static 0 0

Page 23: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Course Outline

Router Definition and Function Basic Conception Working Principle of Router IP Routing Process

Page 24: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Router working principle

Routing function: Study and maintain the network topology,produce and

maintain route table

Forwarding function: Data transferring and processing procedure(Receiving

data on one interface,then choose an appropriate interface to send it out, including the work of frame encapsulation and decapsulation)

Page 25: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Route function

Study and maintain the network topology mechanism is regarded as the function of routing.It requires several basic information: What kind of protocols to route? Is the destination network address in the route table? Which interface to send out the packet? What is the next hop address?

Page 26: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

=Frame checking and cache the packet

Coming interface

Associate destination address with the next hop interface

Route table

Create the frame head with the physical address

ARP cache( LAN)

Packet encapsulation and forwarding

Out interface

Maintained by routing protocol

Maintained by ARP or RARP process

Mapping list(WAN)

Forwarding Function

Page 27: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Routing processRouting processRouting processRouting

processRoute table

Forwardingprocess

Search entry in route tableBased on destination address

Longest matchprinciples

Add route based on route priority

Routing protocol study possible route,select the best

route based on metric

Route working process summary

Page 28: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Course Outline

Router Definition and Function Basic Conception Working Principle of Router IP Routing Process

Page 29: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Communication in the same network

Network A

┉┉┉

To router1

Communication requirement

Hub/switch

Page 30: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Communication process

HubIP address: 192.168.1.2MAC address: 00:20:AF:00:00:02

IP address: 192.168.1.1MAC address: 00:20:AF:00:00:01

Ethernet

IP layer

No need to consider higher layer protocols

Encapsulate IP address in packet

and send to 192.168.1.2

Ethernet

IP layer

Encapsulate MAC address in frame

and send to MAC address00:20:AF:00:00:02

Decapsulate MAC frame

Receiving MAC frame

ARP

decapsulateIP packet

Receiving IP packet

A B

Network

Protocol layer

Page 31: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Communication between different network

Network BNetwork A

Router

Communication requirements

Ethernet

Router

Ethernet

DDN

PPP

Page 32: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Communication between different network

EthernetEthernetinterface

Ethernet

IP layer

MAC frame

IP layer

Serial interface

Ethernetinterface

IP layer

Network

Protocol

PPP packet

IP packetIP packet

Send host A

Receiving host B

router

Ethernet PPP

HOST A HOST B

fei-1/1 e1_2/1.1

Ethernet

fei-1/1e1_2/1.1

IP layer

router

PPP frame

IP packet

Serial interface

MAC frame

IP packet IP packet IP packet

No need to consider higher layer protocols

No need to consider higher layer protocols

Page 33: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Whether in the same networkwith peer

Is the peer MACaddress in ARP table?

Data link layerencapsulation

Send data at physical layer

Get peer MAC Address by ARP

YES

NO

YES

NO

Is gatewayconfigured?

YES Is the gateway MACaddress in ARP?

Data link layerencapsulation

Get gateway MACaddress by ARP

NO

Send error message

YES

NO

End

Get peer IP address

Communication process

Page 34: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

IP communication process

IP communication process basic conception: IP communication is hop by hop communication Source IP and destination IP address is unchanged Every time the packet passed a data link layer,there wi

ll be a new encapsulation of the packet The return path is not related to the forwarding path

Page 35: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Network protocol layer process

XY

ApplicationPresentationSessionTransportNetworkData LinkPhysical

ApplicationPresentationSessionTransportNetworkData LinkPhysical

A B C

X Y

NetworkData LinkPhysical

NetworkData LinkPhysical

NetworkData LinkPhysical

AA

BB

CC

Page 36: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Routing process example

192.168.6.0 /24

192.168.2.0 /24

e1_1/1.1

e1_1/1.1

fei_1/1

192.168.2.3

192.168.1.0 /24

192.168.3.0 /24

192.168.3.3

192.168.4.0 /24

R1

R2

R3

R1 route table192.168.4.0 255.255.255.0 192.168.4.1 e1_1/1.1 direct 0 0 192.168.2.0 255.255.255.0 192.168.2.1 fei_1/1 direct 0 0192.168.1.0 255.255.255.0 192.168.4.2 e1_1/1.1 rip 120 1192.168.6.0 255.255.255.0 192.168.4.2 e1_1/1.1 rip 120 1 192.168.3.0 255.255.255.0 192.168.4.2 e1_1/1.1 rip 120 2

e1_2/1.1

e1_1/1.1

fei_1/1

fei_1/1

Destination address:192.168.3.3

A B

Page 37: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

1.Destination address:192.168.3.3

192.168.6.0 /24

192.168.2.0 /24

192.168.2.3

192.168.1.0 /24

192.168.3.0 /24

192.168.3.3

192.168.4.0 /24

R1

R2

R3

R2 route table192.168.4.0 255.255.255.0 192.168.4.2 e1_1/1.1 direct 0 0 192.168.6.0 255.255.255.0 192.168.6.1 e1_2/1.1 direct 0 0192.168.1.0 255.255.255.0 192.168.1.1 fei_1/1 direct 0 0192.168.2.0 255.255.255.0 192.168.4.1 e1_1/1.1 rip 120 1192.168.3.0 255.255.255.0 192.168.6.2 e1_1/1.1 rip 120 1

e1_1/1.1

e1_1/1.1

fei_1/1

e1_2/1.1

e1_1/1.1

fei_1/1

fei_1/1

Destination Address:192.168.3.3

Routing process example

Page 38: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Routing process example

192.168.6.0 /24

192.168.2.0 /24

192.168.2.3

192.168.1.0 /24

192.168.3.0 /24

192.168.3.3

192.168.4.0 /24

R1

R2

R3

R3 route table192.168.3.0 255.255.255.0 192.168.3.1 fei_1/1 direct 0 0 192.168.6.0 255.255.255.0 192.168.6.2 e1_1/1.1 direct 0 0192.168.1.0 255.255.255.0 192.168.6.1 e1_1/1.1 rip 120 1192.168.4.0 255.255.255.0 192.168.6.1 e1_1/1.1 rip 120 1192.168.2.0 255.255.255.0 192.168.6.1 e1_1/1.1 rip 120 2

Return path ?

e1_1/1.1

e1_1/1.1

fei_1/1

e1_2/1.1

e1_1/1.1

fei_1/1

fei_1/1

Destination address:192.168.3.3

Page 39: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Review

Definition of router Router functions Basic conceptions in routing IP routing process within the same subnet IP routing process between different subnet

Page 40: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router

Questions

What’s the two main functions of router? How is the route table established? What is the standard when a router is selecting t

he route to route table? When forwarding IP packet, If there are many ma

tches, what will router do? Describe the encapsulation and decapsulation d

uring the process of IP routing .

Page 41: Basic Routing Principles V1.2. Objectives Understand the function of router Know the basic conception in routing Know the working principle of router