P O W E R E D B Y
M O H A M E D
K A C H B O U R I
The Network layer
1
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
Introduction
The basic function of the transport layer is to accept data from above it, split it up into
smaller units if need be, pass these to the network layer, and ensure that the pieces all
arrive correctly at the other end. Furthermore, all this must be done efficiently and in a
way that isolates the upper layers from the inevitable changes in the hardware technology
over the course of time.
The transport layer also determines what type of service to provide to the session layer,
and, ultimately, to the users of the network. The most popular type of transport
connection is an error-free point-to-point channel that delivers messages or bytes in the
order in which they were sent. However, other possible kinds of transport service exist,
such as the transporting of isolated messages with no guarantee about the order of
delivery, and the broadcasting of messages to multiple destinations. The type of service is
determined when the connection is established. (As an aside, an error-free channel is
completely impossible to achieve; what people really mean by this term is that the error
rate is low enough to ignore in practice.)
The transport layer is a true end-to-end layer; it carries data all the way from the source
to the destination. In other words, a program on the source machine carries on a
conversation with a similar program on the destination machine, using the message
headers and control messages. In the lower layers, each protocols is between a machine
and its immediate neighbors, and not between the ultimate source and destination
machines, which may be separated by many routers. The difference between layers 1
through 3, which are chained, and layers 4 through 7, which are end-to-end,
2
3
The Network Layer (source to
destination)
 The network layer is responsible for the delivery of individual packets from the source
host to the destination host.
 Concerned:
 Logical addressing (IP Address)
 Routing (Source to destination transmission between networks)
DataH3 Packet
From transport layer
To data link layer
DataH3 Packet
To transport layer
From data link layer
Network layer Network layer
The environment of the network layer protocols
4
This equipment is used as follows. A host with a packet to send transmits it
to the nearest router, either on its own LAN or over a point-to-point link to
the ISP.
The packet is stored there until it has fully arrived and the link has finished
its processing by verifying the checksum. Then it is forwarded to the next
router along the path until it reaches the destination host, where it is
delivered. This mechanism is store-and-forward packet switching, as we have
seen in previous chapters.
5
How does data go from one place
on the Internet to
another?
» I F T H E S H O R T E S T P A T H F R O M N O D E I T O N O D E J , W I T H
D I S T A N C E D ( I , J ) P A S S E S T H R O U G H N E I G H B O R K , W I T H L I N K
C O S T C ( I , K ) , T H E N :
D ( I , J ) = C ( I , K ) + D ( K , J ) ( D I S T A N C E - V E C T O R P R O T O C O L S )
D ( I , J ) = C ( I , K ) + D ( K , J ) ( D I S T A N C E - V E C T O R P R O T O C O L S )
O R
D ( I , J ) = D ( I , K ) + C ( K , J ) ( L I N K - S T A T E P R O T O C O L S )
6
Routing – The Easy
Explanation?
7
Nonroutable Protocols
 In the early days of networking, networks were
small collections of computers linked together
 For the purposes of sharing information and expensive
peripherals
 Early networks were sometimes configured as
peer-to-peer networks
 Computers communicate with and provide services to their
“peers”
 All communication occurs on the same network segment
8
Nonroutable Protocols (continued)
9
Routed Protocols
 Routed protocols
 Have packet headers that can contain Network layer
addresses
 Developed to support networks consisting of multiple
networks or subnetworks
 Protocols that can carry Network layer information
 Transmission Control Protocol/Internet Protocol
(TCP/IP)
 Internetwork Packet Exchange/Sequenced Packet
Exchange (IPX/SPX)
10
Routed Protocols (continued)
 For routed protocols to work on a network
 Every device must be configured with a unique IP or IPX
address (logical address)
11
12
Routing Protocols (continued)
13
Routing Protocols
 Routing protocols
 Protocols used by routers to make path determination
choices and to share those choices with other routers
 Hop count
 The number of routers a packet must pass through to reach a
particular network
 Metric
 A value used to define the suitability of a particular route
 Routers use metrics to determine which routes are better
