Internet Protocols-1.5 protocol layers, service models
1.5 protocol layers, service models
Protocol “layers”
- hosts
- routers
- links of various media
- applications
- protocols
- hardware, software
Layers: each layer implements a service
▪ via its own internal-layer actions
▪ relying on services provided by layer below
分层的结果:每层实现一个服务。服务通过内层的行动来实现,同时依赖着下一层提供的服务。
1.5.1 Why layering?
dealing with complex systems:
▪ explicit structure allows identification, relationship of complex system’s pieces
- layered reference model for discussion
▪ modularization eases maintenance, updating of system
- change of implementation of layer’s service transparent to rest of system
- e.g., change in gate procedure doesn’t affect rest of system
▪ layering considered harmful?
1.5.2 TCP/IP model (internet model)
TCP/IP传输协议,即传输控制/网络协议,它是在网络的使用中的最基本的通信协议。TCP/IP传输协议对互联网中各部分进行通信的标准和方法进行了规定。并且,TCP/IP传输协议是保证网络数据信息及时、完整传输的两个重要的协议。
layer | 层及功能 |
---|---|
application | 应用层: supporting network applications ( FTP, SMTP, HTTP) |
transport | 传输层: process-process data transfer (TCP, UDP) |
network | 网络层: routing of datagrams from source to destination ( IP, routing protocols) |
link | 链路层: data transfer between neighboring network elements ( Ethernet, 802.111 (WiFi), PPP) |
physical | 物理层: bits “on the wire” |
1.5.3 ISO/OSI reference model
ISO = International Standards Office
OSI = Open Systems Interconnection
多了两层:
presentation: allow applications to interpret meaning of data, e.g., encryption, compression, machine- specific conventions
session: synchronization, checkpointing, recovery of data exchange
1.5.4 Layering and headers
Most layers of the TCP/IP model are associated with a particular type of “header” or sometimes a “header and trailer”.
What is a header?
-
Information separate from the data being sent that says things about that data.
-
Which computer is it being sent to?
-
Which program on that computer must receive it?
-
How long is this data?
For example layer 3 (network) has a “network address” which identifies the host that should receive the data.
Layer 4 (transport) has a port that identifies which program should receive it.
At each lower layer a new header is added incorporating the headers underneath. A layer 2 packet has a layer 2 header but includes headers from layer 3 and 4
关于封装
1.5.5 TCP/IP layers
-
Layer 7 – Application layer – this is the data for programs you use on your computer
HTTP (www) data, SMTP (sent emails), FTP (file transfer) and specific formats for games, torrent etc. -
Layer 6 – Presentation layer
Related to character sets and presentation of data (unused in TCP/IP or real Internet) -
Layer 5 – Session layer
Related to whole lifetime of connection – is the connection real time (unused in TCP/IP or real Internet) -
Layer 4 – Transport layer – this is for the end-to-end connection
between machines.
• Information related to reliability
• Information related to which program on machine sent/receives data. -
Layer 3 – Network (Internet) layer – this is to get the data the
whole journey from its start computer to its end computer (Internet, between networks)
• Address of computer on internet (IP address)
• Checksum to see if data is corrupted -
Layer 2 – Data link layer – this is to get the data to nearby computers (on same local network)
• Media Access Control (MAC address) specific to individual computer (see later lectures) -
Layer 1 – Physical layer (how bits 1s and 0s are actually transmitted)
• Think of cables in the ground or radio waves in the air
1.5.5 Devices for layers
Router
• This is a layer 3 device – it reads a layer 3 address and works out which direction a packet should go.
• It is typically more complex and adaptive than a switch.
Switch
• This is a layer 2 device – it reads a layer 2 address and works out which nearby computer should get a message.
• Typically simpler than a router.
Repeater
• This is a layer 1 device – it strengthens or reconstructs a
corrupted signal and carries on sending it.
1.5.6 ISO/OSI (left) vs TCP/IP (right)
Why two models of layers?
-
International Standards Office/Open Systems Interconnection model planned by committee.
• Planning took a long time.
• Model is idealized. -
Transmission Control Protocol/Internet Protocol built by engineers
• Built up over time to “get things working”.
• New applications and changes to protocols through experience.
When ISO/OSI design completed TCP/IP already “too big to change”.
• Would it be better if we had ISO/OSI?
• Session layer presentation layer useful but don’t exist today.
• Perhaps but we can’t get there from where we are.