FUNDAMENTALS OF DATA
COMMUNICATIONS
EGE203 – Topic 2
Topic 2 - Learning Outcomes 2
Student 1will be able to describe how data communications work and
identify the network layers using the Open Systems Interconnect
(OSI) seven-layer model together with the TCP/IP model
Application Application
Presentation Transport
Session Internet
Network Access
Transport
Network
Data Link
Physical
Topic 2A (Week #1) 3
~~ Data Communications
Concepts and Techniques ~~
What is a Network? 4
https://www.youtube.com/watch?v=6wDsLHPDVzM
In the simplest form, a network is just 2 or more computers
connected together to share resources with one another.
In this section, we will look at how data communications take place.
Data Communications 5
• Data exchange between 2 devices through a transmission medium
– Source device sends to Destination device
– Medium wired or wireless
• Need reliability and efficiency
• Applications include
– Search Engines
– Social Networks
– Entertainment Networks
– E-commerce e.g. banking, travel, shopping etc
Check out most popular sites
Data Communication Model
6
DESTINATION
TRANSMISSION SYSTEM
Wired (Fiber) or Wireless (Wifi/3G/4G LTE/5G)
SOURCE
Type of Transmission
7
• Data sent/received using a continuous waveform are Analog
• Data sent/received using 1 or 0 are Digital
– Data is discrete, either 1 or 0
• The world is moving from Analog Digital data transmission
– All MediaCorp channels using digital broadcast from Dec 2013
– Singapore on Digital TV since Jan 19. Most countries on digital
Finland/Sweden 2007, Switzerland/Germany 2008, U.S. 2015
Analog Transmission
8
Analog signal
Analog data
e.g. voice Telephone
Analog signal
Digital data
ADSL
e.g. from PC Modem
Modem
Modulator / demodulator
Convert digital data to analog signal (modulate) and vice versa
(demodulate)
Digital Transmission
9
Digital signal
Analog data
e.g. voice Codec
Digital signal
Digital data Digital
e.g. from PC Transmitter
e.g. Fiber
Codec
Coder / decoder
Convert analog data to digital signal (coder) and vice versa (decoder)
Data Rate
10
Also called the bit rate
Is the number of bits transmitted per second
Unit of measure is bits per second (bps)
Media Type Data Rate
YouTube HD video 10Mbps
SuperHD/4k Ultra HD 50Mbps
8k Ultra HD 90Mbps
Digital Bandwidth
11
How much data rate do you want?
Is it possible to have unlimited data rate?
All medium/technologies has LIMIT on amount of data it can carry
Medium copper cable/ glass fiber / wireless space
Technologies Wifi/ 3G / 4G LTE / 5G
Know the bandwidth to know which MEDIUM is BETTER
Unit of bandwidth : bits per second (bps)
Wired always faster than Wireless Best media Fiber
Data Rate – Broadband Connectivity
12
• Countries with the fastest average download speeds
– Every country racing to be faster
– World’s average keeps improving, download speed @66Mbps
(Aug19)
Source: https://worldpopulationreview.com/country-rankings/internet-speeds-by-country
Source: https://www.speedtest.net/insights/blog/2018-internet-speeds-global/
Data Rate – Mobile Connectivity
13
• Internet connection using mobile network (4G technologies)
– Mobile speeds increased >15% in 2018
– World average keeps improving, download speed @28Mbps (Aug19)
2018 records
Internet Speeds – Most Improved Countries
14
2018 records
Data Rate – iOS vs Android
15
• Apple devices were faster than Android in 2018
– Possibly as Android devices are more popular in emerging markets (BRICS, Mexico,
Turkey) where internet speeds tend to be slower
2018 records
Number Systems
16
• Decimal Number System (Base 10)
– Most commonly used by humans
– We can count 0,1,2,3,4,5,6,7,8,9 easily
– Powers of 10
• Binary Number System (Base 2)
– Computers only understand 0 and 1
– Powers of 2
Number Systems
17
Dec Hex Bin
• Computers also like Hexadecimal Number System (Base 16) 0 0 0000
– 16 symbols 1 1 0001
2 2 0010
– 0 - 9, A, B, C, D, E, F
3 3 0011
– Powers of 16 4 4 0100
5 5 0101
– 1 hexa digit represent 4 binary digits 6 6 0110
7 7 0111
– Make writing large binary numbers easier 8 8 1000
9 9 1001
• E.g. 0010 0001 0000 0010 0x 2102
10 A 1010
11 B 1011
12 C 1100
– What number comes after 0x1F? 13 D 1101
• 0,1,2,3…8,9,A,B..E,F,10,11,12..18,19,1A,1B..1F,??? 14 E 1110
15 F 1111
Bits and Bytes
18
Bit short form for Binary digIT
Either 0 or 1
Binary 0 0 volts of electricity
Binary 1 +5 volts of electricity
8 bits = 1 byte
1 byte 1 character
E.g. The word ‘Hello’ has 5 bytes
Many bytes
We are now into Terabytes (TB)
Base 10 Decimal System
19
Uses ten digits 0,1,2,3,4,5,6,7,8,9
E.g, the decimal number 6,357 has four digits.
The 7 is filling the 1s place
The 5 is filling the 10s place
The 3 is filling the 100s place
The 6 is filling the 1,000s place resulting in
(6 * 1000) + (3 * 100) + (5 * 10) + (7 * 1) = 6000 + 300 + 50 + 7 = 6357
Use powers of 10
(6 * 103) + (3 * 102) + (5 * 101) + (7 * 100) = 6000+300+50+ 7 = 6357
Start with 100 and increase the power by 1 for each number.
Base 2 Binary System
20
Uses 0 or 1
Uses powers of 2
27 26 25 24 23 22 21 20
↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓
128 64 32 16 8 4 2 1
_ _ _ _ _ _ _ _
E.g. 1 0 0 0 0 0 0 1 128 + 1 = 129
Review Questions
21
1. Which is the fastest network media?
a) Fiber optic cable
b) Phone cable
c) Wireless
2. Which number system is used by computers?
a) Binary
b) Decimal
c) Hexadecimal
d) Octal
Week #2: Lesson Objectives 22
1 2
Describe network Identify and able to configure
communications using the valid IP addresses using the
ISO-OSI model (Topic 2B) IPv4 Addressing Scheme
(Topic 5A)
Topic 2B – ISO-OSI Model (Part 1) 23
~~ ISO-OSI Reference Model (Part 1) ~~
Those were the days…
24
• Mid-1960s
– Uses BIG Mainframe computers
– They are standalone machines
– Computers from different manufacturers cannot talk
• 1969 – ARPANET (Advanced Research Projects Agency Network)
– Sponsored by DOD (US MINDEF)
• Want indestructible network
• 1st success : Connected 4 U.S. universities
• 1973 – Somewhere else, development of TCP/IP started
– Open standard; free for all to use
Those were the days…
25
• 1975 – AT&T created the UNIX OS
– Gave free source code to universities
• 1983
– UC Berkeley added TCP/IP into its UNIX BSD 4.2
• Help popularize networking
– TCP/IP becomes official protocol for ARPANET
• Internet Today
– Made up of many WAN and LANs
– Runs on TCP/IP
– Run by private companies (ISPs), not the government
OSI Model
26
Networks grew and grew in early 1980s
Network vendors ‘do as they like’
No standards to follow; different implementations
Incompatibility between different vendors
Open Systems Interconnection reference model
Introduce in 1984 by ISO
ISO is International Organization for Standards
To solve this inoperability issue
Break network communications into smaller parts
Consists of 7 separate but related layers
Each layer defines its network function
A teaching model to understand how info travels through a
network
OSI Model – 7 Layers
27
28
Let’s Fast Forward to IP Addressing in the Network Layer
29
Topic 5A Application
Presentation
We will come back later…
Session
Transport
Network
Data Link
Physical
Topic 2C – ISO-OSI Model (Part 2) 30
~~ ISO-OSI Reference Model (Part 2) ~~
Recap on OSI-Model
31
Application
Let’s take a high-level peek Presentation
on each layer…
Session
Transport
Network
Data Link
Physical
Layer 7 – Application Layer
32
A starting point
For user to access network using apps/services
Data is generated
Web Browsers: Chrome, IE, Mozilla, Opera, Safari
Transfer info on Internet; browsing Web sites
Instant Communication/Messaging : WhatsApp, Skype, QQ
Real-time instant communication
Internet Mail: Gmail, Outlook, Yahoo
Store & send mail messages/attachments
File Download: IE, WS_FTP, CuteFTP
Download/Upload files
Layer 6 – Presentation Layer
33
Data Translation
Change data into ASCII code
Data Compression
Reduce no. of bits in info
Especially for sending video and audio
Data Encryption
For private & sensitive info ( e.g. credit card no.)
Layer 6 is usually used in programming
Layer 5 – Session Layer
34
Dialog control
Keep track of whose turn to transmit
Send 2-ways at the same time (full-duplex)
Send 1- way at a time (half-duplex)
Synchronization between systems
Add checkpoints into data stream
Layer 5 is usually used in programming
Layer 4 – Transport Layer
35
Use between end-to-end systems!
Chops long data into smaller segments so that data arrive
correctly and in order
Has Error control
Use CRC [Cyclic Redundancy Check] checksum to check for errors
Resend on error
Has Flow control
Negotiate data rate before transmission
Prevent receiver being overwhelmed by data
Layer 4 – Transport Layer
36
From Session Layer
L5 Data (How are you?)
Header info (H4) Data 1 (How) H4 Data 2 (are) H4 Data 3 (you?)
L4 Data (H4 + Data1) L4 Data (H4 + Data2) L4 Data (H4 + Data3)
To network layer
Layer 3 – Network Layer
37
• PC A wants to send message to PC X
– How to send? Which path to take?
A
R4
R2
B SW
R6
X
R1
R3 R5
Layer 3 – Network Layer
38
Which path to take?
Layer 3 – Network Layer
39
Routers belong here!
Routers are like MRT stations
They connect different LANs
Routers choose BEST path to send packets
Use IP addresses e.g. 10.20.30.168
Best path depends on
Hop Count
Bandwidth
Load
Reliability
Cost More of this later on…
Layer 2 – Data Link Layer
40
Link
Link
Link
Link Link
Data Link Data Link Data Link
End-to-End (Transport layer)
Layer 2 – Data Link Layer
41
Use between link-to-link!
Responsibility: Provides reliable data transmission across
link; same as Transport layer 4
Include MAC addresses into frames
Has Flow control
Both Sender and Receiver MUST negotiate
Ensure receiver not overwhelmed by too much data
Has Error control
Use CRC checksum to check for errors
Resend damaged/ lost frames
Layer 1 – Physical Layer
42
Think of cables!
Uses bits (0s & 1s) to send data
Focus on mechanical & electrical specifications
Voltage level [5V = 1 bit, 0V = 0 bit]
Data rate [data sent out at 10bits/sec]
Type of connectors [RJ45?]
Max transmission distance
Transmission mode
Simplex [one way communication; TV distribution]
Half-duplex [can send/receive but not at the same time]
Full-duplex [can send/receive at the same time; telephone line]
Data Encapsulation
43
Types email: How are you?
Data: How are you?
Segment1, Segment2, Segment3
Packet1, Packet2, Packet3
Frame1, Frame2, Frame3
Bit 0001110000
44
Data Encapsulation Example
45
At Application Layer 7 :
Data L7 Data (How are you?)
At Transport Layer 4 :
So that we can get take the
Segments 1 Data (How) 2 Data (are) 3 Data (you?)
data stream and sequence it
in order
At Network Layer 3 : To Network layer So that we can tell the
Packets IP 1 Data (How) IP 2 Data (are) IP 3 Data (you?) network packet where to
route
At Data Link Layer 2 : So that we can take
To DataLink layer the packet and place
Frames MAC IP 1 Data (How) MAC IP 2 Data (are) MAC IP 3 Data (you?)
them in the correct
network medium
At Physical Layer 1 :
To Physical layer
Bits 01000111010100010100010101000101010101010
46
Layer Protocol
Data Unit
Function
OSI-Model
(Recap)
Application High-level APIs, Application Services
Presentation Data Data Representation and Encryption
Session Managing communication sessions
Transport Segments End to end transmission of data
segments between network points
Network Packets Addressing, routing and traffic control
etc. (Logical Addressing)
Data Link Frames Reliable transmission of data frames
(Physical Addressing)
Physical Bits Transmission and reception of raw bit
streams via media, signal or binary
transmissions
Review Questions
47
1. What is the main function of the transport layer?
a) Find out which way to take to deliver message to destination
b) Let user generate data to send
c) Ensure data delivered correctly from sender to receiver
d) Use cables to send data
2. As a data packet moves from Application to the Physical layer,
extra info called headers are _________.
a) Added
b) Subtracted
c) Rearranged
d) Modified
48
~~ TCP/IP Model ~~
TCP/IP Model
49
• OSI Model is a Teaching Model
– International standard set in 1980s
– 7 layers to describe how network operates
• TCP/IP Model is a Working Model
– Tested successfully on the Internet in 1970s, before OSI was
created
– Uses protocols (rules)
• 4 layers to describe the various protocols
TCP/IP vs OSI Model
50
7 Application
6 Presentation 4 Application
5 Session
4 Transport 3 Transport
3 Network 2 Internet
Data Link
2
1 Network Access
1 Physical
OSI Model TCP/IP Model
TCP/IP Protocols
51
Application HTTP/
FTP DHCP DNS SMTP TELNET
HTTPS
Transport TCP UDP
Internet IP RARP ARP ICMP IGMP
Network
e.g. Cable (Ethernet/ADSL…), Fiber, Wireless
Access
Review Questions
52
1. How many layers are there in the TCP/IP model?
a) 4
Note: 4 layers is for the original TCP/IP model
b) 5
c) 6 In the second version TCP/IP model, it got 5 layers
d) 7 (Application, Transport, Network, Data-Link, Physical)
Source: https://www.ccnahub.com/ip-fundamentals/understanding-tcp-ip-and-osi-models/
2. Application, Presentation & Session layers in the OSI model is merged
into ____ layer in the TCP/IP model.
a) Application
b) Transport
c) Internet
d) Network Access