34
ROUTING BASICS ROUTING BASICS

ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Embed Size (px)

Citation preview

Page 1: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

ROUTING BASICSROUTING BASICS

Page 2: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Why are Routers Necessary?Why are Routers Necessary? One of the key One of the key

components of components of the technical the technical infrastructure of infrastructure of the networkthe network

Connect networksConnect networks Provide the best Provide the best

path from the path from the source to source to destinationdestination

A

R1

B

R2

R3

C

R4 R5

Page 3: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Sending Packets through Sending Packets through the Networkthe Network

Using redirectsUsing redirects

Sending packets on the same subnet

Default router Discovering the local routerA

R1

B

R2

Internet

Page 4: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

The Internal Elements of a The Internal Elements of a RouterRouter

1

4

3

2

Interfaces

Routing Engine

Routing table

Destination Next hop Interface . . . . . . 1 . . . . . . 2

Page 5: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Schematic View of a Schematic View of a RouterRouter

Incoming packets

Processing

Outgoing packets

Page 6: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

The Routing TableThe Routing Table

The crucial element of the routerThe crucial element of the router– defines the topology of the networkdefines the topology of the network– must be consistent with other router’s must be consistent with other router’s

tablestables

Static and dynamic routing tablesStatic and dynamic routing tables– static - when constructed by network static - when constructed by network

administratoradministrator– dynamic - when constructed by routing dynamic - when constructed by routing

protocols protocols

Page 7: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Static RoutesStatic Routes

AdvantagesAdvantages– predictabilitypredictability– no overheadno overhead– simplicitysimplicity

DisadvantagesDisadvantages– lack of scalabilitylack of scalability– can not adapt to a failure in a networkcan not adapt to a failure in a network

Page 8: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Example:Example:

R1

R2

172.16.5.0/24

172.16.5.1 172.16.3.1

172.16.3.0/24

172.16.2.1

172.16.1.1

172.16.2.0/24

172.16.4.0/24

172.16.1.0/24

R3172.16.3.2

172.16.4.1

hostname Router1

interface e0IP 172.16.1.1 255.255.255.0

interface e1IP 172.16.2.1 255.255.255.0

IP route 172.16.3.0 255.25.255.0 172.16.1.2IP route 172.16.5.0 255.25.255.0 172.16.1.2IP route 172.16.4.0 255.25.255.0 172.16.1.2

172.16.1.2

Page 9: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Dynamic RoutesDynamic Routes

Advantages– adapt to a failure in a network– work in large networks

Disadvantages– increase in complexity– overhead on the lines and routers

Page 10: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Hybrid Routing SchemesHybrid Routing Schemes Some parts use Some parts use

static and some static and some parts dynamic parts dynamic routingrouting– static routing on static routing on

the access networkthe access network– dynamic routing on dynamic routing on

the core and the core and distribution distribution networknetwork

R1 R2 R3

R6R5R4

Core

Distribution

Access

Page 11: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Classification of the Classification of the Routing ProtocolsRouting Protocols

Where the protocol is usedWhere the protocol is used– Interior protocols (IGP)Interior protocols (IGP)– Exterior protocols (EGP)Exterior protocols (EGP)

Kind of information that is carried Kind of information that is carried and the way the routing table are and the way the routing table are calculatedcalculated– Distance-vector protocolsDistance-vector protocols– Link-state protocolsLink-state protocols

Page 12: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

IGP Vs EGPIGP Vs EGP Interior Gateway ProtocolsInterior Gateway Protocols

– within a single autonomous systemwithin a single autonomous system single network administration single network administration unique routing policyunique routing policy make best use of network resourcesmake best use of network resources

Exterior Gateway ProtocolsExterior Gateway Protocols– among different autonomous systemsamong different autonomous systems

independent administrative entitiesindependent administrative entities communication between independent communication between independent

network infrastructuresnetwork infrastructures

Page 13: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Distance-Vector Vs Link-Distance-Vector Vs Link-StateState

Distance-vector Distance-vector protocolsprotocols– Each router Each router

periodically sends to periodically sends to his neighborshis neighbors

how far is the how far is the destinationdestination

the next hop to get the next hop to get therethere

– Install routes directly Install routes directly in tablesin tables

Link-state protocols– Each router sends

information about links to which it is

attached state of these links

– it is flooded throughout the network

– every router calculates its routing table

Page 14: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

The Role of IGPsThe Role of IGPs Maintain a coherent picture of the Maintain a coherent picture of the

