routing (1)

44

Upload: musama44

Post on 22-Oct-2014

37 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Routing (1)
Page 2: Routing (1)

ROUTING The process of transferring data from one local area network to

another network.

Layer 3 devices (Network Layer)

Routed protocol Enables to forward packet from one router to another for example IP, IPX

Routing protocol sends and receives routing information packets to and from other routers for example RIP, OSPF, IGRP

Routing protocols gather and share the routing information used to maintain and update routing tables.

That routing information is in turn used to route a routed protocol to its final destination

Page 3: Routing (1)

WHAT IS ROUTING?

To route, a router needs to know: Destination addresses Sources it can learn from Possible routes Best route

172.16.1.010.120.2.0

Page 4: Routing (1)

WHAT IS ROUTING? (CONT.)WHAT IS ROUTING? (CONT.)

NetworkProtocol

DestinationNetwork

ConnectedLearned

10.120.2.0172.16.1.0

Exit Interface

E0S0 Routed Protocol: IP

Routers must learn destinations that are not directly connected

172.16.1.010.120.2.0

E0S0

Page 5: Routing (1)

ROUTE TYPES

Static routing - network administrator configures information about remote networks manually. They are used to reduce overhead and for security.

Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically.

Because of the extra administrative requirements, static routing does not have the scalability of dynamic routing.

Page 6: Routing (1)

IP ROUTING The different types of routing are:

Static routing Default routing Dynamic routing

Page 7: Routing (1)

STATIC ROUTES Benefits

No overhead on the router CPU No bandwidth usage between routers Adds security

Disadvantage Administrator must really understand the internetwork If a network is added to the internetwork, the

administrator has to add a route to it on all routers Not feasible in large networks

Page 8: Routing (1)

STATIC ROUTE CONFIGURATION

S0 S0E010.0.0.1

10.0.0.2

30.0.0.220.0.0.120.0.0.2 30.0.0.1

A

S0

E0

40.0.0.2

40.0.0.1

B

S1

R1# config tR1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2R1(config)#ip route 40.0.0.0 255.0.0.0 20.0.0.2

R2# config tR2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1R2(config)#ip route 40.0.0.0 255.0.0.0 30.0.0.2

R3# config tR3(config)#ip route 10.0.0.0 255.0.0.0 30.0.0.1R3(config)#ip route 20.0.0.0 255.0.0.0 30.0.0.1

Page 9: Routing (1)

DEFAULT ROUTES Can only use default routing on stub networks Stub networks are those with only one exit path out of the

network The only routers that are considered to be in a stub

network are R1 and R3

S0 S0E010.0.0.1

10.0.0.2

30.0.0.220.0.0.120.0.0.2 30.0.0.1

A

S0

E0

40.0.0.2

40.0.0.1

B

S1

Page 10: Routing (1)

Stub Network

ip route 0.0.0.0 0.0.0.0 172.16.2.2 or S0

DEFAULT ROUTES

172.16.2.1

SO

172.16.1.0

B172.16.2.2

ISPA B

This route allows the stub network to reach all known networks beyond router A.

10.0.0.0

Page 11: Routing (1)

DEFAULT ROUTE CONFIGURATION

R1# config tR1(config)#ip route 0.0.0.0 0.0.0.0 20.0.0.2

R3# config tR3(config)#ip route 0.0.0.0 0.0.0.0 30.0.0.1

R2# config tR2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1R2(config)#ip route 40.0.0.0 255.0.0.0 30.0.0.2

S0 S0E010.0.0.1

10.0.0.2

30.0.0.220.0.0.120.0.0.2 30.0.0.1

A

S0

E0

40.0.0.2

40.0.0.1

B

S1

Page 12: Routing (1)

WHAT IS A ROUTING PROTOCOL?WHAT IS A ROUTING PROTOCOL?

Routing protocols are used between routers to determine paths and

maintain routing tables. Once the path is determined a router can route a routed protocol.

NetworkProtocol

DestinationNetwork

ConnectedRIPIGRP

10.120.2.0172.16.2.0172.17.3.0

Exit Interface

E0S0S1

Routed Protocol: IPRouting protocol: RIP, IGRP

172.17.3.0

172.16.1.010.120.2.0

E0S0

Page 13: Routing (1)

• An autonomous system is a collection of networks under a common administrative domain.

• AS parameter is 16-bit number for 0-65535

• Internet is a Public network and IANA gives every Carrier or ISP a unique AS no.

• Every carrier or ISP has its own responsibility to manage and maintain its own network.

• PTCL and Transworld are only two AS in Pakistan

