You are on page 1of 34

Faculty of

Engineering

Computer Network
Routing: Introduction

Computer Network
Dr. Ahmed Abdel Halim @ Helwan University
Fall 2017
Dr. Ahmed M. Abd El-Haleem
Assistant Professor in
Communication and Electronic Department
Faculty of Engineering, Helwan University

E-mail: dr.ahmed.m.abd.elhaleem@gmail.com
Introduction to Routing: Delivery
3

 The network layer supervises the handling of the packets


by the underlying physical networks. “delivery of a packet”.
1. Direct Delivery: The final destination of the packet is a
host connected to the same physical network as the deliverer.
2. Indirect delivery: the destination host is not on the same
network as the deliverer, the packet is delivered indirectly.
Introduction to Routing: Forwarding
4

 Forwarding means to place the packet in its route to


its destination.
 Forwarding requires a host or a router to have a
routing table.
 When a host has a packet to send or when a router has
received a packet to be forwarded, it looks at this table to
find the route to the final destination.
 Several techniques can make the size of the routing
table manageable:
1. Route Method Versus Next-Hop Method.
2. Network-Specific Method Versus Host-Specific Method.
3. Default Method.
Introduction to Routing: Forwarding
5

1. Route Method Versus Next-Hop Method


 In route method, the routing table holds
information about the complete address from
the source to the destination (complete route).
 Next-Hop Method is one technique to reduce
the contents of a routing.
 In this technique, the routing table holds only
the address of the next hop instead of
information about the complete route.
Introduction to Routing: Forwarding
6

Route method versus next-hop method.


Introduction to Routing: Forwarding
7

2.Network-Specific Method Versus Host-


Specific Method
 Network-specific method used to reduce the
routing table and simplify the searching process.
 Instead of having an entry for every destination
host connected to the same physical network
(host-specific method), we have only one entry
that defines the address of the destination
network itself.
 For example, if 1000 hosts are attached to the
same network, only one entry exists in the
routing table instead of 1000.
Introduction to Routing: Forwarding
8

Network-specific method versus host-specific method


Introduction to Routing: Forwarding
9

3. Default Method
 In Fig. host A is connected to a network with two
routers. Router R1 routes the packets to hosts
connected to network N2. However, for the rest of
the Internet, router R2
is used. So instead
of listing all
networks in the
entire Internet,
host A can just
have one entry
called the default.
Introduction to Routing: Routing
10

 Routing is the process of:


- Learning all the paths or routes to all
destination networks in a network.
- Selection of the best paths (routes) to these
networks.
- Maintaining and verifying routing information
using a routing table.
Routers: are responsible for interconnecting
networks by learning and selecting the best paths
for a packet to travel and forwarding packets to
their destination based on the learned best paths.
Routers generally
have 2 connections:
WAN connections
and
LAN connections
Introduction to Routing: Routing
13

Routing Protocol Vs. Routed Protocol


Routing protocols are used by routers to learn and determine
the best paths and maintain routing tables such as:
RIP  Routing Information Protocol.
OSPF  Open Shortest Path First.
IGRP  Interior Gateway Routing Protocol.
EIGRP  Enhanced IGRP.
IS-IS  Intermediate System to Intermediate System.
BGP  Border Gateway Protocol.
Routed protocol: Once the best path is determined, a router
can route a routed protocol which support the method of
data delivery such as: IP, IPX, APPLETALK
Introduction to Routing: Routing
14

Autonomous Systems: Interior or Exterior Routing


Protocols
 One routing protocol cannot handle updating all internet

routing tables.
 Therefore, the internet is divided into Autonomous
Systems (ASs).
 An AS is a group of networks and routers under the

authority of a single admin.


 Routing inside an autonomous system is referred to as
“intradomain or Interior” routing.
 Autonomous system can choose one or more
intradomain routing protocols to handle routing inside
the autonomous system.
Introduction to Routing: Routing
15

 Routing between ASs is “interdomain or exterior”


routing.
 Only one interdomain routing protocol handles routing
between autonomous systems.

Autonomous systems.
Introduction to Routing: Routing
16

 Interior Gateway
Protocols (IGP) -
 Used for routing
within an AS
 Include RIP, EIGRP,
OSPF, and IS-IS

 Exterior Gateway
Protocols (EGP) -
 Used for routing
between AS
 Official routing
protocol used by the
Internet
Introduction to Routing: Routing
17

Classful Vs. Classless routing protocols


1- Classful routing protocols
Classful routing protocols do not send subnet mask
information in their routing updates:
 Only RIPv1 and IGRP are classful.
 Created when network addresses were allocated based on
classes (class A, B, or C).
 Cannot provide variable length subnet masks (VLSMs) and
classless interdomain routing (CIDR).
Classless routing protocols
 Classless routing protocols include subnet mask information

in the routing updates:


 RIPv2, EIGRP, OSPF, and IS_IS
 Support VLSM and CIDR

 IPv6 routing protocols


Introduction to Routing: Routing

Interior and exterior popular routing protocols.


Path Determination and Switching
Functions
19

Router Paths and Packet Switching


 Switching Function of Router is the process used by a

router to switch a packet from an incoming interface


to an outgoing interface on the same router.
 A packet received by a router will do the following:

- Strips off layer 2 headers.