than other routes
14
Routing Protocols (continued)
 Autonomous system (AS)
 Uses Interior Gateway Protocols as routing protocols
 A group of routers under the control of a single
administration
 Interior Gateway Protocols (IGPs) are
 Routing protocols used within an AS
 Exterior Gateway Protocols (EGPs)
 Routing protocols used to route information between
multiple autonomous systems
15
Routing Protocols (continued)
16
Routing Protocols (continued)
 Examples of IGPs
 Routing Information Protocol (RIP)
 Interior Gateway Routing Protocol (IGRP)
 Enhanced Interior Gateway Routing Protocol
(EIGRP)
 Open Shortest Path First (OSPF)
 Example of EGP
 Border Gateway Protocol (BGP)
Interior Gateway Protocols
17
 Interior Gateway Protocols
• Used within an Autonomous System
• Distribute internal infrastructure prefixes only, not external
routing information; Examples –OSPF, IS-IS, RIP
IGPs are designed to route packets within an AS and
rapidly adapt to network failures
All IGPs function to identify the shortest cost path
between two endpoints, typically via summation of
the metrics of all the individual links
Interior Gateway Protocols
18
Interior Gateway Protocols
19
 Two classifications of IGPs in widespread use today: Distance-
Vector and Link-State
• Distance-Vector is akin to calling A and asking them to pass a
message along to B
» Lower overhead in this approach, but it means that the message A
receives from B is subject to some degree of uncertainty and
interpretation
» Routers running Distance-Vector protocols don’t see the entire
network, rather they simply trust what their neighbor tells them is
reachable
• Link-State is akin to calling B and A separately, and giving each of
them the exact same message
» Obviously, this induces a higher degree of overhead, but it
removes uncertainty
» Routers running Link-State protocols have a topological view of
the entire network, because each router informs every other router
of their connectivity
20
21
22
23
24
25
26
Summary
27
 The network layer provides services to the transport
layer. It can be based on either datagrams or virtual
circuits. In both cases, its main job is routing packets
from the source to the destination. In datagram
networks, a routing decision is made on every
packet. In virtual-circuit networks, it is made when
the virtual circuit is set up.

Network the 4th layer

  • 1.
    P O WE R E D B Y M O H A M E D K A C H B O U R I The Network layer 1 7 Application 6 Presentation 5 Session 4 Transport 3 Network 2 Data Link 1 Physical
  • 2.
    Introduction The basic functionof the transport layer is to accept data from above it, split it up into smaller units if need be, pass these to the network layer, and ensure that the pieces all arrive correctly at the other end. Furthermore, all this must be done efficiently and in a way that isolates the upper layers from the inevitable changes in the hardware technology over the course of time. The transport layer also determines what type of service to provide to the session layer, and, ultimately, to the users of the network. The most popular type of transport connection is an error-free point-to-point channel that delivers messages or bytes in the order in which they were sent. However, other possible kinds of transport service exist, such as the transporting of isolated messages with no guarantee about the order of delivery, and the broadcasting of messages to multiple destinations. The type of service is determined when the connection is established. (As an aside, an error-free channel is completely impossible to achieve; what people really mean by this term is that the error rate is low enough to ignore in practice.) The transport layer is a true end-to-end layer; it carries data all the way from the source to the destination. In other words, a program on the source machine carries on a conversation with a similar program on the destination machine, using the message headers and control messages. In the lower layers, each protocols is between a machine and its immediate neighbors, and not between the ultimate source and destination machines, which may be separated by many routers. The difference between layers 1 through 3, which are chained, and layers 4 through 7, which are end-to-end, 2
  • 3.
    3 The Network Layer(source to destination)  The network layer is responsible for the delivery of individual packets from the source host to the destination host.  Concerned:  Logical addressing (IP Address)  Routing (Source to destination transmission between networks) DataH3 Packet From transport layer To data link layer DataH3 Packet To transport layer From data link layer Network layer Network layer
  • 4.
    The environment ofthe network layer protocols 4 This equipment is used as follows. A host with a packet to send transmits it to the nearest router, either on its own LAN or over a point-to-point link to the ISP. The packet is stored there until it has fully arrived and the link has finished its processing by verifying the checksum. Then it is forwarded to the next router along the path until it reaches the destination host, where it is delivered. This mechanism is store-and-forward packet switching, as we have seen in previous chapters.
  • 5.
    5 How does datago from one place on the Internet to another?
  • 6.
    » I FT H E S H O R T E S T P A T H F R O M N O D E I T O N O D E J , W I T H D I S T A N C E D ( I , J ) P A S S E S T H R O U G H N E I G H B O R K , W I T H L I N K C O S T C ( I , K ) , T H E N : D ( I , J ) = C ( I , K ) + D ( K , J ) ( D I S T A N C E - V E C T O R P R O T O C O L S ) D ( I , J ) = C ( I , K ) + D ( K , J ) ( D I S T A N C E - V E C T O R P R O T O C O L S ) O R D ( I , J ) = D ( I , K ) + C ( K , J ) ( L I N K - S T A T E P R O T O C O L S ) 6 Routing – The Easy Explanation?
  • 7.
    7 Nonroutable Protocols  Inthe early days of networking, networks were small collections of computers linked together  For the purposes of sharing information and expensive peripherals  Early networks were sometimes configured as peer-to-peer networks  Computers communicate with and provide services to their “peers”  All communication occurs on the same network segment
  • 8.
  • 9.
    9 Routed Protocols  Routedprotocols  Have packet headers that can contain Network layer addresses  Developed to support networks consisting of multiple networks or subnetworks  Protocols that can carry Network layer information  Transmission Control Protocol/Internet Protocol (TCP/IP)  Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX)
  • 10.
    10 Routed Protocols (continued) For routed protocols to work on a network  Every device must be configured with a unique IP or IPX address (logical address)
  • 11.
  • 12.
  • 13.
    13 Routing Protocols  Routingprotocols  Protocols used by routers to make path determination choices and to share those choices with other routers  Hop count  The number of routers a packet must pass through to reach a particular network  Metric  A value used to define the suitability of a particular route  Routers use metrics to determine which routes are better than other routes
  • 14.
    14 Routing Protocols (continued) Autonomous system (AS)  Uses Interior Gateway Protocols as routing protocols  A group of routers under the control of a single administration  Interior Gateway Protocols (IGPs) are  Routing protocols used within an AS  Exterior Gateway Protocols (EGPs)  Routing protocols used to route information between multiple autonomous systems
  • 15.
  • 16.
    16 Routing Protocols (continued) Examples of IGPs  Routing Information Protocol (RIP)  Interior Gateway Routing Protocol (IGRP)  Enhanced Interior Gateway Routing Protocol (EIGRP)  Open Shortest Path First (OSPF)  Example of EGP  Border Gateway Protocol (BGP)
  • 17.
    Interior Gateway Protocols 17 Interior Gateway Protocols • Used within an Autonomous System • Distribute internal infrastructure prefixes only, not external routing information; Examples –OSPF, IS-IS, RIP IGPs are designed to route packets within an AS and rapidly adapt to network failures All IGPs function to identify the shortest cost path between two endpoints, typically via summation of the metrics of all the individual links
  • 18.
  • 19.
    Interior Gateway Protocols 19 Two classifications of IGPs in widespread use today: Distance- Vector and Link-State • Distance-Vector is akin to calling A and asking them to pass a message along to B » Lower overhead in this approach, but it means that the message A receives from B is subject to some degree of uncertainty and interpretation » Routers running Distance-Vector protocols don’t see the entire network, rather they simply trust what their neighbor tells them is reachable • Link-State is akin to calling B and A separately, and giving each of them the exact same message » Obviously, this induces a higher degree of overhead, but it removes uncertainty » Routers running Link-State protocols have a topological view of the entire network, because each router informs every other router of their connectivity
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
    Summary 27  The networklayer provides services to the transport layer. It can be based on either datagrams or virtual circuits. In both cases, its main job is routing packets from the source to the destination. In datagram networks, a routing decision is made on every packet. In virtual-circuit networks, it is made when the virtual circuit is set up.