Lecture 2 - Concepts of Computer Communication Models
Lecture 2 - 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
Japanese?
Language Language
English?
Communication media
Cassette
AV Component
All functions are included in
Player
one cassette.
Speaker
Replace all when changing
Amplifier
6
Example of layering (2)
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
...
H2 ... Layer 2 Layer 2 H2 ...
...
• 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
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
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
Transport Transport
19
Implementing the layering system
End systems (server, PC,
smartphone...)
20
Triển khai kiến trúc phân tầng
Intermediate router
21
Triển khai kiến trúc phân tầng
Intermediate switch
22
Protocol stack of TCP/IP ...
• End systems
• Different on different
applications
HTTP HTTP
TCP TCP
IP IP IP
IP header IP IP
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
Dữ liệu - payload
29
Protocol stack and
encapsulation
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
FTP FTP
TCP TCP
IP IP IP IP
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
[email protected]
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
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
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
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
54
Nslookup tool on Windows, Linux
nslookup www.hedspi.hut.edu.vn
Conversion “name IP address”
Non-authoritative answer:
Name: www.hedspi.hut.edu.vn
Address: 202.47.142.140
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
56
Example: ARP table
(on Windows)
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