Upload
osborne-moses-shelton
View
216
Download
2
Tags:
Embed Size (px)
Citation preview
ROUTING BASICSROUTING BASICS
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
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
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
Schematic View of a Schematic View of a RouterRouter
Incoming packets
Processing
Outgoing packets
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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