Layered Network stack
  Pq37jUF4UeqZ 2023年11月02日 48 0

3. Layered Network stack

  1. Modularity
    • Does not specify an implementation
    • Instead, tells us how to organize functionality
  2. Encapsulation
    • Interfaces define cross-layer interaction
    • Layers only rely on those below them
  3. Flexibility
    • Reuse of code across the network
    • Module implementations may change
  4. Unfortunately, there are tradeoffs
    • Interfaces hide information
    • As we will see, may hurt performance…

3.1. OSI Model

Layer features

  1. Service
    • What does this layer do?
  2. Interface(bit, Frame, Packet, Segment)
    • How do you access this layer?
  3. Protocol
    • How is this layer implemented?
Layer Service Interface Protocol Examples
Physical Layer Move information between two systems connected by a physical link Specifies how to send one bit - Encoding scheme for one bit<br/>- Voltage levels <br/>- Timing of signals coaxial cable, fiber optics, radio frequency transmitters
Data Link Layer - Data framing: boundaries between packets<br/>- Media access control (MAC)<br/> -Per-hop reliability and flow-control Send one packet between two hosts connected to the same media Physical addressing (e.g. MAC address) Ethernet, Wifi, DOCSIS
Network Layer - Deliver packets across the network<br/>- Handle fragmentation/reassembly<br/>- Packet scheduling<br/> -Buffer management Send one packet to a specific destination - Define globally unique addresses<br/>- Maintain routing tables Internet Protocol (IP), IPv6
Transport Layer - Multiplexing/demultiplexing<br/>- Congestion control<br/>- Reliable, in-order delivery Send message to a destination - Port numbers<br/>- Reliability/error correction<br/>- Flow-control information UDP, TCP
Session Layer - Access management<br/>- Synchronization It depends… - Token management<br/>- Insert checkpoints none
Presentation Layer - Convert data between different representations<br/>- E.g. big endian to little endian<br/> -E.g. Ascii to Unicode It depends… - Define data formats<br/>- Apply transformation rules none
Application Layer Whatever you want :) Whatever you want :D Whatever you want ;) turn on your smartphone and look at the list of apps

3.2. Network Stack in Practice


     Host 1                                       Host 2
+-+-+-+-+-+-+-+-+                           +-+-+-+-+-+-+-+-+
|  Application  |                           |  Application  |
+-+-+-+-+-+-+-+-+                           +-+-+-+-+-+-+-+-+
|   Transport   |           Switch          |   Transport   |
+-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+
|    Network    |     |    Network    |     |    Network    |
+-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+
|   Data Link   |     |   Data Link   |     |   Data Link   |
+-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+     +-+-+-+-+-+-+-+-+

3.3. Hourglass Model

  • One Internet layer means all networks interoperate
  • All applications function on all networks
  • Room for development above and below IP
  • But, changing IP is insanely hard

3.4. Distribute Functionality

The End-to-End Arguments in System Design

  • Saltzer, Reed, and Clark
  • The Sacred Text of the Internet
  • Endlessly debated by researchers and engineers

3.4.1. basic observations

  • Some applications have end-to-end requirements
    • Security, reliability, etc.
  • Implementing this stuff inside the network is hard
    • Every step along the way must be fail-proof
    • Different applications have different needs End hosts…
  • Can’t depend on the network
    • Can satisfy these requirements without network level support

In-network implementation some functions

  • Doesn’t reduce host complexity
  • Does increase network complexity
  • Increased overhead for apps that don’t need functionality
  • But, in-network performance may be better

But they choose end hosts or apps to implement these functions.

As a Conservative Interpretation, don’t implement a function at the lower levels of the system unless it can be completely implemented at this level (Peterson and Davie)Basically, unless you can completely remove the burden from end hosts, don’t bother

As a Radical Interpretation,

  • Don’t implement anything in the network that can be implemented correctly by the hosts
  • Make network layer absolutely minimal
  • Ignore performance issues

As a Moderate Interpretation,

  • Think twice before implementing functionality in the network
  • If hosts can implement functionality correctly, implement it a lower layer only as a performance enhancement
  • But do so only if it does not impose burden on applications that do not require that functionality…
  • …and if it doesn’t cost too much $ to implement

Layering and E2E principals regularly violated by firewalls, transparent proxies, and NAT devices.

3.5. Takeaways

  • Layering for network functions
    • Helps manage diversity in computer networks
    • Not optimal for everything, but simple and flexible
  • Narrow waist ensures interoperability, enables innovation
  • E2E argument (attempts) to keep IP layer simple
  • Think carefully when adding functionality into the network
【版权声明】本文内容来自摩杜云社区用户原创、第三方投稿、转载,内容版权归原作者所有。本网站的目的在于传递更多信息,不拥有版权,亦不承担相应法律责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@moduyun.com

  1. 分享:
最后一次编辑于 2023年11月08日 0

暂无评论

推荐阅读
  rdDxSwLW840S   2023年11月02日   40   0   0 NATIPNetwork
  4i8hCvzXKbg6   2023年12月06日   26   0   0 链路DatabaseNetwork
  Pq37jUF4UeqZ   2023年11月02日   49   0   0 Network