Vous êtes sur la page 1sur 34

IP Routing Principles

ALTTC/ DX Faculty 1
IP Routing..

172.16.2.1 120.1.3.9
Ethernet
Serial TOKEN
FDDI
RING

DATA DATA

ALTTC/ DX Faculty 2
IP Routing……..
172.16.2.2 172.16.3.2
08.00.39.00.2F.C4 08.00.39.00.2F.C5
08.00.39.00.2F.C1 08.00.39.00.2F.C6
172.16.2.1 172.16.3.1
172.16.2.3 E0 E0 172.16.3.3
08.00.39.00.2F.C2 S0 S1 08.00.39.00.2F.C7
R1 R2
172.16.2.4 172.16.3.4
08.00.39.00.2F.C3 08.00.39.00.2F.C8

08.00.39.00.2F.C4 08.00.39.00.2F.C2 172.16.2.3 172.16.3.4 DATA CRC

Routing Table-R1 Routing Table-R2


172.16.2.0/24 E0 172.16.3.0/24 E0
172.16.3.0/24 S0 172.16.2.0/24 S1

08.00.39.00.2F.C8 08.00.39.00.2F.C5 172.16.2.3 172.16.3.4 DATA CRC

ALTTC/ DX Faculty 3
IP Routing…….
Direct Routing
If the datagram is routed locally i.e. if the
destination is on the same subnet as the
originator.
Indirect Routing
If the use of a forwarding device such as router
is invoked i.e. if the destination is remote

ALTTC/ DX Faculty 4
IP Routing……..

172.16.2.2 172.16.3.2

172.16.2.1 172.16.3.1
172.16.2.3 E0 E1 172.16.3.3
S0 S0

172.16.2.4 172.16.3.4

Direct Routing Indirect Routing

ALTTC/ DX Faculty 5
Route Table Updation
Route table acquires information in two
ways:
Manually
Static route entries
Automatically
Dynamic routing protocols

ALTTC/ DX Faculty 6
Static Routing
Routes to destinations are set up manually
Network reachability is not dependent on
the existence and state of the network
Route may be up or down but static routes
will remain in the routing tables and traffic
would still be sent towards the route
Not suitable for large networks
Also known as Non-adaptive routing
Static/Default route entries

ALTTC/ DX Faculty 7
Dynamic Routing
Routes are learnt via an internal or external
routing protocols
Network reachability is dependent on the
existence and state of the network
Routing decisions change to reflect the
changes in topology
Also known as Adaptive routing
RIP & OSPF are routing protocols

ALTTC/ DX Faculty 8
Router Table Lookup
The router will match the most specific
address it can in the descending order of
specificity as below:
A host address
A subnet
A group of subnets
A major network number
A group of major network numbers
A last resort

ALTTC/ DX Faculty 9
Router Table Lookup
The path chosen will be the path shown by
the network entry with the longest mask.
Larger the mask shorter will be the host
range.
192.168.1.126/32 Unique Host 1st Choice
192.168.1.0/25 27 Hosts 2nd Choice
192.168.1.0/24 28 Hosts 3rd Choice
192.168.0.0/23 29 Hosts 4th Choice
192.168.0.0/22 210Hosts 5th Choice
192.0.0.0/8 224 Hosts 6th Choice
0.0.0.0/0 232Hosts Last Resort
ALTTC/ DX Faculty 10
Default/Last Resort Route
<IP ADDRESS>/24; NETWORKS=224 (16777216); HOSTS=28 (256)
x x x x x x x x . x x x x x x x x . x x x x x x x x . 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 0 0 0 0 0 0 0 0
X . X . X . 0
255 . 255 . 255 . 0
<IP ADDRESS>/16; NETWORKS=216 (65536); HOSTS=216 (65536)
x x x x x x x x . x x x x x x x x . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
X . X . 0 . 0
255 . 255 . 0 . 0
<IP ADDRESS>/8; NETWORKS=28 (256); HOSTS=224 (16777216)
x x x x x x x x . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
X . 0 . 0 . 0
255 . 0 . 0 . 0
ALTTC/ DX Faculty 11
Default/Last Resort Route
<IP ADDRESS>/4; NETWORKS=24(16); HOSTS=228 (268435456)
x x x x 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
1 1 1 1 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
240 . 0 . 0 . 0
<IP ADDRESS>/2; NETWORKS=22 (4); HOSTS=230 (1073741824)
x x 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
1 1 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
192 . 0 . 0 . 0
<IP ADDRESS>/0; NETWORKS=20 (1); HOSTS=232 (4294967296)
0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0
0 . 0 . 0 . 0

ALTTC/ DX Faculty 12
Static and Default Routes

192.168.5.0

WAN R1 R2

• Traffic to network 192.168.5.0 (Static Route).


• All outgoing traffic from network 192.168.5.0
(Default Route).

ALTTC/ DX Faculty 13
Path Determination
Routing Table of Router-A
Network Next Hop Router
192.168.1.0 Direct A B 192.168.7.0
192.168.2.0 Direct 192.168.2.0 192.168.1.0

