[network]

一、介质访问子层的作用

1.1 概述

      在Data Link Layer上提供对通道的控制。

       Network可分为p-p的网络和使用broadcast的网络。后者要处理多台host竞争使用channel的问题,这种channel又被称为multiaccess channel或random access channel。用于在multiaccess channel上确定下一个使用者的协议被称为MAC。

        在LAN中,MAC尤为重要。WAN往往使用p-p链路。

1.2  channel方案分析

        第一种是静态channel分配:FDM(freqency-divided multiplexing)或TDM,可以证明,在用户数固定而且任务繁忙时,给每一个用户分配固定的信道,可以得到很好的结果。但是,计算机通信往往是突发性的,大多数信道在大多数时候是空闲的。可以证明这样极大的提高了传送的延时。

        第二种是动态channel分配:具体的通信模型为 station model 生成frame概率为λ*t,Singel Channel Assumption,COllision Assumption或者令牌网 在扩频网中是不严格的,Continuous Time 或者 Slotted Time,Carrier Sense 或者 No Carrier Sense。主要要解决 Channel Compete问题,即在一次成功的frame发送后,那个station获得channel。性能标准是低载荷channel延迟和高载荷情况下的信道利用率。

二、具体实现协议

       2.1 ALOHA

          纯ALOHA Continuous Time & Carrier Sense 发送方通过Carrier Sense判断发送是否成功。如果不能Carrier Sense,可以发送反馈。

          Slotted ALOHA  可以将纯ALOHA容量扩大一倍。在这里,通过Carrier Sense实现Slotted Time。在这里,核心protocol 确定 何时Carrier Sense,何时发送frame,这是为了减少发送时的冲突及监听成本。常用算法有1-持续CSMA(Carrier Sense Multiple Access),nonpersistent CSMA,p-persistent CSMA。另外确定Collision 后怎么办。主要有 CSMA/CD(CSMA with Collision Detection)。一旦检测到冲突了,station立即放弃发送任务,并等待随机一段时间,然后重新尝试。也就是所谓的竞争算法。在这里,station在发送后一段时间内如果没有detect collision,那么就可以判断自己grasp channel了。这个时间是2t,t为两相距最远的station通信的时间。

  2.2 无冲突协议

位图protocol:每一个竞争周期内保含n个slot。第i个station要发送时就在第i个slot发送一个"1"位,竞争周期后,再按slot中顺序发送frame。

二进制倒计数protocol:假设station的传输延迟为零,冲突的信号如果是0和1,那么可以检测到1。这样,对每个station编址,对于位的0 1不同。竞争周期内,要发送的station传送自己的地址,再根据sense的地址判断那个发送。为了避免饥渴情况,对各个station的地址也就是优先级进行轮转,第i个station成功的发送frame后,变为最低,其余各个station优先级一次递增。

2.3 有限竞争协议

竞争协议低延迟,无竞争协议高利用率,有限竞争协议则把两者结合起来。

首先,只要减少参与竞争的station的数量,则某个站获得信道的概率就会增加。

然后,将station分组,每一组竞争某个slot。如果找到某种算法,使得载荷低的时候,参与竞争的station很多;载荷高的时候,参与竞争的station很少。具体的算法有自适应树算法。每个站是个叶子,载荷高时,访问级数深,否则,访问级数低。

2.4 波分多路访问协议

利用FDM TDM或者两者结合起来,将信道分成多个子通道,然后动态分配。

光纤波谱被分为多个通道,每个station得到一个控制信道较窄,一个数据信道,较宽。

2.5 无线LAN协议

不能采用CSMA,因为问题在于接收者而不是发送者,如hidden station problem,exposed station problem。

MACA(Multiple Access with Collision Avoidance)中发送方刺激一下接收方(发送RTS),让他输入一个短frame(发送CTS)。从而expose station。但没有讲怎么处理exposed station problem。

三、实例

  3.1 以太网

 

### Network Manager Configuration and Troubleshooting Network management involves configuring network interfaces properly so that devices can communicate over a network effectively. When encountering issues like "No such process," this indicates that certain services or processes might not be running as expected[^3]. For instance, when setting up an Ethernet interface manually on Linux systems where the command `ip link set dev eth0 up` needs execution with root privileges to bring up the specified network interface. For managing networks more comprehensively through configurations: #### Using Systemd for Managing Network Interfaces Systemd provides mechanisms for starting network connections during boot time automatically without manual intervention each reboot cycle. Configuring systemd-networkd service allows persistent settings across reboots ensuring reliable connectivity from startup onwards. This approach simplifies administration by centralizing control under one framework rather than relying solely upon traditional scripts which may vary between distributions. To configure a static IP address via `.netdev` files within `/etc/systemd/network/`, create entries specifying desired parameters including addresses, gateways, DNS servers among others depending on requirements. ```bash [Match] Name=eth0 [Network] Address=192.168.1.10/24 Gateway=192.168.1.1 DNS=8.8.8.8 ``` After saving changes apply them immediately using commands below while restarting affected components accordingly. ```bash sudo systemctl restart systemd-networkd ``` Troubleshooting steps involve checking status outputs of relevant units alongside logs generated either locally stored inside journalctl database accessible anytime even after system crashes thanks to its robustness compared to conventional syslog facilities. Checking statuses helps identify whether services started successfully post-reconfiguration attempts made earlier: ```bash systemctl status systemd-networkd journalctl -u systemd-networkd --no-pager ``` These actions provide insights into potential misconfigurations preventing proper operation leading towards resolution paths based off observed symptoms presented therein.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值