[Network]Link Layer

1 Introduction

This part explains some similar points of other layers, such as layer service, data format and link.

And link layer is a layer of combination of hardware, software and firmware.

But why both link-level and end-end systems need rdt?

2 Error Detection and Correction: EDC

2.1 SIngle Bit Parity

2.2 Two Dimensional Bit Parity

2.3 Checksum: CRC - Cylic Redundancy Check

d bits data(D) and r bits extension(R)

r+1 bits (G) a generator

divide to check if it is the same as former R

3 Multiple Access Protocols

3.1 Multiple Access Links

1. point-to-point

2. broadcast: share wire and medium

3.2 Multiple Access Protocols

Channel Partitioning:divide channel into smaller "pieces"

1. TDMA

2. FDMA

Random Access

1. Idea: When nodes has pkts to send, the end will use the whole transmission rate.

2. Problem: two ore more transmitting nodes -> collision

3. Goals: how to detect collisions and how to recover from collisions.

Examples

1. Slotted ALOHA

1) Assumption

all frame same size

time divided same size

node starts to transmit only slot beginning.

all nodes can detect collisions

nodes are synchronized

2) Operation

If no collision: send

If collision: retransmit in each subsequent slot with probability p until success

3) Advantages

use full rate of channel

simple

4) Disadvantages

idle slots

waste of time

clock synchronization

2. ALOHA

1. Idea: no synchronization. transmit immediately.

2. Problem: the collision probability increases.

3. CSMA: Carrier Sense Mutilple Access

1. Idea: listen before transmit

2. Problem: propogation delay means that two nodes may not hear each other‘s transmission.

Look the image below the B‘s transmission is heard by A, C and D at different times with different distances.

3. Operation

Listen before transmission, busy to wait

Listen while transmitting, collision to wait

Taking Turns

Idea like the name.

4 Link Layer Addressing

4.1 MAC Address: 48 bits

4.2 ARP: Address Resolution Protocol

1. WHY:

One node may know IP address of another node, but it may not know MAC address of the node. So we simply need to build ARP table for mapping from IP address to MAC address. And we learn that IP addresses are distrubute
to a subnet with logic, and MAC address is related to an interface physically. So and IP address is just a logical defination which tell the transmission where to go, and the MAC address indicates a perticular facility.

2. Example

5 Ethernet

5.1 Star Topology

Opposed to the bus topology, star topology has a center active switch in center. Nodes do not collide with each other directly.

5.2 Frame Structure

Preamble: used to synchronize receiver sender and clock rates.

Address: adapter check it if matching. If not, the adapter will discard the frame. (6 bytes - 48 bits)

Type: Network Layer Protocol

5.3 Services

1. Unreliable

2. Connectionless

5.4 CSMA/CD

1. Sense before transmission

2. Sense while transmitting

1) If detecting another transmission, abort and send jam signal

After aborting, NIC enters exponential backoff: after mth collision, chooseK from {0, 1, 2, ..., 2^m - 1}. NIC wait
K*512 bit times, and return to sense before transmission.

Jam Signal: 48 bits

Bit Time:

6 Link Layer Switch

6.1 Hub

no frame buffering, hub does not detect collisions, host NICs detect collisions.

6.2 Switch

Store and Forwarding Ethernet Frames

Forward by the MAC addresses.

Plug and Play, switch self-learning

Multiple Simultaneous Transmission

Because hosts have dedicate connections to the switch.

Switch buffers frames, and switch frames to outgoing links without collision. Because the ingoing links are not shared.

Self-learning: some thing like routing algorithm

learn which host can be reached through which interface. Just Plug into the switch!

If some transmission‘s dest is not known, then flood -> forward on all but the interface where the frame arrives.

Network: router and switch

7 PPP: point-to-point protocol

Error recovery, flow control, data re-ordering all relegated to higher layers.

8 Link Virtualization

8.1 WHY Virtualization

Because there are different local network technology, cable, satellite, telephone and ATM, etc. So we need some work of virtualization to get them homogeneous.

8.2 ATM

Build Virtual Circuits. And work with IP.

8.3 MPLS: Multiprotocol Label Switching

speed up IP forwarding by using fixed length label(Instead of IP address)

[Network]Link Layer

