Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

2-1 PROTOCOL LAYERING

Protocol Layering 協定和層有關


(協定分層 or 階層式協定)

1. Assign layers first, then define rules for each


layer
2. Protocol layering is a technique to simplify
networking designs
3. Functional layers, Layer’s task

Internet designed by Layer’s Task

= big 官僚系統

simplify Internet designs

≠ simplify Internet architecture

Protocol layering make it’s design easier


but make networking complicated!
2
2-1 PROTOCOL LAYERING

a protocol at each layer —> protocol layering

Dividing networking designs into functional layers

2.5

先分層

每⼀層定義⼯作規則與責任
層層上報,層層下達,效率不佳

7
位階對等

TCP Transmission Control Protocol TCP

Internet Protocol
IP IP

802.11 802.11
WiFi

9
2.1.1 Scenarios

Let us develop two simple scenarios to better


understand the need for protocol layering.

In the first scenario, communication is so simple that it


can occur in only one layer.

In the second, the communication between Maria and


Ann takes place in three layers.

2.6

10

Figure 2.1: A single-layer protocol

speech

communication medium
相反的動作

11
Figure 2.1: A single-layer protocol

communication medium change to “Mail”?

send/receive mail send/receive mail

Mail

12

Figure 2.1: A single-layer protocol

medium change to “Mail” and need to “Encrypt”?

Encrypt /Decrypt

send/receive mail Encrypt/Decrypt send/receive mail Encrypt/Decrypt

Mail

Too many jobs in a single-layer!

13
Single layer Protocol Protocol Layering

Listen/Talk
Listen/Talk/
Encrypt/
Encrypt/
Decrypt/Send
Decrypt
Mail/Receive
Mail
Send/Receive
Tasks Layer’s Tasks

14

Figure 2.2: A three-layer protocol


Protocol layering enables us to divide a complex task into
several smaller and simpler tasks.

Postal carrier facility

15
ASCII

16

2.1.2 Principles of Protocol Layering

(1) Each layer is able to perform two opposite tasks,


one in each direction.

(2) The two objects under each layer at both sites


should be identical.

19
2.1.3 Logical Connections

After following the above two principles, we can think


about logical connection between each layer.
This means that we have layer-to-layer communication.
logical connection (layer-to-layer)

20
Chapter 2
Network Models (part 3)

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Figure 2.4: Layers in the TCP/IP protocol suite

2
Why use Native Terms?
Transmission, Tranport, Transfer, Propagation

Link, Path, Connection, Bridge

Node, Host

2.2.1 Layered Architecture


In a small internet made up of three links, each with a
link-layer switch.

We also assume that the links are connected by one


router.
host or Destination
Link-layer (layer 2) Switch

路由器 or Layer-3 Switch


host or Source

Link = LAN (Local area network)

4
Link-layer (layer 2) Switch

可堆疊交換器 IP Sharing/WiFi AP/Switch

(Stackable Switch)

LAN

LAN
WAN

LAN

11
Figure 2.5: Communication through an internet

think about the logical connections


between layers jfhong.312@gmail.com
Subject: [A or B].⽇期.學號.231#draw

A Layer 2
Layer 3
A
T T
N N
D D
P signal
P

13

Figure 2.7: Identical objects in the TCP/IP protocol suite

Identical objects (messages)

Identical objects (segment or user datagram)

Identical objects (datagram) Identical objects (datagram)

Identical objects (frame) Identical objects (frame)

Identical objects (bits) Identical objects (bits)

16
Figure 2.8: Encapsulation / Decapsulation

Physical layer: no encapsulation/decapsulation

20

Frame

Datagram

21
通過 router 後貨運⾞(frame)
可以不同

frame
decapsulation
router with 4 interfaces

encapsulation

frame

但貨物(datagram)是
相同的

What is the data units encapsulated in a frame?


22

2.2.5

Another important concept related to protocol layering


in the Internet: addressing

Each layer has different


methods for addressing.

24
Figure 2.9: Addressing in the TCP/IP protocol suite

26

貨運⾞(frame)看不到貨物(datagram)內容
datagram
decapsulation 後才能看到
datagram 的 IP 資訊
frame

encapsulation

Routing Table

datagram

frame

28
Figure TCP/IP model

Application

29

You might also like