network topology and address domain network topology and address domain in the routerin the router

Distribute this information to the other Distribute this information to the other routersrouters

Maintain consistent routing tables, Maintain consistent routing tables, such that the path to every such that the path to every destination is “optimal”destination is “optimal”

Converge quickly when there are Converge quickly when there are changes in the networkchanges in the network

Page 15: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Example: Choosing an Example: Choosing an Optimal PathOptimal Path

R5

5

A

R1

R2

R4

R3

R6

R7

R8

B

5

4010

2010

4 10

10

55

6

15

Page 16: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

The Link MetricThe Link Metric

Possible metricsPossible metrics– hop counthop count– inverse of the link bandwidthinverse of the link bandwidth– delaydelay– dynamically calculated dynamically calculated – administratively assignedadministratively assigned– combination combination

Traffic should be monitored and Traffic should be monitored and metrics adjustedmetrics adjusted

Page 17: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Example for Bad MetricsExample for Bad Metrics

2048K

1024K BA1024K

256K

2048K

768K 768K 768K 768K 768K

102

1

2

1

3 3 3 3 3

Bandw. 768KMetric 17

Bandw. 256KMetric 14

Page 18: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP - Routing Information RIP - Routing Information ProtocolProtocol

IGP, distance-vector protocolIGP, distance-vector protocol First used in XNS (Xerox Network First used in XNS (Xerox Network

Systems)Systems) Designed as a component of the Designed as a component of the

networking code for the BSD release of networking code for the BSD release of UNIXUNIX

incorporated in program “routed” (rote incorporated in program “routed” (rote management daemon)management daemon)

First documented in rfc 1058 First documented in rfc 1058

Page 19: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP - CharacteristicsRIP - Characteristics Packets are sent every 30 seconds Packets are sent every 30 seconds

or faster when necessaryor faster when necessary Route is considered down if not Route is considered down if not

refreshed within 180 sec. (distance refreshed within 180 sec. (distance set to infinity)set to infinity)

Two kinds of messages Two kinds of messages requestrequest responseresponse

Page 20: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP - CharacteristicsRIP - Characteristics

The metric is a hop-countThe metric is a hop-count The value of 1 to 15 is used (16 denotes The value of 1 to 15 is used (16 denotes

infinity)infinity)

Bellman-Ford algorithm is used to find Bellman-Ford algorithm is used to find the shortest pathsthe shortest paths

Doesn't support classless routingDoesn't support classless routing Used only in IP networks Used only in IP networks

at first the intention was to be used in variety at first the intention was to be used in variety of networksof networks

Page 21: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Example:Example:

E

C

Dest. Link Hop B local 0 A 1 1 C 4 1

E 3 1 B

Dest. Link Hop C local 0 B 4 1 D 5 1

F 6 1

A

Dest. Link Hop A local 0 B 1 1

E 2 1 Dest. Link Hop D local 0 C 5 1

G 7 1 D

1

2 3

45

6

7

8 Dest. Link Hop G local 0 D 7 1

F 8 1

Dest. Link Hop E local 0 A 2 1

B 3 1

EDest. Link Hop F local 0 C 6 1

G 8 1

F

G

Page 22: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Routing Routing table for table for node Anode A

A

CB

D2 3

45

6

7

8E

F

1

Dest. Link Hop A local 0 B 1 1 C 1 2 D 1 3 E 2 1 F 1 3

G 1 4

G

Dest. Link Hop A local 0 B 1 1 C 1 2 E 2 1

After two iterations

After four iterations

Dest. Link Hop A local 0 B 1 1 C 1 2 D 1 3 E 2 1 F 1 3

After three iterations

Page 23: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

In Case of a In Case of a Link FailureLink FailureRouting table of node A

Dest. Link Hop A local 0 B - - C - - D - - E 2 1 F - -

G - -

after the failure of link 1

GDest. Link Hop E local 0 A 2 1 B 3 1 C 3 2 D 3 3 F 3 3

G 3 4

CB

D2

3

45

6

7

8E

F

1A

Dest. Link Hop A local 0 B 2 2 C 2 3 D 2 4 E 2 1 F 2 4

G 2 5

before the failure of link 3

Page 24: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Split-Horizon and Poison Reverse

Split-horizonSplit-horizon– the information about destination routed on the information about destination routed on

the link is omittedthe link is omitted Poison reversePoison reverse

– the corresponding distance is set to infinity the corresponding distance is set to infinity if the destination is routed on the linkif the destination is routed on the link