• IGPs operate within an autonomous system, RIP, IGRP, EIGRP, OSPF, IS-IS

• EGPs connect different autonomous systems, BGP

AUTONOMOUS SYSTEMS: INTERIOR OR EXTERIOR ROUTING PROTOCOLS

Page 14: Routing (1)

TYPES OR CLASSES OF ROUTING PROTOCOLS

Page 15: Routing (1)

DISTANCE VECTOR:

• Exchange routing table between routers neighbors after periodic time interval for example RIP for 30sec and IGRP for 90 sec.

• Complete Routing table exchange.

• Distance vector routing protocol only have best path information to reach destination.

• No complete information of network topology, just knows the information of best path to reach destination.

• Bandwidth is not efficiently utilized.

• This is also know as routing by rumor

• Examples are RIP, RIPV2 and IGRP.

Page 16: Routing (1)

LINK STATE:

• Exchange routing updates not complete table, whenever there is some change in network topology.

• Have complete information of network topology.

• Bandwidth efficiently utilized.

• More accurate routing decisions.

• CPU and Memory intensive.

• Examples are OSPF and IS-IS.

Page 17: Routing (1)

TYPES OR CLASSES OF ROUTING PROTOCOLS

Distance Vector RIP V1 IGRP RIP V2

Link state OSPF IS-IS

Hybrid EIGRP

Page 18: Routing (1)

CLASSFUL ROUTING OVERVIEW

Classful routing protocols do not include the subnet mask with the route advertisement.

Within the same network, consistency of the subnet masks is assumed.

Summary routes are exchanged between foreign networks.

Not Support VLSM

Examples of classful routing protocols: RIP Version 1 (RIPv1) IGRP

Page 19: Routing (1)

CLASSLESS ROUTING OVERVIEW

Classless routing protocols include the subnet mask with the route advertisement.

Classless routing protocols support variable-length subnet masking (VLSM) and subnetting

Examples of classless routing protocols: RIP Version 2 (RIPv2) EIGRP OSPF IS-IS

Page 20: Routing (1)

DISTANCE VECTOR ROUTING PROTOCOLS

Routers pass periodic copies of routing table to neighbor routers and accumulate distance vectors.

Page 21: Routing (1)

DISTANCE VECTOR

Uses Bellman Ford Algorithm It needs to find out the shortest path from one network to other There are two Distance Vector Protocol, Both uses different metric RIP – Hop count as metric IGRP – Uses composite Metric are bandwidth, Delay, Load,

Reliability and MTU

192.168.10.1

192.168.20.1

Page 22: Routing (1)

DISTANCE VECTOR

DV protocol are known as Routing by rumor RIP uses only Hop count RI routing table metric for 192.168.20.1 network will be

3 2

192.168.10.1

192.168.20.1

0

1

1

2

2

3R1

Page 23: Routing (1)

IGGRP uses bandwidth and delay as Metric RI routing table metric for 192.168.20.1 network will be

30 60

192.168.10.1

192.168.20.1

56 kbps

1 Mbps1 Mbps

1 Mbps

56 kbps

R110

10

10

30 30

DISTANCE VECTOR

Page 24: Routing (1)

SOURCES OF INFORMATION AND DISCOVERING ROUTES

Routers discover the best path to destinations from each neighbor.

Page 25: Routing (1)

INCONSISTENT ROUTING ENTRIES

Each node maintains the distance from itself to each possible destination network.

Page 26: Routing (1)

INCONSISTENT ROUTING ENTRIES (CONT.)

Slow convergence produces inconsistent routing.

Page 27: Routing (1)

• Router C concludes that the best path to network 10.4.0.0 is through router B.

INCONSISTENT ROUTING ENTRIES (CONT.)

Page 28: Routing (1)

• Router A updates its table to reflect the new but erroneous hop count.

INCONSISTENT ROUTING ENTRIES (CONT.)

Page 29: Routing (1)

• Packets for network 10.4.0.0 bounce (loop) between routers B and C.

ROUTING LOOPS

Page 30: Routing (1)

DEFINING A MAXIMUM HOP COUNT

Define a limit on the number of hops to prevent infinite loops.

One way of solving routing loop problem is to define a maximum hop count.

RIP permits a hop count of up to 15, so anything that requires 16 hops is deemed unreachable

Page 31: Routing (1)

SPLIT HORIZON

The split horizon technique attempts to eliminate routing loops and speed up convergence. The rule of split horizon is that it is never useful to send information about a route back in the direction from which the original packet came. In the example: Router C originally announced a route to network

10.4.0.0 to router B. It makes no sense for router B to announce to router C that router B has access to network 10.4.0.0 through router C.

