2. Network reference models
• Breaks down network functionality/architecture
into layers
• Defines which functions should be performed at
each layer
• 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
2
3. The OSI Model
• OSI - “ Open Systems Interconnection".
• Contain in 7 different layers that interact with
each other.
3
5. Application Layer
• User interacts with the OSI
model at this layer through
applications
• Application layer provides
network services to
applications through different
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
3
6. Presentation Layer
6
3
This layer provides
independence from
differences in data
representation/syntax
(e.g., encryption)
Examples:
conversion from
ASCII to EBCDIC
Encryption and
decryption of data
Compression and
decompression of
data
7. Session Layer
• Allows applications/processes
to establish maintain an
ongoing session.
• Communication sessions
consist of requests and
responses that occur between
applications - >Dialogue.
• Session layer allows two
systems to enter into dialog
(communication)
• Also provides dialog control
i.e decides whose turn it is to
’talk’ (full duplex, half duplex,
simpex)
• Example protocols: session
control protocol, remote
procedure call, zone
information protocol, H.323
(for VOIP), session initiation
protocol
7
3
• Session layer also provides
synchronization – Does
checkpointing of long
transmissions to allow
them to pick up from
where they left off in the
event of a crash and
subsequent recovery
8. Transport Layer
• The transport layer
defines how a given
packet gets delivered to
the appropriate process.
• Transport layer therefore
provides end to end
connection between
processes
• Depending on the
protocol used, it can also
ensure reliable data
delivery through error
detection and correction
8
3
9. Figure: Transport layer
The transport layer is responsible for
the delivery of a message from one
process to another.
9
10. Transport layer: Process-to-process
communication
• A process is any instance of a program running on a
given device at a given time.
• To allow information to be delivered to the
appropriate process, we must have some way of
identifying that processes.
• Ports are used for this purpose.
10
11. Transport layer: Ports and sockets
11
Port 0
Port 1
Port
65535
Each host (e.g computer) has
65,536 ports.
Different applications have
different port numbers:
20,21: FTP
23: Telnet
80: HTTP
Socket -> IP address + port
number
A socket provides an interface
to send data to/from the
network through a port
12. Transport layer: Ports
• The addressing system used to distinguish
different processes on the same device and/or
attached to the same network interface is the
port number.
• Ports are used for multiplexing and de-
multiplexing so that data reaches the correct
process in a host.
12
13. Transport layer: Socket
• Socket: Used for multiplexing and demultiplexing in a
network
• An interface between application and network.
• A socket is the combination of an IP address and a port
number, much like one end of a telephone connection is the
combination of a phone number and a particular extension.
• Based on this address, internet sockets deliver incoming data
packets to the appropriate application process
• Socket: <IP Address>:<Port Number>
13
15. Transport layer protocols
• There are two protocols
– Transport Control Protocol(TCP)
– User Datagram Protocol(UDP)
15
16. Transport layer: TCP
• TCP – Transport Control Protocol
• Connection-oriented and reliable.
• Connection oriented – Connection has to be established
before data can be sent.
• TCP is reliable because it provides flow control and error
control
• Used for transfers that require numerous packets to be
integrated properly and seamlessly (no errors).
Protocols that use TCP are:
– HTTP (Hypertext Transfer Protocol)
– Telnet
– SMTP (Simple Mail Transfer Protocol)
– FTP (File Transfer Protocol)
16
17. TCP Connection Esablishment
• Connections are established using a three-way
handshake.
• The client sends a SYN message to the well-known port
on the server asking for a connection to be opened
(active open) and for the sequence numbers to be
synchronized.
• The server responds with an ACK message indicating the
sequence number for the client to synchronize with.
• The client responds to the server with an ACK message.
17
19. Transport layer: UDP
• UDP – User Datagram Protocol
• Connectionless and unreliable
• Connectionless – Connection establishment
not necessary before data can be sent.
• Used primarily for short, simple transmissions
e.g DNS, SMNP (simple network management
protocol)
19
20. Network Layer
• Provides network-wide
addressing and a mechanism to
move packets between
networks (routing)
• Responsibilities:
– Network addressing – IP
addressing
– Routing-deciding which path
a packet will take from
source to destination.
• Example protocol:
– IP from TCP/IP
20
3
21. Network layer
The network layer is responsible for
the delivery of individual packets from
the source host to the destination host.
21
22. 3-22
Transport vs. network layer
• Network layer: logical
communication
(connection) between hosts
• Transport layer: logical
communication between
processes
– Relies on, enhances, network
layer services
Household analogy:
12 kids sending letters to 12
kids
• Processes = kids
• App messages = letters in
envelopes
• Hosts = houses
• Network-layer protocol =
postal service – delivers
message to host.
• Transport protocol = ann and
bill – delivers message to
correct recipient (kid)
23. 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.
23
24. Data link layer
The data link layer is responsible for
moving frames from one hop (node) to
the next.
24
25. Sub-layers of the Data Link Layer
a) MAC (Media Access Control)
– Gives data to the NIC
– Controls access to the shared media through:
• CSMA/CD Carrier Sense Multiple Access/Collision Detection
• Token passing
b) LLC (Logical Link Layer)
– The Logical Link Control layer controls frame
synchronization, flow control and error checking.
• Flow control – matching data rate of sender and receiver e.g
slowing down transmitter if too fast for receiver
• 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 request the sender to
resend that particular packet.
25
26. Physical Layer
• Determines the specification for
all physical components
– Transmission medium e.g wireless,
fiber, coaxial, twisted pair
– Cable specifications, cable
connectors, connectors pin layout
– Data encoding (bits to waves) -
modulation or demodulation
– Electrical properties
• Example protocols (layer 1 and 2 ):
– Ethernet (IEEE 802.3)
– Token Ring (IEEE 802.5)
– Wireless (IEEE 802.11a/b/g/n)
26
3
27. Physical layer
The physical layer is responsible
for the movement of individual bits
from one hop (node) to the next.
27
28. Physical Layer (cont’d)
• 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
• Fiber Optic
• Coax Cable
28
29. How Does It All Work Together
• 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.
29
2
30. Data Encapsulation In TCP/IP
• At each layer in the TCP/IP protocol stack outgoing data is
packaged and identified for delivery to the layer
underneath
• PDU – Packet Data Unit – the “envelop” information
attached to a packet at a particular TCP/IP protocol by
adding a header and/or trailer
30
35. Remembering the 7 Layers
7 - Application All
6 - Presentation People
5 - Session Seem
4 - Transport To
3 - Network Need
2 - Data Link Data
1 - Physical Processing
35
36. TCP/IP 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 an agency of the U.S. Department of Defense
• Has four layers.
36
37. 4 layers of the TCP/IP model
• Layer 4: Application
• Layer 3: Transport
• Layer 2: Internet
• Layer 1: Network access
37
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.
38. 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.
38
39. The internet layer
• Send source packets from any network on the
internetwork and have them arrive at the
destination independent of the path and networks
they took to get there.
– Packets, logical addressing.
– Internet protocol (IP).
– Routing: routing table, routing protocol.
39
40. Transport layer
• Allows end-to-end communication
• Connection establishment, error control, flow control
• Two main protocols at this level
– Transmission control protocol (TCP),
• Connection oriented
– Connection established before sending data
– Reliable
– user datagram protocol (UDP)
• Connectionless
– Sending data without establishing connection
– Fast but unreliable
40
41. The application layer
• Handles high-level protocols, issues of representation,
encoding, and dialog control.
• The TCP/IP combines all application-related issues into one
layer, and assures this data is properly packaged for the next
layer.
– Example protocols: FTP, HTTP, SMNP, DNS
– Format of data, data structure/syntax, encode
– Dialog control, session management
41
43. Protocols at the application layer
• HTTP:
– browser and web server communication
• FTP :
– file transfer protocol
• TELNET:
– remote login protocol
• POP3: Retrieve email
– POP3 is designed to delete mail on the server as soon as the user has
downloaded it
• IMAP (Internet Message Access Protocol )
– Retrieve emails,
– retaining e-mail on the server and for organizing it in folders on the
serve
43
44. Protocols at the transport layer
• Transmission control protocol (TCP),
–Connection oriented
»Connection established before sending data
»Reliable
• user datagram protocol (UDP)
–Connectionless
»Sending data without establishing
connection
»Fast but unreliable
44
45. Protocol at the network layer
• IP
– Path selection
– routing and addressing
• ICMP (Internet Control Message Protocol )
– sends error messages relying on IP
• a requested service is not available
• a host or router could not be reached
45
46. Protocols at the link layer
• Ethernet
– Uses CSMA/CD
• Token Ring
46
47. Data Formats
47
Application data
data
TCP
header data
TCP
header data
TCP
header
data
TCP
header
IP
header
data
TCP
header
IP
header
Ethernet
header
Ethernet
trailer
application
layer
transport
layer
Internet
layer
Network
Access
message
segment
packet
frame
48. Comparing TCP/IP with OSI
48
OSI Model TCP/IP Hierarchy Protocols
7th
Application Layer
6th
Presentation Layer
5th
Session Layer
4th
Transport Layer
3rd
Network Layer
2nd
Link Layer
1st
Physical Layer
Application
Layer
Transport Layer
Internet Layer
Network Access
Layer
Network Access : includes device driver and network interface card
Internet: : handles the movement of packets, i.e. Routing
Transport : provides a reliable flow of data between two hosts
Application : handles the details of the particular application