Page 25: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Triggered UpdatesTriggered Updates

A timer is associated with each entry in A timer is associated with each entry in the routing tablethe routing table– much longer than the period of transmission much longer than the period of transmission

of informationof information Triggered updates Triggered updates

– request nodes to send messages as soon as request nodes to send messages as soon as they notice a change in the routing tablethey notice a change in the routing table

Page 26: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

Advantages and Advantages and DisadvantagesDisadvantages

AdvantagesAdvantages– Simple to implementSimple to implement– Low requirement in processing and Low requirement in processing and

memory at the nodesmemory at the nodes– Suitable for small networksSuitable for small networks

DisadvantagesDisadvantages– Slow convergenceSlow convergence– Bouncing effectBouncing effect– Counting to infinity problemCounting to infinity problem

Page 27: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP - LimitationsRIP - Limitations

Maximum hop count of 15Maximum hop count of 15– restricts the use of RIP in larger networks, restricts the use of RIP in larger networks,

but prevents the count to infinity problem but prevents the count to infinity problem (endless loops)(endless loops)

Difference in links speed is not reflected Difference in links speed is not reflected in the hop-count metricsin the hop-count metrics– congested links can be still included in the congested links can be still included in the

best pathbest path

Page 28: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP II - Why Was Developed?RIP II - Why Was Developed?

Many superior IGP exists (RIP is often Many superior IGP exists (RIP is often referred as Rest In Peace)referred as Rest In Peace)

There are still many implementations of There are still many implementations of RIPRIP

Given that RIP will still be used, it Given that RIP will still be used, it deserves improvementsdeserves improvements

RIP II is documented in RFC-1287, RFC-RIP II is documented in RFC-1287, RFC-1388 and RFC-24531388 and RFC-2453

Page 29: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP II - The Added FieldsRIP II - The Added Fields Routing domainRouting domain

– used together with the next hop field to used together with the next hop field to allow multiple autonomous systems to allow multiple autonomous systems to share a single wireshare a single wire

Route tagRoute tag– to flag external routes (for use by EGP and to flag external routes (for use by EGP and

BGP)BGP) Subnet maskSubnet mask

– to support subnetsto support subnets MetricMetric

Page 30: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP II - ImprovementsRIP II - Improvements AuthenticationAuthentication

– uses a simple password procedureuses a simple password procedure Routing per subnetRouting per subnet Support of multiple metricsSupport of multiple metrics

– hop count, throughput, measured as hop count, throughput, measured as 10logC10logC

Routing domainsRouting domains MulticastingMulticasting Compatible with RIPCompatible with RIP

Page 31: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

RIP is not alone!RIP is not alone!IGRP and EIGRPIGRP and EIGRP

Interior Gateway Protocol was Interior Gateway Protocol was developed in the mid1980s by developed in the mid1980s by Cisco Systems, Inc.Cisco Systems, Inc.

Designed to overcome the Designed to overcome the limitations of RIPlimitations of RIP

Initially worked in IP Initially worked in IP environment, but latter ported to environment, but latter ported to OSI CLNP networksOSI CLNP networks

Page 32: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

IGRP - Main IGRP - Main CharacteristicsCharacteristics

Distance vector protocolDistance vector protocol Uses a combination of metricsUses a combination of metrics

– internetwork, delay, bandwidth, reliability internetwork, delay, bandwidth, reliability and loadand load

the weighting factors are set either by the weighting factors are set either by administrators or default values are administrators or default values are usedused

Page 33: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

IGRP - Additional flexibilityIGRP - Additional flexibility

Wide metric ranges Wide metric ranges – allow satisfactory metric setting in allow satisfactory metric setting in

internetworks with widely varying internetworks with widely varying performance characteristicsperformance characteristics

Permits multipath routingPermits multipath routing– dual equal-bandwidth lines may run a dual equal-bandwidth lines may run a

single stream of traffic in round-robin single stream of traffic in round-robin fashionfashion

Page 34: ROUTING BASICS. Why are Routers Necessary? One of the key components of the technical infrastructure of the network One of the key components of the technical

EIGRPEIGRP

Enhanced version of IGRPEnhanced version of IGRP ImprovementsImprovements

– convergence propertiesconvergence properties The Distributed Update Algorithm (DUAL) The Distributed Update Algorithm (DUAL)

is used to obtain loop-freedom is used to obtain loop-freedom throughout a route computationthroughout a route computation

– operational efficiencyoperational efficiency Provides compatibility with IGRP Provides compatibility with IGRP