006 ipub_401_e1 basic routing principlesv1.2(41)

41
Bearer Network D&T Group IPUB_401_E1 Basic Routing Principles V1.2

Upload: kashif-khattak

Post on 08-Dec-2015

221 views

Category:

Documents


3 download

DESCRIPTION

006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

TRANSCRIPT

Page 1: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Bearer Network D&T GroupBearer Network D&T Group

IPUB_401_E1IPUB_401_E1

Basic Routing PrinciplesBasic Routing Principles

V1.2V1.2

Page 2: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Understand the function of router

Know the basic conception in routing

Know the working principle of router

Understand IP routing process

Page 3: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

2 Basic conception

3 Working principle of router

4 IP routing process

1 Router definition and function

Page 4: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Router definition(1)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-finding

Page 5: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Router functions(2)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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

1

3

4

2 Basic conception

Working principle of router

IP routing process

Router definition and function

Page 7: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Basic conceptsBasic concepts routed protocol

routing protocol

connected route

static route

dynamic route

default route

Page 8: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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 protocolRouting protocol and routed protocol

Page 9: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Route tableRoute 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Route table compositionRoute 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Route table compositionRoute table compositionExample

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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Route table establishing and refreshingRoute table establishing and refreshing

How is route established at the beginning?

How to maintain the route table after it is established?

Page 13: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Route TypesRoute Types

Default route

Static route Dynamic route

Directly connected route

Page 14: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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 routeDirectly connected route

Directly connected route When network address is configured and the status of the interface 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Static route configurationStatic 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Example

Default route configurationDefault 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

RIPOSPF RIPOSPF

1.0.0.0/8 2.0.0.0/8 3.0.0.0/8

Dynamic routeDynamic 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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

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 priorityRoute priority

Page 19: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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 priorityDefault route priority

Page 20: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Network

DDN

PSTN

fei_1/1 e1_2/1.1

serial_3/1

Float static routeFloat static route

How to configure static route when there are redundant links?

Page 21: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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 routeFloat static route

Page 22: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Longest match principleLongest 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

1

2

4

3

Basic conception

Working principle of router

IP routing process

Router definition and function

Page 24: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Router working principleRouter 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Route functionRoute 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

=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 FunctionForwarding Function

Page 27: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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 summaryRoute working process summary

Page 28: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

1

2

3

4

Basic conception

Working principle of router

IP routing process

Router definition and function

Page 29: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Communication in the same networkCommunication in the same network

Network A

┉┉┉

To router1

Communication requirement

Hub/switch

Page 30: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Communication processCommunication 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 frameand send to MAC

address00:20:AF:00:00:02

Decapsulate MAC frameReceiving M

AC frame

ARP

decapsulateIP packet

Receiving IP packet

A B

Network

Protocol layer

Page 31: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Communication between different networkCommunication between different network

Network BNetwork A

Router

Communication requirements

Ethernet

Router

Ethernet

DDN

PPP

Page 32: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

EthernetEthernetinterface

Communication between different networkCommunication between different network

Ethernet

IP layer

MAC frame

IP layer

Serial interface

Ethernetinterface

IP layer

Network

Protocol

PPP packet

IP packet

IP packet

Send host A

Receiving host B

router

EthernetPPP

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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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

NOEnd

Get peer IP address

Communication processCommunication process

Page 34: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

IP communication processIP 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 will be a new encapsulation of the packet

The return path is not related to the forwarding path

Page 35: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Network protocol layer processNetwork protocol layer process

XY

ApplicationPresentationSessionTransportNetworkData LinkPhysical

ApplicationPresentationSessionTransportNetworkData LinkPhysical

A B C

X Y

NetworkData LinkPhysical

NetworkData LinkPhysical

NetworkData LinkPhysical

AA

BB

CC

Page 36: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Routing process exampleRouting 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

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 exampleRouting process example

Page 38: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

Routing process exampleRouting 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: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

ReviewReview

Definition of router

Router functions

Basic conceptions in routing

IP routing process within the same subnet

IP routing process between different subnet

Page 40: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

QuestionsQuestions

What’s the two main functions of router?

How is the route table established?

What is the standard when a router is selecting the route to route table?

When forwarding IP packet, If there are many matches, what will router do?

Describe the encapsulation and decapsulation during the process of IP routing .

Page 41: 006 IPUB_401_E1 Basic Routing PrinciplesV1.2(41)

univ.zte.com.cnuniv.zte.com.cnuniv.zte.com.cnuniv.zte.com.cn