时间: 2024-10-13 00:38:31

[Network]Link Layer的相关文章

Network 5: Data Link Layer

Some important issues related to Data Link Layer: Ethernet uses CSMA/CD with binary exponential backoff as multiple access control protocol, and stipulates the minimum frame length is 64 bytes. 以下代码纯属娱乐,如能运行,纯属巧合. 1 public void transmit() { 2 int col

IOS 模拟不同网络环境 - Network Link Conditioner

转自:http://hulefei29.iteye.com/blog/1782376  可进入Apple开发者下载中心,Network Link Conditioner包含在Hardware IO Tools工具包中,点击下载.  下载安装后,可看到其中有一个Network Link Conditioner.prefPane文件.  点击运行Network Link Conditioner.prefPane后,Network Link Conditioner就会被添加到系统偏好设置的其他分类中.

使用 Xcode 工具(Network Link Conditioner)模拟网络状态

跟服务端合作测试接口时,公司的网络时好时坏,网络不好时,接口返回的数据我还未做处理.可是当我想处理网络不好的情况时,网络又好了(--) 今天在网上看到一个模拟网络状态的 Xcode,很好用. 打开 Xcode --Open Developer Tool--More Developer Tools-. 打开下载工具的网页 搜索 Hardware,下载合适自己 Xcode 版本的工具. 下载后打开.dmg,按图示安装. 添加到偏好设置里. 选择 ON 打开 Network Link Conditio

详解BLE 空中包格式—兼BLE Link layer协议解析

BLE有几种空中包格式?常见的PDU命令有哪些?PDU和MTU的区别是什么?DLE又是什么?BLE怎么实现重传的?BLE ACK机制原理是什么?希望这篇文章能帮你回答以上问题. 虽然BLE空中包(packet)涉及BLE协议栈link layer,L2CAP,SMP和ATT等各层次,但link layer跟空中包格式关系最紧密,掌握了BLE packet的格式,就很容易理解BLE link layer协议的工作原理,因此文章取名"详解BLE空中包格式-兼BLE link layer协议解析&qu

ios13.3,iphone7,vmware15pro,xcode10,network link condition真机测试记录,移动弱网

ios Xcode  弱网测试总结 vmware:15 promacOs 10-14Xcode:10network link condition for xcode10devicesupport 13.3(iphone 7 ios 13.3) 步骤打开Xcode 链接真机开发工具 — network link condition 打开 status on选不同的网络即可 前置1.在Xcode,加入不同的,设备和,applie id应该可以,一个macOS,多个iphone2.尝试用wifi衔接真

[Network]Application Layer

1 Principles of Network Applications 1.1 Application Architectures Client-Server Peer-to-Peer Hybird of C/S and P2P --Skype client-server: find the address of the remote client client-client: direct communication --Instant messaging Similar with Skyp

impdp+network link 跳过expdp直接导入目标库

impdp命令特殊用途,可以将数据库的一个用户迁移到另一台机器上的数据库的用户中.如果目标用户不存在,还可以对应的创建该用户. 快速的把A库上的用户迁移到B库上. 下面就来看一下命令格式: B库下执行命令: Impdp username/[email protected] schema=userA remap_schema=userA:userB remap_tablespace=tbsA:tbsB network_link=dblink_to_userA_on_userB 说明: Userid

AnyDesk远程工具导致的Network link is disconnected

介绍: 最近给开发那边一台2012R2,他们在上面部署了一个网站用来测试,为了方便,他们就在上面安装了一个AnyDesk远程工具. 稳定运行了半个来月,突然有一天收到服务器DOWN的邮件报警,web服务停止了.然后登录服务器,发现网卡断了,再重新打开又好了.当时没在意,问题在第二天又出现了,然后查看日志,如下图: 解决方法: 企业中几十台R720,上面跑ESXI6.0.里面一堆的虚拟机,这台出问题的虚拟机,也是一样,跑成ESXI上.里面的系统也有2012R2,但只有这台有问题.经过排除,发现只有

Core abstraction layer for telecommunication network applications

A new sub-system, the core abstraction layer (CAL), is introduced to the middleware layer of the multi-core processor based modem board. This new module provides an abstraction for the multi-core FSL P4080 processor and its DPAA. For the deployment o