Lecture 2:
Basic concepts of computer
communication models
1
Last lecture
Introduction of the course
History of the Internet
Concept of Computer Networks
Some fundamental concepts: switching,
connection oriented, connection less.
2
Content of this lecture
Layer architecture
OSI & TCP/IP reference model
Addressing
Domain name and conversion/resolution of
domain name
3
Layer architecture
4
Example of different functionalities in human
communication
Sender Receiver
Information to
Received information
be sent
Present from idea to speak
Japanese?
Language Language
English?
Communication media
Mail? The communication will be
Telephone?
performed smoothly if
E-mail?
each layer use the same 5
communication mean
Example of layering (1)
Layered Not layered
Cassette
AV Component
All functions are included in
Player
one cassette.
Speaker
Replace all when changing
Amplifier
6
Example of layering (2)
ticket (purchase) ticketing service ticket (complain)
baggage (check) baggage service baggage (claim)
gates (load) gate service gates (unload)
runway takeoff runway service runway landing
airplane routing routing service
airplane routing airplane routing
layers: each layer implements a service
via its own internal-layer actions
relying on services provided by layer below
Why layering?
Dealing with complex systems: Divide and
conquer
Explicit structure allows identification, relationship
of complex system’s pieces
Modularization eases maintenance, updating of
system
change of implementation of layer’s service
transparent to rest of system
e.g., change in DVD player does not impact
sound speakers.
8
Data Encapsulation
Data encapsulation is similar to a packaging process for a gift.
Packaging
Decoration
Put address
address address
9
Data transmission in layering
systems
Sender: add the header containing information for processing data
at that layer and forward to the below layer (Đóng gói dữ liệu –
Encapsulation)
Receiver: process data by reading the right header, remove the
header and forward to the upper layer
PDUN Layer N Layer N PDUN
HN-1 Layer (N-1) Layer (N-1) HN-1
...
...
H2 ... Layer 2 Layer 2 H2 ...
H1 ... Layer Layer 1 H1 ...
addr.
Sender Receive 10
Protocol stack
Functions are splitted to layers
Each layer has multiple ways to implement Protocols of
its functions multiple protocols layer N
Protocol stack: stack protocols based on Protocols of
layering systems layer N-1
Protocols at each layer include:
...
• Call a service of the below layer
• Provide service(s) for the upper layer Protocols of
layer 2
Protocols of
layer 1
11
Data transmission in layering systems
Protocol PN
Layer N Layer N
Protocol PN-1
Layer (N-1) Layer (N-1)
...
...
Protocol P2
Layer 2 Layer 2
Protocol P1
Layer 1 Layer 1
Layers (same level) on each side use the same protocol
to exchange logical information
Two way to communicate logical information at the same logical
level: connectionless or connected-oriented
12
Connection oriented transmission
vs. connectionless
Connection oriented transmission:
Data are transmitted over a connection already
established
3 working phases: Establishing a connection, data
transmission, teardown the connection.
Reliable
Connectionless transmision
No connection establishing phase
Only data transmission phase
Not reliable - “Best effort”
13
Reference models
OSI
TCP/IP
14
OSI - Open System Interconnection: 7
layers
Application layer Tầng ứng dụng
Presentation layer Tầng trình diễn
Session layer Tầng phiên
Transport layer Tầng giao vận
Network layer Tầng mạng Tầng mạng
Data link layer Tầng liên kết dữ liệu
Physical layer Tầng vật lý
Intermediate nodes End system
End system
15
The main functionality of each
layers
Physical layer: Transfering bits “over medium”
Datalink layer: Transfering data between direct
connected elements in the networks. application
Network layer: Routing, forwarding data from presentation
the source to the distant destination
session
Transport: Transmitting data between
applications transport
Session : synchronization, check-point, recovery network
of transmission process data link
Presentation: data encoding, compression, data physical
conversion…
Application: Supporting communications
between distant parts of an application.
16
Models OSI and TCP/IP
In the TCP/IP model of the Internet, the
functionalities of 3 first layers are combined in
a single layer.
Application layer
Application
Presentation layer HTTP, FTP, SMTP…
Session layer
Transport layer TCP UDP
Network layer IP
Datalink layer Network Interface
Physical layer Physical
17
ISO/OSI reference model
Two layers not found in Internet
protocol stack! application
presentation: allow applications to interpret presentation
meaning of data, e.g., encryption, session
compression, machine-specific conventions
transport
session: synchronization, checkpointing,
network
recovery of data exchange
link
Internet stack “missing” these layers!
• these services, if needed, must be physical
implemented in application
The seven layer OSI/ISO
• needed? reference model
Implementing the layering system
Application Application
Transport Transport
Network Network Network
Datalink Datalink Datalink Datalink Datalink
Physical Physical Physical Physical Physical
End-system Intermediate node End-system
End-systems: PC, server, smartphone...
Intermediate node: Hub, Switch, Router
19
Implementing the layering system
End systems (server, PC,
smartphone...)
Applications provide services
for users PC
Control data transmission
between applications
Routing, forwarding data
Control data transmission on
physical connections
Convert data to physical Server
signal and transfer
20
Triển khai kiến trúc phân tầng
Intermediate router
Applications provide services
for users PC
Control data transmission
between applications
Routing, forwarding data
Control data transmission on
physical connections
Convert data to physical Server
signal and transfer
21
Triển khai kiến trúc phân tầng
Intermediate switch
Applications provide services
for users PC
Control data transmission
between applications
Routing, forwarding data
Control data transmission on
physical connections
Convert data to physical Server
signal and transfer
22
Protocol stack of TCP/IP ...
Aplication DNS DHCP SNMP HTTP SMTP FTP
Transport UDP TCP
ICMP RIP OSPF ...
Network IP
Ethernet FDDI PPP DSL ARP ...
Data link
Physical Copper Optical Radio PSTN ...
23
Protocol stack of TCP/IP
“Hourglass”: only use IP – Internet Protocol at the
network layer:
Allow a network use a new technology and connect to an existing
one
Separate developing applications from technologies of lower
layers
IP-based application: VoIP...
Support parallel modifications/ upgrading on both upper and
lower layers
However, it is extremely hard to upgrade to a new IP
version (converting IPv4 to IPv6)
24
Install TCP/IP on networks
• End systems
• Different on different
applications
• Same as every nodes IP
• Same as every nodes
• Different at different
physical connections
25
Layering model of the Internet
Example of data transmission from a source to a
destination through intermediate nodes (router)
HTTP HTTP
TCP TCP
IP IP IP
Ethernet/10M 10M 100M 100M/Ethernet
CAT5 CAT5 CAT5 CAT5
Source Intermediate nodes Destination
26
The protocols TCP/IP and encapsulation
process
At sender
Each layer add control information to the header of
packet and transfer to the lower layer.
At receiver
Each layer process packet according to the information
of the header, then remove the corresponding header
and deliver the remaining data to the upper layer.
Ex:HTTP header
Application Application
Data Data
TCP header TCP TCP
IP header IP IP
Ethernet Frame Network Interface Network Interface
Physical Physical
Signal 27
Sender Receiver
source
Encapsulation:
message
segment Ht
M
M
application
transport
an end-end view
datagram Hn Ht M network
frame Hl Hn Ht M link
physical
link
physical
switch
destination Hn Ht M network
M application Hl Hn Ht M link Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
Dữ liệu - payload
29
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
TCP header Dữ liệu - payload
30
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
IP header TCP header Dữ liệu - payload
31
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
Ethernet header IP header TCP header Dữ liệu - payload
32
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
IP header TCP header Dữ liệu - payload
33
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
WDM header IP header TCP header Dữ liệu - payload
34
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
IP header TCP header Dữ liệu - payload
35
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
Ethernet header IP header TCP header Dữ liệu - payload
36
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
IP header TCP header Dữ liệu - payload
37
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
TCP header Dữ liệu - payload
38
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
Ethernet/10M 10M 10G 10G Ethernet/100M
CAT5 CAT5 WDM WDM CAT5 CAT5
End node Intermediate node End node
Dữ liệu - payload
39
Summary: Advantage of layering
architecture
Layering architecture allows to divide the
functionalities of networks into small components
Layers are independent:
An upper layer makes use of the functionality of its right
bellow layer but does not care about further layer.
Extensibility/Scalability
Flexible
It is possble to upgrade the communication system by
upgrading the technology of some layers: Ex:
ADSL→FTTH
IPv4→IPv6
Without layering:
Any change in the system requires changing the whole
systems.
40
Identification in the
Internet
MAC Address
IP Address
Port number
41
Identification
Identification allows identify a person or
an object
Name
Nguyen Thuc Hai
Address
1 Dai Co Viet, Hai Ba Trung, Ha Noi
Telephone number
8680896
Email
hai--xxx@it.hut.edu.vn
42
Identification
Identification usually has hierarchical structure
Allow to manage efficiently a large addressing space
Scalability
Example of hierarchy
Address
Hanoi
1 Dai Co Viet street, Hai Ba Trung district, Ha Noi
Telephone number
Hai Ba Trung
+84-(4) 868-08-96
Dai Co Viet
So 1
43
Identification in the Internet and
the relationship between layers
application Domain name
TCP/UDP Port Number, e.g. Port 80
IP IP address, e.g. 203.12.15.165
data link Physical address / MAC address
e.g. 00:11:24:79:8e:82
physical
44
Addressing in the Datalink layer
Physical address/ MAC address
Using in Datalink layer
Fixed on NIC (Network Interface Card)
Used for identifying machine in broadcast network
segment.
HEX
BIN
00:11:24:79:8e:82
00000000 00010001 00100100 01111001 10001110 10000010
OUI Assigned by manufacture
OUI (Organizationally Unique Identifier):
Each Manufacture have an some OUI unique
45
Addressing in the Internet
IP address
Used in IP-Internet Protocol (network layer)
Value depends on the networks. Each network
interface card should be assigned an IP address.
Used for identifying a machine in an IP network,
example:
133.113.215.10 (ipv4)
2001:200:0:8803::53 (ipv6)
46
Addressing in transport layer
Port number
On each machine, there may be several applications
running.
Applications of the same machine are distinguished by
port number.
An application instance in the internet is identified by the
IP address of the host and port number on which it runs
Similar to the address of a room in a building
Buiding address: B1 Building, 1 Dai Co Viet, Ha Noi =>
similar to IP address
Room number 325 => Similar to port number
E.g. HTTP runs on port 80, FTP runs on ports 20,
21 …
47
Mapping to address
Domain name
Domain name resolution
nslookup
arp
48
Domain name
Domain Name
(FQDN: Fully Qualified Domain Name)
Domain name is the name of a computer or a
network using alphabet and numbers
www.keio.ac.jp
www.hedspi.hut.edu.vn
.hut.edu.vn
49
Domain name space
.keio.ac.jp
pc24.cs.keio.ac.jp 50
Domain name and IP address
For sending data to a host/machine, the host must be
identified
By an IP address
By a domain name (easy to be memorized by human)
name
Variable length
easy to be memorized by human
Nothing to do with the location of the host
IP address
Fixed length (32 bits or 128 bits)
Computer process address more easily
Used for routing purpose
203.162.7.194 www.hedspi.hut.edu.vn
51
www.hust.edu.vn 202.47.142.40
Conversion/resolution of address
• Computer prefers numbers
• Human prefers names I want to see the webpage
www.hust.edu.vn
User
Need address conversion Need to access to
202.47.142.40
Domain name server
If user knows the IP address of
Webserver of
www.hust.edu.vn the webserver, he can access 52
202.47.142.40 via IP address from Browser
Address resolution/conversion
Concept
Mechanism finding address IP from a domain name and
vice versa.
There is no mathematical formula for this conversion.
Domain name server (DNS)
Store the mapping of IP address and Domain name of
the same host in a database
Answer requests of resolution of IP or domain name from
users.
Widely used in the Internet
53
Example
User
(1)
www.hedspi.hut.edu.vn
(2)
www.hust.edu.vn
DNS Web browser
(3)
202.47.142.40 (4) 202.47.142.40
Web server
Provide mapping IP-domain name
54
Nslookup tool on Windows, Linux
nslookup www.hedspi.hut.edu.vn
Conversion “name IP address”
C:\Documents and Settings\hongson>nslookup www.hedspi.hut.edu.vn
Server:
Address: 192.168.1.1
Non-authoritative answer:
Name: www.hedspi.hut.edu.vn
Address: 202.47.142.140
C:\Documents and Settings\hongson>
55
ARP Conversion of Mac address
and IP address
Address Resolution Protocol
MAC and IP are both used for identifying a NIC.
ARP allows to find MAC address from IP address
32bit IP address
ARP RARP
48bit MAC address
56
Example: ARP table
(on Windows)
C:\Documents and Settings\hongson>arp -a
IP address
Interface: 192.168.1.34 --- 0x2
Internet Address Physical Address Type
192.168.1.1 00-02-cf-75-a1-68 dynamic
192.168.1.33 08-00-1F-B2-A1-A3 dynamic
C:\Documents and Settings\hongson>
MAC address
57
Summary
Layer architecture
Why layering
Model TCP/IP vs. Model OSI
Encapsulation, PDU. SAP
Addressing on Internet
Adress IP, MAC, domain name, port
Address conversion
58
Quizz
59