Protocols & Models
DAT230 – Communication Technology I
Naeem Khademi
Associate Professor, IDE/UiS
naeem.khademi@uis.no
1
Communication Rules
• Physical connection between devices is insufficient!
We need to have agreed upon established “rules” on
how to communicate!
– Thee major elements: source/sender,
destination/receiver, media/channel
• Protocols: set of rules that communicating entitied
will follow
– Different protocols = different rules
– E.g., Message format should follow mutually agreed
rules!
• Protocols must account
for these requirements:
a) An identified
sender/receiver
b) Common language and
grammar
c) Speed and timing of
delivery
d) Confirmation
(acknowlegement)
requirements 2
Network Protocol Requirements
A network protocol should specify the following:
– Message encoding: convering information to another acceptable form
for transmission; decoding is the reverse process at the receiver
Letter format/encap.
– Message formatting and encapsulation: specific format/structure;
depend on the message type and used channel
– Message size: data has to be split into smaller chunks to be carried on
the medium as bits (carried as as light, sound, or electrical pulses)
– Message timing includes the following:
• Flow control: manages transmission rate; how much information can be
received; avoid overwhelming the receiver!
• Response timeout: how long to wait if there is no reply from the destination
• Access method: determine when to send a message! Rules concerning
cross-talking (i.e., “collisions”) of two senders using the same communication
medium – some protocols prevent collisions (”collision avoidance (CA)”) and
some recover from collisions (“collision detection (CD)”)
– Message delivery options: unicast (one to one), multicast (one to
many), broadcast (one to all)
IPv6 packet header format
• NOTE: broadcasts used in IPv4 only but not IPv6. ”Anycast” as an additional
IPv6 option
Message segmentation and size
3
Network Protocol Overview
• Network protocols: defines a common set of rules for communication
– Can be implemented in software, hadrware or both!
– Protocols have their own function, format and rules
Sample Protocol Type Description
Network Communications enable two or more devices to communicate over one or more networks
Network Security secure data to provide authentication, data integrity, and data encryption
Routing enable routers to exchange route information, compare path information, and
select best path to forward data
Service Discovery used for the automatic detection of devices or services
• Network protocol functions:
Sample Function Description
Addressing Identifies sender and receiver
Reliability Provides guaranteed delivery
Flow Control Ensures data flows at an efficient rate
Sequencing Uniquely labels each transmitted segment of data
Error Detection Determines if data became corrupted during transmission
Application Interface Process-to-process communications between network applications
4
Network Protocol Suites
• Protocol suites/stack: protocols must be
able to work with other protocols.
– A group of inter-related protocols
necessary to perform a communication
function
– Sets of rules that work together to help
solve a problem
– Viewed in terms of abstraction layers
– Network layers should either have different
scopes or provide different functionalities
within the same scope.
– Lower layers are serving higher layers
L5 L5
L4 Scope C L4
L3 Scope B L3 Scope B L3
L2 Scope L2 Scope L2 Scope L2 Scope L2
L1 A L1 A L1 A L1 A L1
Host A ? ? ? Host B 5
Why “layering” approach to the network model?
• Separation: breaking a bigger task (data communication) into smaller tasks (i.e., functions)
• Abstraction: changes to one layer minimizes the impact on other layers
• Design: easier to implement functions/protocols as long as interconnection between
layers are kept intact.
• Complexity: easier to learn, troubleshoot, and standardize
Protocol Function
Hypertext § Governs the way a web server and a web client
Transfer Protocol interact
(HTTP) @L5 § Defines content and format
Transmission § Manages the individual conversations
Control Protocol § Provides guaranteed delivery
(TCP) @L4 § Manages flow control
Internet Protocol Delivers messages globally from the sender to the
(IP) @L3 receiver Physical (L1)
Ethernet @L2 Delivers messages from one NIC to another NIC on the
same Ethernet Local Area Network (LAN)
6
TCP/IP vs OSI Model
Open Systems Vint Cerf and Robert
Interconnection (OSI) Kahn (1974); standards
by ISO & ITU maintained by the IETF
Developed/adopted
Late 70’s, early 80’s
Packet Pushers
7
TCP/IP vs OSI Model
A program (application) using the network through an
application layer protocol for process-to-process
communication -- e.g., Internet browser, Gaming app,
Spotify client software
Presentation layer: Translation of data between a networking
service and an application; including character encoding, data
compression and encryption/decryption
Session layer: Managing communication sessions, i.e., continuous
exchange of information in the form of multiple back-and-forth
transmissions between two nodes
segments
Transport layer: Reliable end-to-end communication for
messages
services/applications, with flow control, multiplexing and connection-
oriented communication
Network layer: Multi node/network data transfer, with network
packets
addressing, routing and traffic control
Datalink layer: Reliable transmission of data frames between two frames
nodes connected by a physical layer
Physical layer: Raw bit streams over physical transmission bits
medium
Controls the hardware devices and media
access that make up the network. 8
TCP/IP Protocol Suite
• TCP/IP: free and open standard protocol suite
(remember the IETF!) for any vendor and user!
• Endorsed by standards organizations and networking
industry to ensure interoperatability
(1) Web server encapsulating
Source: Nadav Ivgi, Medium.com
(2) Client decapsulating
9
Standards Organizations (#1)
• Open standards encourage:
– interoperability
– competition
– innovation
• Standards organizations are:
– vendor-neutral
– non-profit organizations
– established to develop and promote the concept
of open standards. Source: Nadav Ivgi, Medium.com
Internet Standards:
– Internet Society (ISOC): promotes the open
development and evolution of internet
– Internet Architecture Board (IAB): responsible
for management and development of internet
standards
– Internet Engineering Task Force (IETF): develops,
updates, and maintains Internet and TCP/IP
technologies
– Internet Research Task Force (IRTF): focused
on long-term research related to the Internet and
TCP/IP protocols 10
Standards Organizations (#2)
Internet Standards: IANA and ICANN
– Internet Corporation for Assigned Names and
Numbers (ICANN): coordinates IP address
allocation, the management of domain names,
and assignment of other information
– Internet Assigned Numbers Authority (IANA):
oversees and manages IP address allocation,
domain name management, and protocol
identifiers for ICANN Source: Nadav Ivgi, Medium.com
Electronic and Communications Standards:
– Institute of Electrical and Electronics Engineers (IEEE, pronounced “I-triple-E”) -
dedicated to creating standards in power and energy, healthcare,
telecommunications, and networking
– Electronic Industries Alliance (EIA) - develops standards relating to electrical wiring,
connectors, and the 19-inch racks used to mount networking equipment
– Telecommunications Industry Association (TIA) - develops communication
standards in radio equipment, cellular towers, Voice over IP (VoIP) devices, satellite
communications, and more
– International Telecommunications Union-Telecommunication Standardization
Sector (ITU-T) - defines standards for video compression, Internet Protocol Television
(IPTV), and broadband communications, such as a digital subscriber line (DSL) 11
Data Encapsulation (#1)
Segmentation: breaking up messages into
smaller units to be carried by the network.
Multiplexing: processes of taking multiple
streams of segmented data and interleaving
them together. Example of HTTP/2 (L5) multiplexing
Benefits (when combined): for multistreaming
• increased speed: large amounts of data can be sent
over the network without tying up a communications Source: Nadav Ivgi, Medium.com
link
– No need to wait until the entire length of data is Sequencing example
ready (send asap)
– Other applications (streams) can access the
channel simultaneously
• increases efficiency: only segments which fail to
reach the destination need to be retransmitted, not
the entire data stream!
Sequencing: numbering the segments so they can be reassembled at the destination; TCP
(L4, transport layer) is responsible for sequencing individual segments
12
Data Encapsulation (#2)
• PDU: Protocol Data Unit
• During encapsulation each protocol add their
information to the data
• PDU at different stage/layer has different names
– e.g., L1 (bits), frame (L2), packet (L3),
segment/datagram (L4)
Source: Nadav Ivgi, Medium.com
• Encapsulation is a top-down process from higher
layer to the lower layer until reaching to bits!
• Decapsulation is a reverse process at the
receiver (the layer strips the header, and push
higher up the stack) until data is handed to the
application!
13
Data Access (#1)
• Addressing is needed both at the datalink and network layers to deliver data
from source to destination
• Datalink src/dst address: a.k.a MAC address used for delivering the datalink
frame from one network interface card (NIC) to another NIC on the same network.
scope: next-hop; physical; example: 00:A0:C9:14:C8:29
• Network src/dst address: used for delivering IP packets from original source to
destination; scope: end-to-end; logical; example: 203.0.113.42
• Transport src/dst port: application endpoints a.k.a ports. example: 80 (HTTP)
Source: Nadav Ivgi, Medium.com
• L3 logical address: contains two parts
• Network portion (IPv4) or Prefix (IPv6):
left-most part of the address; same in each
LAN/WAN
• Host portion (IPv4) or Interface ID (IPv6):
a unique remainder of the address
identifying a specific device
14
Data Access (#2)
• Network portion of the IP (L3) address will be
the same if src/dst are on the same network
• PC1 – 192.168.1.110
• FTP Server – 192.168.1.9
• Datalink (MAC) addresses are physically embedded
in the NIC (e.g., Ethernet or Wi-Fi NIC)
• MAC source and destination will ALWAYS be on the
same link, even if the ultimate decision is remote! Source: Nadav Ivgi, Medium.com
(i.e., always next-hop MAC)
• What if ultimate destination not on the same LAN Dmitry Nosachev, CC BY-SA 4.0, via Wikimedia Commons
(i.e., remote)?
• If src and dst have different
network portion => they’re on
different networks!
• PC1: 192.168.1.X
• Web Server: 172.16.1.X
15
Data Access (#3)
• When final destination is remote, L3 will
provide L2 with the local default gateway IP
address, aka “router address”
• The Default GW (DGW) is the router
interface IP address on the same LAN as
the sender and the “gateway” to other
remote destinations!
Source: Nadav Ivgi, Medium.com
• All LAN devices must know this address
else they’ll be confined to LAN
• One data is sent to DGW, it will be
forwarded to the actual destination – hence
L2 MAC addrs changes from link to link
while L3 addrs stay the same!
• L3 packet is not modified as data travels
across the end-to-end path (same IP addr
pairs), but frame changes (different MAC
addr pairs)!
16
Recap of Lecture #1!
Network security Cloud computing & Network trends Network architecture
Communication rules and net protocols Source: Nadav Ivgi, Medium.com
https://www.bmc.com/blogs/saas-vs-paas-vs-iaas-whats-the-difference-and-how-to-choose/
OSI and TCP/IP protocol suite
Why do we need layering?
L5 L5
L4 Scope C L4
L3 Scope B L3 Scope B L3
L2 Scope L2 Scope L2 Scope L2 Scope L2
L1 A L1 A L1 A L1 A L1
Host A ? ? ? Host B
L2 (MAC) and L3 (IP)
addresses, data
access, default
Network and Internet gateway, network and
standardization bodies device addresses,…
Data encapsulation 17
Q&A?
Source: https://imgur.com/fbrxjMk 18