Page 32: Routing (1)

SPLIT HORIZON

Solution to the Routing Loop problem

Split Horizon is a rule that routing information cannot be sent back in the direction from which it was received

Had split horizon been used in our example, Router B would not have included information about network 10.4.0.0 in its update to Router C.

Page 33: Routing (1)

ROUTE POISONING

Route Poisoning. Usually used in conjunction with split horizon

Route poisoning involves explicitly poisoning a routing table entry for an unreachable network

Once Router C learned that network 10.4.0.0 was unavailable it would have immediately poisoned the route to that network by setting its hop count to the routing protocol’s infinity value

In the case of RIP, that would mean a hop count of 16.

Page 34: Routing (1)

TRIGGERED UPDATES

oNew routing tables are sent to neighboring routers on a regular basis.

oRIP updates occur every 30 seconds

oHowever a triggered update is sent immediately in response to some change in the routing table.

oThe router that detects a topology change immediately sends an update message to adjacent routers that, in turn, generate triggered updates notifying their adjacent neighbors of the change.

oTriggered updates, used in conjunction with route poisoning, ensure that all routers know of failed routes.

Page 35: Routing (1)

TRIGGERED UPDATES GRAPHIC

Page 36: Routing (1)

RIP TIMERS Route update timer Sets the interval (typically 30

seconds) between periodic routing updates

Route invalid timer Determines the length of time (180 seconds) before a router determines that a route has become invalid

Holddown timer This sets the amount of time during which routing information is suppressed. This continues until either an update packet is received with a better metric or until the holddown timer expires. The default is 180 seconds

Route flush timer Sets the time between a route becoming invalid and its removal from the routing table (240 seconds).

Page 37: Routing (1)

ROUTING INFORMATION PROTOCOL (RIP)

Routing Information Protocol (RIP) is a true distance-vector routing protocol.

It sends the complete routing table out to all active interfaces every 30 seconds

RIP only uses hop count to determine the best way to a remote network

It has a maximum allowable hop count of 15 AD is 120 Bellman-ford algorithm Works well in small networks, but it’s inefficient on large

networks RIP version 1 uses only classful routing, which means that

all devices in the network must use the same subnet mask RIP version 2 does send subnet mask information with the

route updates. This is called classless routing. RIP enable routers can perform EQUAL CAST LOAD

BALANCING by default for 4 paths (max-upto 6 paths)

Page 38: Routing (1)

RIP CONFIGURATION

S0S0

E0E0

192.168.10.1

A B

S0S1

R1# config tR1(config)# )#router ripR1(config)#network 192.168.10.0R1(config)#network 192.168.20.0

R2# config tR2(config)#router ripR2(config)#network 192.168.20.0R2(config)#network 192.168.30.0192.168.10.2

192.168.20.1

192.168.20.2

192.168.30.1

192.168.30.2 192.168.40.1

192.168.40.2

R3# config tR3(config)# )#router ripR3(config)#network 192.168.30.0R3(config)#network 192.168.40.0

Page 39: Routing (1)

DISPLAYING THE IP ROUTING TABLE

Page 40: Routing (1)

DEBUG IP RIP COMMAND

Page 41: Routing (1)

RIP VERSION 2 (RIPV2)

Page 42: Routing (1)

RIP VERSION 2 CONFIGURATION

S0S0

E0E0

192.168.0.16/29

A B

S0S1

192.168.0.4/30 192.168.0.8/30

192.168.0.32/28

Find out the IP Address and SNM of each interfaces

Page 43: Routing (1)

RIP VERSION 2 CONFIGURATION

S0S0

E0E0

192.168.0.18255.255.255.248

A B

S0S1

192.168.0.17255.255.255.248

192.168.0.5255.255.255.252

192.168.0.6255.255.255.252

192.168.0.9255.255.255.252

192.168.0.10255.255.255.252

192.168.0.33255.255.255.240

192.168.0.34255.255.255.240

Page 44: Routing (1)

RIP VERSION 2 CONFIGURATION

S0S0

E0E0

192.168.0.16/29

A B

S0S1

192.168.0.4/30 192.168.0.8/30

192.168.0.32/28R2# config tR2(config)#router ripR2(config)#network 192.168.0.4R2(config)#network 192.168.0.8R2(config)#version 2

R1# config tR1(config)# )#router ripR1(config)#network 192.168.0.4R1(config)#network 192.168.0.16R1(config)#version 2

R3# config tR3(config)# )#router ripR3(config)#network 192.168.0.8R3(config)#network 192.168.0.32R3(config)#version 2