IEEE 802.3 以太网络 (Ethernet)

Introduction

  • Connectionless: No handshaking between sending and receiving NICs(网络接口卡, Network Information Center).----->(不需要建立连线)
  • Unreliable: receiving NIC doesn’t send ACKs or NACKs(Negative ACKnowledgment, 否定回答) to sending NIC.----->(不可靠)
  • Ethernet’s MAC protocol: Carrier Sense Multiple Access with Collision Detection* (CSMA/CD).----->(带冲突检测的载波监听多路访问技术(载波监听多点接入/碰撞检测))

Ethernet Topologies

Bus topology

Bus topology popular through mid 90s: all nodes in same collision domain (can collide with each other).

两端需要终端器,来终结信号。

Ethernet(10Base5): 10Mps and no longer than 500m.

  • A transceiver(收发器, a small device directly attached to the tap) detects when the line is idle and drives signal when the host is transmitting.
  • The transceiver is connected to an Ethernet adaptor which is plugged into the host. But now most are built in into the computers.
  • The protocol is implemented on the adaptor.

Multiple Ethernet segments can be joined together by repeaters(中继站). A repeater is a device that forwards digital signals and strengthen them. But no more than four repeaters may be positioned between any pair of hosts. So An Ethernet has a total reach of only 2500 m. (repeaters 将解析出来的信号转发给下面的线路)

With 10BaseT, the common configuration is to have several point to point segments coming out of a multiway repeater, called Hub(集线器). (The cable is twisted pair and limited to 100m in length)

Star Topology

Today: Star topology prevails(盛行).

  • active switch in center.
  • each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other).

Ethernet Frame Format

716624bytes
PreambleSFDDASATypeLLCPADFCS
  • Preamble (7 bytes): (101010…1010) for Synchronization.
  • SFD (1 bytes): Start Frame Delimiter (10101011).
  • DA (6 bytes): Destination MAC Address.
  • SA (6 bytes): Source MAC Address.
  • Packet type (2 bytes): acts as demux key to identify the higher level protocol.(识别更高层的协议)
  • LLC-Frame: Up to 1500 bytes.
  • PAD: Padding when LLC-Frame < 46 bytes.
  • FCS (4 bytes): Frame Check Sequence (CRC-32).
  • MAC-frame size – from DA to FCS.
    • Min 64 bytes to distinguish from collision.
    • Max 1518 bytes to prevent dominating(统治) bandwidth.

Ethernet Addresses

Every Ethernet host in the world has a unique Ethernet Address. And the address belongs to the adaptor, not the host. It is usually burnt into ROM.

To ensure that every adaptor gets a unique address, each manufacturer(制造商) of Ethernet devices is allocated(分配) a different prefix(前缀) that must be prepended(预先) to the address on every adaptor they build.
- Ex: AMD has been assigned the 24bit prefix 8:0:20.

  • An Ethernet adaptor receives all frames and accepts:
    1. Frames addressed to its own address.
    2. Frames addressed to the broadcast address.
    3. Frames addressed to a multicast address if it has been instructed.

Ethernet MAC Protocol – CSMA/CD

Carrier Sense Multiple Access with Collision Detection (CSMA/CD):

  • Carrier sense means that all nodes can distinguish between an idle(空闲的) and a busy link.
  • Collision detection means that a node listens as it transmits and can therefore detect when a frame it is transmitting has collided with a frame transmitted by another node.
  • At the moment an adaptor detects that its frameis colliding with another, it first makes sure to transmit a 32-bit jamming sequence and then stops transmission.
    • Thus, a transmitter will minimally send 96 bits in the case of collision: 64-bit preamble + 32-bit jamming sequence. (只在两个主机距离非常近时发生)
  • The worst case scenario happens when the two hosts are at opposite ends of the Ethernet. To know for sure that the frame its just sent did not collide with another frame, the transmitter may need to send as many as 512 bits(64 bytes).
    • Consider that a maximally configured Ethernet is 2500 m long, and there may be up to four repeaters between any two hosts, the round trip delay has been determined to be 51.2 μs. So in the 10 Mbps Ethernet: 10 Mbps X 51.2 μs = 512 bits.

Binary Exponential Backoff Algorithm(指数退避算法)

Exponential Backoff: Once an adaptor has detected a collision, and stopped its transmission, it waits a certain amount of time and tries again. Each time the adaptor tries to transmit but fails, it doubles the amount of time it waits before trying again.

  • Ex: k = 0, 1 in the first time, and will double to 0, ······2^n-1 when the Nth time, the k value will be selected at random, and the adaptor shall delay k x 51.2 μs. But the n should no more than 16 and the k should be Min(k, 10).

Disadvantage of BEBA: Last-in-First-out effect.

CSMA/CD Protocol

  • Carrier Sense before transmission.
  • Deference: Defers transmission if channel is sensed busy.
  • Carrier Sense while transmission.
  • When Collision: Two or more stations transmitting simultaneously(同时).
  • For Backoff: Random delay after collision.
  • Collision Window (Slot time, 时隙间隔): Round-trip propagation delay time plus some carrier sense time. In IEEE 802.3, this value is defined to be 51.2 μs.

Ethernet Performance

  • Ethernets work best under lightly loaded conditions.
  • Under heavy loads, too much of the network’s capacity is wasted by collisions.

802.3 Ethernet Standards

  • MAC Protocol – CSMA/CD.
  • Connection less, unreliable transmission.
  • Topology from Bus to Star (switches).
  • Half-duplex transmission in Bus topology
    • Work best under lightly loaded conditions.
    • Too much collision under heavy load.
  • Full-duplex transmission in Switch topology (point-to-point)
    • Though no more collisions, shall also implement the CSMA/CD potocol.
    • Excellent performance (wired speed, 线速).

想了解更多关于计算机网络架构与网络安全:计算机网络架构与网络安全专栏

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值