1 IP Routing Principles MADURAI NIB
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 1/61
1
IP Routing Principles
MADURAI NIB
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 2/61
MADURAI NIB
2
Router
Router
Application Application
Data
Transport Transport
TCP
Network Network
IP
Physical Physical
Data Link Data Link
HD TR
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 3/61
MADURAI NIB
3
IP Routing..
172.16.2.1 120.1.3.9
FDDITOKEN
RING
EthernetSerial
DATADATA
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 4/61
MADURAI NIB
4
IP Routing… Data link layer provide communications
across a physical pathCertain information about data link identifiers and encapsulation must be
aquired and stored in a database such as ARP cache
Network layer provide communications
across logical or virtual pathInformation about network layer is stored inrouting table or forwarding table
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 5/61
MADURAI NIB
5
IP Routing…. When a framed packet arrives at one of a
router’s interfaces: At layer-2 (Data Link Layer)
The frame will be accepted by a router only if
Data link identifier in destination addresscontains Identification of the router’s interfaceor a broadcast identifier
FCS field is checked for error detection, if any
If FCS is bad, frame is discarded
If FCS is good, frame header and trailer are strippedoff and IP Datagram is handed over to layer-3
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 6/61
MADURAI NIB
6
IP Routing….. At Layer-3 (Network layer) the destination
IP address is examinedIf the destination IP address is:
IP address of a router’s interface or an all host
broadcast addressThe protocol field of the packet is examined and theenclosed data is sent to the appropriate internalprocess
IP address of a host on a directly connectednetwork
The packet will be delivered after encapsulation
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 7/61
MADURAI NIB
7
IP Routing…… IP address of a host on a network not directly
connected to the routerThe packet will be routed after doing a route tablelookup
Each route entry must contain two items
The address of the network the router can reach
A pointer to the destination
the pointer will indicate the address of another router
on a directly connected network or the address of another router which is one hop closer to thedestination, known as next hop router
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 8/61
MADURAI NIB
8
IP Routing……. Direct Routing
If the datagram is routed locally i.e. if thedestination is on the same subnet as theoriginator.
Indirect RoutingIf the use of a forwarding device such as routeris invoked i.e. if the destination is remote
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 9/61
MADURAI NIB
9
IP Routing……..
E0 E1
172.16.2.1
172.16.2.2
172.16.2.160
172.16.3.5
172.16.3.100
172.16.3.150
172.16.2.3
172.16.3.1
Direct Routing Indirect Routing
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 10/61
MADURAI NIB
10
IP Routing
08.00.39.00.2F.C4 08.00.39.00.2F.C1 172.16.2.1 172.16.3.4 DATA CRC
08.00.39.00.2F.C8 08.00.39.00.2F.C5 172.16.2.1 172.16.3.4 DATA CRC
E0 E1
172.16.2.1
172.16.2.2
172.16.2.3
172.16.3.2
172.16.3.3
172.16.3.4
172.16.2.4
172.16.3.1
08.00.39.00.2F.C1
08.00.39.00.2F.C2
08.00.39.00.2F.C3
08.00.39.00.2F.C4
08.00.39.00.2F.C5
08.00.39.00.2F.C6
08.00.39.00.2F.C7
08.00.39.00.2F.C8
Routing Table
172.16.2.0/24 172.16.2.4172.16.3.0/24 172.16.3.1
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 11/61
MADURAI NIB
11
Route Table UpdationRoute table aquires information in two ways:
ManuallyStatic route entries
Automatically
Dynamic routing protocols
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 12/61
MADURAI NIB
12
Static RoutingRoutes to destinations are set up manually
Network reachability is not dependent onthe existence and state of the network
Route may be up or down but static routes
will remain in the routing tables and trafficwould still be sent towards the route
Not suitable for large networks
Also known as Non-adaptive routing
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 13/61
MADURAI NIB
13
Dynamic RoutingRoutes are learnt via an internal or external
routing protocolsRouting Protocol is a language a routerspeaks with other routers to shareinformation about the reachability and status
of the network Routing Protocol messages do not carry enduser traffic from network to network
Routing Protocol uses the routed protocol topass information between routers
RIP & OSPF are routing protocols
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 14/61
MADURAI NIB
14
Dynamic RoutingRouting decisions change to reflect the
changes in topologyNetwork reachability is dependent on theexistence and state of the network
If a router is down, its entry will be deletedfrom the routing table and traffic to that willnot be forwarded
Also known as Adaptive routing
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 15/61
MADURAI NIB
15
Routed ProtocolContains sufficient network layer addressing
information for user traffic to be directedfrom one network to another network
Define the format and use of the fields
within a packetPackets that use a routed protocol areconveyed from one end system to another
end system through an inter network Internet Protocol is a routed protocol
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 16/61
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 17/61
MADURAI NIB
17
Default Route..When a router receives a packet and its
table does not contain the network addressindicated in the packet, it is forwarded todefault router
The default router, too, may have a defaultrouterEasiest form of routing for a domainconnected to a single exit point
Default router is indicated as 0.0.0.0 with nosubnet mask
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 18/61
MADURAI NIB
18
Default Route… If there is no route or default route at any
stage, the router will send a controlmessage (through ICMP) to the originatingstation
Refers to “last resort” outlet
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 19/61
MADURAI NIB
19
Static and Default Routes
Traffic to network 192.168.5.0 (Static Route).
All outgoing traffic from network 192.168.5.0(Default Route).
R2R1
WAN
192.168.5.0
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 20/61
MADURAI NIB
20
Dynamic Routing Protocols All dynamic routing protocols are built
around an algorithm, which must specify: A procedure for passing network reachabilityinformation about networks to other routers
A procedure for receiving reachabilityinformation from other routers
A procedure for determining optimal routesbased on the reachability information it has and
for recording this information in a route table A procedure for reacting to and advertisingtopology changes in an network
C
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 21/61
MADURAI NIB
21
Convergence
10.1.2.010.1.1.0 10.1.3.0 10.1.4.0
.2.1 .2.1 .1.2
A B C
10.1.4.0 10.1.2.2 2 10.1.1.0 10.1.3.1 2
10.1.3.0 10.1.2.2 1 10.1.1.0 10.1.2.1 1
10.1.4.0 10.1.3.2 1
10.1.2.0 10.1.3.1 1
NW VIA HOP10.1.1.0 ---------- 0
10.1.2.0 ---------- 0
NW VIA HOP10.1.2.0 ---------- 0
10.1.3.0 ---------- 0
NW VIA HOP10.1.3.0 ---------- 0
10.1.4.0 ---------- 0
Routing Table-A Routing Table-B Routing Table-C
• All the routing tables contains information about all.
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 22/61
MADURAI NIB
22
ConvergenceThe process of bringing all route tables to a
state of consistency is called convergence.The time it takes to share information acrossan internetwork and for all routers to
calculate best paths is convergence time.
P th D t i ti
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 23/61
MADURAI NIB23
Path Determination
A B
C
192.168.1.0 192.168.7.0
192.168.6.0
192.168.5.0
192.168.2.0
192.168.3.0
192.168.4.0
Routing Table of Router-A
Network Next Hop Router192.168.1.0 Direct192.168.2.0 Direct192.168.3.0 Direct
192.168.4.0 B,C192.168.5.0 B,C192.168.6.0 B,C192.168.7.0 B,C
•Networks192.168.4.0 to 192.168.7.0 can be reached viaeither router B or C, which path is preferable?•Metrics are needed to rank the alternatives.
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 24/61
MADURAI NIB24
Metrics A metric is a variable assigned to routes as a
means of ranking them.Different routing protocols use different, andsometimes multiple metrics.
RIP defines the “best” route as one withminimum number of hops.
IGRP defines the “best” route on a combinationof lowest bandwidth along the route and the
total delay of the route.
M i
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 25/61
MADURAI NIB25
Metrics
Hop Count
Bandwidth
Load
Delay
Reliability
M t i
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 26/61
MADURAI NIB26
Metrics
Hop Count
A hop count metric simply count router hops.
From router-A it is 1 hop to network 192.168.5.0 if packets are sent out interface
192.168.3.0 and 2 hops if sent out 192.168.1.0
A B
C
192.168.1.0 192.168.7.0
192.168.6.0
192.168.5.0
192.168.2.0
192.168.3.0
192.168.4.0
M t i
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 27/61
MADURAI NIB27
Metrics
Bandwidth
A bandwidth metric would choose a higherbandwidth over a lower bandwidth.
A packet from router A to C will follow path A-B-C.
A B
C
192.168.1.0192.168.7.0
192.168.6.0
192.168.5.0
192.168.2.0
192.168.3.0
192.168.4.0
A-C: 64kbps A-B: 2mbpsB-C: 2mbps
M t i
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 28/61
MADURAI NIB28
Metrics
Speed Cost
>= 100Mbps 1
Ethernet/802.3 10
E1(2.048Mbps) 48
64Kbps 1562
Metric=108 /Interface Speed in bits per sec.e.g. 100000000/2048000=48.828125
M t i
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 29/61
MADURAI NIB29
MetricsLoad
The metric reflects the amount of trafficutilising the links along the path.
The best path is the one with the lowest load.
Unlike hop count and bandwidth, the load ona route changes and therefore the metric willchange and is called route flapping.
Route flaps have adverse effects on router’s
CPU and the overall stability of the network.
M t i
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 30/61
MADURAI NIB30
MetricsDelay
Delay is the measure of time a packet takesto traverse a route
A protocol using delay as a metric wouldchoose the path with the least delay as the
best pathReliability
Reliability measures the likelihood that thelink will fail in some way
The path with highest reliability would beselected as the best
M t i
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 31/61
MADURAI NIB31
MetricsCost
The term cost is often used as a generic termwhen speaking of router choices
RIP chooses the lowest-cost path based on the hopcount.
Another generic term is ShortestRIP chooses the shortest path based on the hopcount.
D i R ti P t l
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 32/61
MADURAI NIB32
Dynamic Routing ProtocolsDistance Vector Routing Protocols
Distance vector algorithms are based on thework done of R.E.Bellman, L.R.Ford andD.R.Fulkerson
Often known as Bellman-ford or Ford-fulkerson
algorithms
Link State Advertisement Protocols
Built around a well known algorithm from graph
theory, E.W.Dijkstra’s shortest path algorithmCalled as Shortest path first or Distributivedatabase protocols
Di t V t R ti P t l
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 33/61
MADURAI NIB33
Distance Vector Routing Protocols
Di t V t R ti P t l
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 34/61
MADURAI NIB34
Distance Vector Routing ProtocolsRoutes are advertised as vectors of
<Distance, Direction>Distance is defined in terms of a metric
Direction is defined in terms of next hop router
Each router learns routes from itsneighboring router’s perspective and thenadvertises the routes from its ownperspective
Sometimes referred to as “Routing ByRumor”
Di t V t R ti P t l
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 35/61
MADURAI NIB35
Distance Vector Routing ProtocolsRouting Information Protocol (RIP) for IP.
Xerox Networking System’s XNS RIP.Novell’s IPX RIP.
Cisco’s Internet Gateway Routing Protocol
(IGRP).
DEC’s DNA Phase IV.
Apple Talk’s Routing Maintenance Protocol
(RTMP).
Ro ting Loops
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 36/61
Routing Loops
Routing loops are
A condition in
which a packetis continuouslytransmitted within a series of
routers withoutever reaching itsdestination.
Routing Loops
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 37/61
Routing Loops
Routing loops may be caused by:Incorrectly configured static routes
Incorrectly configured route redistribution
Slow convergence
Incorrectly configured discard routes
Routing loops can create the followingissues:
Excess use of bandwidthCPU resources may be strained
Network convergence is degraded
Routing updates may be lost or not
processed in a timely manner
Routing Loops
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 38/61
Routing LoopsCount to Infinity
This is a routing loop whereby packetsbounce infinitely around a network
Routing Loops
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 39/61
Routing Loops
Setting a maximum
Distance Vector routing protocols seta specified metric value to indicate infinity
Once a router “counts to infinity” it marks theroute as unreachable
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 40/61
Routing LoopsPreventing loops with holddown timers
Holddown timers allow a router to notaccept any changes to a route for aspecified period of time
Point of using holddown timers• Allows routing updates to propagate throughnetwork with the most current information
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 41/61
Routing LoopsThe Split Horizon Rule is used toprevent routing loops
Split Horizon rule:
A router should not advertise a network through the interface from which the updatecame
Routing Loops
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 42/61
Routing Loops
Split horizon
with poisonreverse
The rule states
that once a routerlearns of anunreachable routethrough an
interface, advertiseit as unreachableback through thesame interface
Summary
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 43/61
SummaryD.V. routing protocols maintains routing tables by
RIP sending out periodic updates
RIP using 4 different timers to ensure informationis accurate and convergence is achieved in a timelymanner
EIGRP sending out triggered updatesD.V. routing protocols may be prone to routing loops
routing loops are a condition in which packetscontinuously traverse a network
Mechanisms used to minimize routing loops includedefining maximum hop count, holddown timers, splithorizon, route poisoning and triggered updates
Summary
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 44/61
Summary
Routing Information Protocol (RIP) A distance vector protocol that has 2versions
RIPv1 - a classful routing protocolRIPv2 - a classless routing protocol
Enhanced Interior Gateway RoutingProtocol (EIGRP)
A distance vector routing protocols that hassome features of link state routing protocols
A Cisco proprietary routing protocol
Link state Routing Protocols
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 45/61
MADURAI NIB45
Link state Routing ProtocolsEach router originates information about
itself, its directly connected links and stateof those links
The information is passed around from
router to router, each router making a copyof it, but never changing it
Every router has identical information about
the internetwork Each router will independently calculate itsown best paths
Link state Routing Protocols
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 46/61
MADURAI NIB 46
Link state Routing Protocols
Link State Routing protocols are built around
well known algorithm from graph theoryE.W.Dijkstra shortest path algorithm.
Examples of LSR are:
Open Shortest Path First (OSPF)
The ISO’s Intermediate System to IntermediateSystem (IS-IS) for IP
DEC’s DNA Phase VNovell’s Netware Link State Protocol (NLSP)
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 47/61
Link-State Routing Protocols
Routingprotocol
Builds Topologica
lmap
Router canindependently determinethe shortest
path toevery
network.
Convergence
A periodic/event driven
routingupdates
Useof
LSP
Distancevector
No No Slow Generally No No
Link State Yes Yes Fast Generally Yes Yes
Advantages of a Link-State RoutingProtocol
Link State Routing Protocols
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 48/61
Link-State Routing Protocols
Requirements for using a link state routingprotocolMemory requirements
Typically link state routing protocolsuse more memoryProcessing Requirements
More CPU processing is required of link state routing protocolsBandwidth Requirements
Initial startup of link state routing
protocols can consume lots of
Link-State Routing Protocols
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 49/61
Link-State Routing Protocols2 link state routing protocols used forrouting IP
-Open Shortest Path First (OSPF)-Intermediate System-Intermediate
System (IS-IS)
Summary
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 50/61
SummaryLink State Routing protocols are also knownas Shortest Path First protocols
Summarizing the link state process
-Routers 1ST learn of directly connectednetworks
-Routers then say “hello” to neighbors-Routers then build link state packets
-Routers then flood LSPs to all neighbors
-Routers use LSP database to build anetwork topology map & calculate the bestpath to each destination
Summary
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 51/61
SummaryLink
An interface on the routerLink State
Information about an interface such as-IP address
-Subnet mask -Type of network -Cost associated with link -Neighboring routers on the link
Summary
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 52/61
SummaryLink State Packets
After initial flooding, additional LSP aresent out when a change in topologyoccurs
Examples of link state routing protocols
-Open shortest path first
-IS-IS
Autonomous System
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 53/61
MADURAI NIB53
Autonomous SystemOld definition
An autonomous system is a group of routersunder a common administrative domain runninga common routing protocol
Contemporary definition
An autonomous system is an internetwork undera common administration
Interior-Exterior Gateway Protocols
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 54/61
MADURAI NIB54
Interior Exterior Gateway Protocols
Interior Gateway Protocols
Routing Protocols which run within an Autonomous System are IGPs
IGPs discover paths between networks
Exterior Gateway ProtocolsRouting Protocols that route between
Autonomous System are EGPs
EGPs discover paths between autonomoussystems
IGPs-EGPs
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 55/61
MADURAI NIB
55
IGPs EGPs
AS-1 AS-2
AS-0
IGP
IGP IGP
BGP
BGP
BGP
Administrative Distances
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 56/61
MADURAI NIB
56
Administrative DistancesMetrics are assigned to the routes to
determine the most preferred route.RIP’s metric is hop count
IGRP uses bandwidth and delay
OSPF uses costEIGRP uses composite metric
Diversity of metrics poses problems inrouters running more than one routingprotocol.
Administrative Distances
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 57/61
MADURAI NIB
57
Administrative DistancesRouter may learn a route to the same
destination from each of the protocolsWhich route should be selected?
The answer to the problem is administrative
distance Administrative distances are the routesources to determine most preferred source
Administrative distance is a measure of believability
Administrative Distances
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 58/61
MADURAI NIB
58
Administrative DistancesThe administrative distance of various
protocols is as below:Connected Interface - 0
Static Route - 1
EIGRP summary route - 5
External BGP - 20
EIGRP - 90
IGRP - 100
Administrative Distances
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 59/61
MADURAI NIB
59
Administrative Distances
OSPF - 110
IS-IS - 115RIP - 120
EGP - 140
External EIGRP - 170Internal BGP - 200
Unknown - 255
The lower the administrative distance, themore believable the protocol.
Flow Chart of a Packet
7/28/2019 3.1 Routing Technology_revised
http://slidepdf.com/reader/full/31-routing-technologyrevised 60/61
MADURAI NIB 60
Packet Received
Received ARPReply
Send ICMP
error message
Discard original
Packet
Header &Checksum Valid
Route Found
Route table lookup
on Dest. Add.
YES
NO
Decrement TTL;
TTL>=0 YES
NO
YES
NO
If route available,
search MAC in ARP
cache
Default routeavailable
NO
YES
Send ARP
request and wait
for a response
Build new packet
with MAC address
and route throughport found in
routing table
MAC Address
Found YES
NO
Received ARP
reply, insert
MAC and IPaddress into
ARP table
YESNO
Flow Chart of a Packet