Professional Documents
Culture Documents
Week 7
Lecture Outline
TCP/IP Network Layer
Delivery and Routing of IP Packets
Direct Delivery
Network Layer - Delivery
Indirect Delivery
Destination is a host is NOT connected to the
same physical network as the source
Packet will jump from router to router until it
reaches the same physical network as the
destination computer then it proceeds with a
direct delivery
Sender uses destination IP address and routing
table to find IP address of the next router in
route to the final destination.
ARP protocol used to find physical address of the
next router
Network Layer - Delivery
Indirect Delivery
Network Layer Routing Methods
Routing requires a routing table to be
present at a router or host
Routing table
A table of routes to final destinations
Impractical for use on the internet (too many
entries in the table)
Size of routing table must be kept manageable
There are several techniques to do this
Next-Hop Routing
Routing table only holds the address of the next hop
(rather than the details of the complete route)
Network-Specific Routing
Treats all hosts connected to the same network as
one single entity
i.e. only one entry in routing table (identifying network
itself)
Host-Specific Routing
Inverse of network-
specific routing
destination host
address is given in the
routing table.
Network administrators
may force all packets to
go to a specific router
Maybe for security
reasons, or traffic
concerns
Default Routing
When multiple routers are in use, a default router may be set.
Example: If no entry for destination address in table, go to
router R2
Static vs. Dynamic Routing
Static Routing Table
Contains information entered manually
Dynamic Routing Table
Updated periodically using one of the dynamic
routing protocols (RIP, OSPF, or BGP)
Routing Table & Routing Module
For the following examples, we will use a
simplified routing module with the following
hierarchy in place:
Router must check for:
1. Direct Delivery
2. Host-Specific Delivery
3. Network-Specific Delivery
4. Default-Delivery
Routing Table & Routing Module
The module consults with routing table to find the
best route for the packet, then the packet is sent
along with the next-hop address to the fragmentation
module
Routing Table
Organized in hierarchical scheme
Usually 7 fields:
Mask mask applied to destination IP address to find
network or subnet address of the destination
Destination Address - either the destination host
address (netid and hostid) or destination network
address (only address of network, host id all zeros)
Next-hop Address Address of next-hop router to
which packet is delivered
Routing Table
(7 fields continued)
Flags on/off switches (presence/absence):
U The router is up and running.
G The destination is in another network.
H Host-specific address.
D Added by redirection.
M Modified by redirection.
Reference Count Number of users currently
using this route
Use Number of packets transmitted through
this router for the corresponding destination
Interface Name of the interface
Routing Module
Receives IP packet from IP processing module (we will
see later)
Pseudo-code for Routing Module: