MCS 8106 5/13/2025
Network reference models
• Breaks down network functionality/architecture into layers
• Defines which functions should be performed at each layer
NETWORK REFERENCE MODELS • Allows vendors and other organizations to develop products or standards for
the different layers with no risk of lack of interoperability.
• There are two:
– OSI MODEL – 7 layers
– TCP/IP MODEL – 4 layers
1 2
Network reference models
• There are two:
– OSI MODEL – 7 layers
– TCP/IP MODEL – 4 layers
OSI MODEL
3 4
MCS 8106 5/13/2025
The OSI Model Application Layer
• OSI - “ Open Systems Interconnection". • User interacts with the OSI model at this layer through applications
• Application layer provides network services to applications through different
• Contain in 7 different layers that interact with each other.
protocols
• The application layer contains a variety of protocols that are commonly needed by
users.
• Examples: HTTP, FTP, Telnet, SMTP, POP3
• These protocols give end-user applications access to network resources
5 6
Presentation Layer Session Layer
• Allows applications/processes to
establish maintain an ongoing session.
• This layer provides independence from differences in data representation or syntax
or format e.g., encryption • Communication sessions consist of
requests and responses that occur
• Examples: between applications - >Dialogue.
• Conversion from ASCII to EBCDIC • Session layer allows two systems to enter
• Encryption and decryption of data into dialog (communication)
• Compression and decompression of data • Also provides dialog control i.e decides
whose turn it is to ’talk’ (full duplex, half
duplex, simplex)
• Example protocols: remote procedure
call (allows client to execute application 3
3
on remote server over a network), SQL
(establish a session between a client
application and a database server over a
7
network)
8
MCS 8106 5/13/2025
Session Layer Transport Layer
• Session layer also provides synchronization –
Does checkpointing of long transmissions to • The transport layer defines how a
allow them to pick up from where they left off given packet gets delivered to the
in the event of a crash and subsequent appropriate process.
recovery
• Transport layer therefore provides
• Example protocols: remote procedure call end to end connection between
(allows client to execute application on processes
remote server over a network), SQL (establish
a session between a client application and a • Transport layer handles process to
database server over a network) process communication
• Depending on the protocol used, it
can also ensure reliable data
3 delivery through error detection 3
and correction (if TCP is used)
9 10
Transport Layer Transport Layer
application
• Provide logical transport
network
data link
communication physical
between
application
processes
running on
different hosts
application
transport
The transport layer is responsible for
the delivery of a message from one
network
data link
physical
process to another.
11 12
MCS 8106 5/13/2025
Transport layer: Process-to-process communication Transport layer: Ports and sockets
• A process is any instance of a Demultiplexing at rcv host: Multiplexing at send host: Each host (e.g computer) has
program running on a given delivering received segments gathering data from multiple 65,536 ports.
device at a given time. sockets, enveloping data with
to correct socket Different applications have
• To allow information to be header (later used for
delivered to the appropriate demultiplexing) different port numbers:
process, we must have some way = socket = process 20,21: FTP Port 0
of identifying that processes 23: Telnet Port 1
Ports numbers are used for this 80: HTTP
purpose. P1 P2 P4 application
application P3 P1
application Socket -> IP address + port Port
• The addressing system used to
distinguish different processes on transport transport transport number 65535
the same device and/or attached
to the same network interface is network network network A socket provides an interface
the port number.
• Ports are used for multiplexing link link link to send data to/from the
and de-multiplexing so that data
physical physical physical network through a port
reaches the correct process in a
host. host 3
host 1 host 2
13 14
Network Layer Network Layer
• Provides network-wide
addressing and a
mechanism to move
packets between
networks (routing) application
application
• Responsibilities: transport
transport
network
– Network addressing 1. Send data 2. Receive data network
data link
– IP addressing data link
physical
– Routing-deciding physical
which path a packet
will take from source The network layer is responsible for
to destination.
• Example protocol:
3 the delivery of individual packets from
– IP from TCP/IP the source host to the destination host.
15 16
MCS 8106 5/13/2025
Transport vs. network layer vs Data LinkLayer Data Link Layer
Household analogy: data-link layer has responsibility of
• Network layer: logical communication transferring datagram from one node
(connection) between hosts 12 kids sending letters to 12
kids to physically adjacent node over a link global ISP
• Transport layer: logical communication • Processes = kids hosts and routers: nodes
between processes • App messages = letters in communication channels that connect adjacent
– Relies on, enhances, network layer envelopes nodes along communication path: links
services • Hosts = houses wired links
• Data link layer: Hop to hop delivery of • Network-layer protocol = wireless links
data postal service – delivers LANs
message to host. layer-2 packet: frame, encapsulates datagram
• Transport protocol = ann and
bill – delivers message to
correct recipient (kid)
3-17 18
Data Link Layer Data Link Layer
• Media access control (decides which host will send data via a shared medium)
• Places data and retrieves it from the physical layer
• Provides error detection and correction capabilities.
The data link layer is responsible for
moving frames from one hop (node) to
the next.
19 20
MCS 8106 5/13/2025
Sub-layers of the Data Link Layer Physical Layer
a) MAC (Media Access Control) • Determines the specification for all physical components
– Gives data to the NIC (Network Interface Card) – Transmission medium e.g wireless, fiber, coaxial, twisted pair
– Controls access to the shared media through: – Cable specifications, cable connectors, connectors pin layout
• CSMA/CD Carrier Sense Multiple Access/Collision Detection – Data encoding (bits to waves) - modulation or demodulation
• Token passing – Electrical properties
b) LLC (Logical Link Layer) • Example protocols (layer 1 and 2 ):
– Ethernet (IEEE 802.3)
– The Logical Link Control layer controls frame synchronization, flow control and error checking.
– Token Ring (IEEE 802.5)
• Flow control – matching data rate of sender and receiver e.g slowing down transmitter if too fast for
receiver – Wireless (IEEE 802.11a/b/g/n)
• Synchronization – order of frames according to seq. number.
• Error detection and correction - Can detect some transmission errors. If the packet is ‘bad’ the LLC will
3
request the sender to resend that particular packet.
21 22
Physical Layer Physical Layer
• What are the Physical Layer components on my computer?
a) NIC
• Network Interface Card
• Has a unique 12 character Hexadecimal number permanently burned into it at the
manufacturer.
• The number is the MAC Address/Physical address of a computer
b) Cabling
• Twister Pair
The physical layer is responsible • Fiber Optic
• Coax Cable
for the movement of individual bits
from one hop (node) to the next.
23 24
MCS 8106 5/13/2025
How Does It All Work Together Encapsulation Example: E-mail
• Each layer contains a Protocol Data
Unit (PDU)
– PDU’s are used for peer-to-peer
contact between corresponding
layers.
– Data is handled by the top three
layers, then Segmented by the
Transport layer.
– The Network layer places it into
packets and the Data Link frames the
packets for transmission.
– Physical layer converts it to bits and
sends it out over the media.
– The receiving computer reverses the
process using the information
contained in the PDU.
2
25 26
Figure 2.14 Summary of layers
Encapsulation
27 28
MCS 8106 5/13/2025
TCP/IP (Protocol Stack) Model
• Developed in the the late-60s
• The Defense Advance Research Projects Agency (DARPA) originally developed
Transmission Control Protocol/Internet Protocol (TCP/IP) to interconnect various
defense department computer networks.
• DARPA is an agency of the U.S. Department of Defense
• Has four layers.
• It is more of a protocol stack than a model
TCP/IP PROTOCOL STACK
29 30
4 Layers of the TCP/IP Model The Network Access Layer
• Concerned with all of the issues that an IP packet requires to actually make the
physical link.
• All the details in the OSI physical and data link layers:
– Electrical and mechanical specifications.
– Physical connectors
– Framing of data and physical (MAC) addressing.
– Synchronization, flow control, error control.
It is important to note that some of the layers in the TCP/IP model have the
same name as layers in the OSI model.
Do not confuse the layers of the two models.
31 32
MCS 8106 5/13/2025
The Internet Layer Transport Layer
• Send source packets from any network on the internetwork and have them arrive at • Allows end-to-end process to process communication
the destination independent of the path and networks they took to get there. • Connection establishment, error control, flow control
– Packets, logical addressing. • Two main protocols at this level
– Transmission control protocol (TCP),
– Internet protocol (IP).
• Connection oriented
– Routing: routing table, routing protocol. – Connection established before sending data
– Reliable
– user datagram protocol (UDP)
• Connectionless
– Sending data without establishing connection
– Fast but unreliable
33 34
The Application Layer TCP/IP Reference Model
• Handles high-level protocols, issues of representation, encoding, and dialog control. Layer Protocols
• The TCP/IP combines all application-related issues into one layer, and assures this Application HTTP TELNET FTP SMTP SNMP
data is properly packaged for the next layer.
– Example protocols: FTP, HTTP, SMNP, DNS Transport TCP UDP
– Format of data, data structure/syntax, encode
Internet IP ICMP
– Dialog control, session management
Network Access
ETHERNET WiFi
(Host-to-network)
35 36
MCS 8106 5/13/2025
Protocols at the Application Layer Protocols at the Transport Layer
• HTTP: • Transmission control protocol (TCP),
– browser and web server communication
– Connection oriented
• FTP :
– file transfer protocol • Connection established before sending data
• TELNET: • Reliable
– remote login protocol • user datagram protocol (UDP)
• POP3: Retrieve email – Connectionless
– POP3 is designed to delete mail on the server as soon as the user has downloaded it
• Sending data without establishing connection
• IMAP (Internet Message Access Protocol )
• Fast but unreliable
– Retrieve emails,
– retaining e-mail on the server and for organizing it in folders on the serve
37 38
Protocol at the Internet Layer Protocols at the Network Access layer
• IP • Ethernet
– Routing (path selection) – Uses CSMA/CD
– Addressing • Token Ring
• ICMP (Internet Control Message Protocol ) • WiFi
– sends error messages relying on IP
• a requested service is not available
• a host or router could not be reached
39 40
MCS 8106 5/13/2025
How the OSI and TCP/IP Models Relate in a Networking Environment
Comparing TCP/IP with OSI OSI
Model
OSI Model
Pneumonic Equipment
Equipment
Data Protocols
Words to TCP/IP
Name Purpose Remember Model
Layer
OSI Model TCP/IP Hierarchy Protocols Redirector,
Layer 7 Application All FTP, Telnet, Browsers Application
7th
Application Layer Regular Computer SMTP,
or A Special SNMP, Common Data
6th Layer 6 Presentation People Computer Data Application
Presentation Layer Application Gateway. Used to Netware Format
Layer combine networks Core
5th
Session Layer
using different NFS, SQL, Dialogues and
Layer 5 Session Seem communication RPC, X-Win
Application
Conversations
4th
Transport Layer protocols Quality of
Transport Layer
Layer 4 Transport To Computer Segment TCP and UDP Service, and Transport
3rd
Network Layer Reliability
Network Layer
Segment Network Routable
2nd into Smaller Protocols.
Path Selection,
Link Layer Layer 3 Network Need Router Packet (IP, IPX,
Routing, and Internet
Link Layer Broadcast Addressing
1st AppleTalk)
Domains
Physical Layer
Bridge (2
Data Link Segment Network NDIS, ODI, Frames and
Ports) or Network
Layer 2 -MAC Data into Smaller Frame MAC Address, Media Access
Switch and Access
Link Layer : includes device driver and network interface card -LLC
NIC
Collision Domains Ether Talk Control (MAC)
Network Layer : handles the movement of packets, i.e. Routing Repeater,
Transport Layer : provides a reliable flow of data between two hosts Hub (Multi-
One Collision AND
Signals and Network
Layer 1 Physical Processing One Broadcast Bit Physical
Application Layer : handles the details of the particular application port),
Domain
Media Access
Cabling
41 42