192.168.3.0 Direct
192.168.4.0 B,C 192.168.3.0 C 192.168.6.0
192.168.5.0 B,C
192.168.4.0 192.168.5.0
192.168.6.0 B,C
192.168.7.0 B,C

•Networks192.168.4.0 to 192.168.7.0 can be reached via


either router B or C, which path is preferable?
•Metrics are needed to rank the alternatives.

ALTTC/ DX Faculty 14
Metrics
Hop Count
Bandwidth
Load
Delay
Reliability

ALTTC/ DX Faculty 15
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

192.168.2.0 A 192.168.1.0 B 192.168.7.0

192.168.3.0 C 192.168.6.0

192.168.4.0 192.168.5.0

ALTTC/ DX Faculty 16
Metrics
Bandwidth
A bandwidth metric would choose a higher
bandwidth over a lower bandwidth.
A packet from router A to C will follow path
A-B-C.
A B 192.168.7.0
192.168.2.0 192.168.1.0

A-C: 64kbps
A-B: 2mbps
C 192.168.6.0
192.168.3.0 B-C: 2mbps

192.168.4.0 192.168.5.0

ALTTC/ DX Faculty 17
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

ALTTC/ DX Faculty 18
Metrics
The term Least-Cost/Shortest is often used
as a generic term when speaking of router
choices
RIP chooses the lowest-cost path based on the
hop count.
RIP chooses the shortest path based on the
hop count.

ALTTC/ DX Faculty 19
Dynamic Routing Protocols
Distance Vector Routing Protocols
Distance vector algorithms are based on the
work done of R.E.Bellman, L.R.Ford and
D.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 algorithm
Called as Shortest path first or Distributive
database protocols
ALTTC/ DX Faculty 20
Dynamic Routing Protocols
All dynamic routing protocols are built
around an algorithm, which must specify:
A procedure for passing network reachability
information about networks to other routers
A procedure for receiving reachability
information from other routers
A procedure for determining optimal routes
based on the reachability information it has and
for recording this information in a route table
A procedure for reacting to and advertising
topology changes in an network
ALTTC/ DX Faculty 21
Distance Vector Routing Protocols

Statio
- X n-Y
n
tio s 100 K
t a
S Km ms
50

ALTTC/ DX Faculty 22
Distance Vector Routing Protocols
Routes 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 its
neighboring router’s perspective and then
advertises the routes from its own
perspective
Sometimes referred to as “Routing By
Rumor”
ALTTC/ DX Faculty 23
Distance Vector Routing Protocols
Routing 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).

ALTTC/ DX Faculty 24
Link state Routing Protocols
Each router originates information about
itself, its directly connected links and state
of those links
The information is passed around from
router to router, each router making a copy
of it, but never changing it
Every router has identical information about
the internetwork
Each router will independently calculate its
own best paths
ALTTC/ DX Faculty 25
Link state Routing Protocols
Link State Routing protocols are built around
well known algorithm from graph theory
E.W.Dijkstra shortest path algorithm.
Examples of LSR are:
Open Shortest Path First (OSPF)
The ISO’s Intermediate System to Intermediate
System (IS-IS) for IP
DEC’s DNA Phase V
Novell’s Netware Link State Protocol (NLSP)

ALTTC/ DX Faculty 26
Autonomous System
Old definition
An autonomous system is a group of routers
under a common administrative domain running
a common routing protocol
Contemporary definition
An autonomous system is an internetwork under
a common administration

ALTTC/ DX Faculty 27
Interior-Exterior Gateway Protocols
Interior Gateway Protocols
Routing Protocols which run within an
Autonomous System are IGPs
IGPs discover paths between networks
RIP/OSPF/IS-IS ……
Exterior Gateway Protocols
Routing Protocols that route between
Autonomous System are EGPs
EGPs discover paths between autonomous
systems
BGP4

ALTTC/ DX Faculty 28
IGPs-EGPs

AS-1

EGP IGP EGP


AS-2 AS-3

EGP
IGP IGP

ALTTC/ DX Faculty 29
Administrative Distances
Diversity of metrics poses problems in
routers running more than one routing
protocol.
Router may learn a route to the same
destination from each of the protocols
Administrative distances are the route
sources to determine most preferred source
Administrative distance is a measure of
believability

ALTTC/ DX Faculty 30
Administrative Distances
The 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

ALTTC/ DX Faculty 31
Administrative Distances
OSPF - 110
IS-IS - 115
RIP - 120
EGP - 140
External EIGRP - 170
Internal BGP - 200
Unknown - 255
The lower the administrative distance, the
more believable the protocol.

ALTTC/ DX Faculty 32
Flow Chart of a Packet
Packet Received
NO
If route available, YES
Header & NO Received ARP
search MAC in ARP
Checksum Valid Reply
cache
YES
NO NO Send ARP
Decrement TTL; Send ICMP MAC Address request and wait
TTL>=0 error message Found for a response
YES YES
Route table lookup Discard original
on Dest. Add. Packet
Build new packet Received ARP
NO with MAC address reply, insert
NO Default route and route through MAC and IP
Route Found
available port found in address into
YES YES routing table ARP table

ALTTC/ DX Faculty 33
ALTTC/ DX Faculty 34

Vous aimerez peut-être aussi