- Examines destination IP address located in Layer 3
header to find best route to destination.
- Re-encapsulates layer 3 packet into layer 2 frame.
- Forwards frame out exit interface.
Path Determination and Switching
Functions
20

Router Paths and Packet Switching


 As a packet travels from one networking device to

another, it has the following:


- The Source and Destination IP addresses NEVER
change.
- The Source & Destination MAC addresses CHANGE
as packet is forwarded from one router to the next.
- Time To Live (TTL) field decrement by one until a
value of zero is reached at which point router
discards packet (prevents packets from endlessly
traversing the network).
Path Determination and Switching
Functions
21

Routing table creation


 Routing table contains:

 Directly connected networks - this occurs when a


device is connected to another router interface.
 The decisions of the best routing protocol and the
best paths (routes) to reach the Remote
networks.
- The best routing protocol is elected based on its
administrative distance.
- The best paths depend on its metric.
Path Determination and Switching
Functions
22

Selecting the Best Route with Metrics


 A Metric is a numerical value used by routing

protocols help determine the best path to a


destination
 The best path has the least metric.

 Each routing protocol use a metric type: (hop count,


BW, delay, load, reliability, and MTU).
 Where MTU defines Maximum Transmission Unit
of a packet. Essentially, limits the size of a packet,
default is ~1500 bytes .
Path Determination and Switching
Functions
23

 Equal cost metric is a condition where a router has


multiple paths to the same destination that all have
the same metric
 To solve this dilemma, a router will use Equal Cost
Load Balancing - this means the router sends
packets over the multiple exit interfaces listed in
the routing table.
Path Determination and Switching
Functions
24

 Example

Find the shortest & least cost paths


from node 1 to node 6
Path Determination and Switching
Functions
25

 Two arrowed lines between a pair of nodes represent a link


between these nodes,
 The corresponding numbers represent the current link cost
in each direction.
 The shortest path (fewest hops) from node 1 to node 6 is 1-
3-6 (cost = 5 + 5 = 10),
 But the least-cost path is 1-4-5-6 (cost = 1 + 1 + 2 = 4).
 Costs are assigned to links to support one or more design
objectives. For example:
 Cost could be inversely related to the data rate. So the
least-cost route should provide the highest throughput,
or
 Cost could be inversely related to the current queuing
delay on the link. So the least-cost route should minimize
delay.
Path Determination and Switching
Functions
26

Administrative Distance
 It is a value between (0 – 255) that reflects the
truthfulness of routing protocol (the best
protocol has the least administrative distance).
Routing Table Structure and Lookup
Process
27

Routing Table Structure


 We assume that hosts and routers use classless
addressing because classful addressing can be treated as
a special case of classless addressing.
 In classless addressing, the routing table needs to have
one row of information for each destination network
involved.
 Unfortunately, the destination address in the packet
gives no clue about the network address.
 To solve the problem, we need to include the mask (/n)
in the table; we need to have an extra column that
includes the mask for the corresponding network.
Routing Table Structure and Lookup
Process
28

Routing Table Structure

Routing table in classless addressing


Routing Table Structure and Lookup
Process
29

Routing Table Structure Example1: Make a routing


table for router R1, using four columns in a routing
table for the network configuration

Routers are responsible for


interconnecting networks .
Routing Table Structure and Lookup
Process
30

Routing Table Structure Example 1 Solution:


Table 1 shows the corresponding routing table.

Table 1 Routing table for router R1


Routing Table Structure and Lookup
Process
31

Routing Table Structure Example 2: Show the


forwarding process if a packet arrives at R1 with the
destination address 180.70.65.140.
Solution
1. The first mask (/26) is applied to the destination
address. The result is 180.70.65.128, which does not
match the corresponding network address.
2. The second mask (/25) is applied to the destination
address. The result is 180.70.65.128, which matches the
corresponding network address.
3. The next-hop address (the destination address of the
packet in this case) and the interface number m0 are
passed to ARP for further processing.
Routing Table Structure and Lookup
Process
32

Routing Table Structure Example 4 Show the


forwarding process if a packet arrives at R1 with
the destination address 180.24.32.78.
Solution
This time all masks are applied, one by one, to
the destination address, but no matching network
address is found. When it reaches the end of the
table, the module gives the next-hop address
180.70.65.200 and interface number m2 to ARP.
This is probably an outgoing package that needs to
be sent, via the default router, to someplace else
in the Internet.
Routing Table Structure and Lookup
Process
33

Address aggregation
Routing Table Structure and Lookup
Process
34

192.168.10.0/24 64.100.0.1 10.1.1.0/24


.10 G0/0 .10
PC1 209.165.200.224 /30
.1 .1
.225 .226
R1 S0/0/0 R2
.10 .1 .1 .10
PC2 G0/1

10.1.2.0/24

A Identifies how the network was learned by the router.


B Identifies the destination network.
C Identifies the administrative distance (trustworthiness) of the route source.
D Identifies the metric to reach the remote network.
E Identifies the next hop IP address to reach the remote network.
F Identifies the amount of elapsed time since the network was discovered.
G Identifies the outgoing interface on the router to reach the destination network.
Routing Table Structure and Lookup
Process
35

 Codes of different routes and routing


protocols as appear on the routing table

You might also like