计算机网络复习笔记第三部分--局域网协议(英文版本)

LAN and WAN

LAN (local area network)
typically connects computers, printers,etc., located in one building or a cluster of buildings.
Ethernet, token ring, token bus

WAN (wide area network)
connects devices located throughout a city, a country and the worid
Internet

Contention schemes

  • what is contention?
    access to the communication medium from many entry points.

Aloha protocol

– any node may transmit a signal whenever it wants.
– when collision appears, a node waits for a random amount of time then tries again.

Carrier sense multiple access (CSMA)

can reduce the number of collisions compared to Aloha protocol, but cannot eliminate them.
– listen to the transmission medium for any activity.
– transmit if no activity is detected; otherwise wait.

Collision detection (CD)

reduce the time of collision
– when a collision is detected, each node stops transmitting.
– a node will send a jamming signal to make sure that all nodes know a collision has occurred.
collision detection and jamming signal

CSMA/CD

combination of CSMA and CD. a protocol for Ethernet.
– if the medium is busy, a node waits.
– if the medium is quiet, a node transmits a signal and continues to listen the meduim.
– when a collision is detected, a node immediately stops transmitting and sends a short jamming signal.
– after the collision, it waits for a random amount of time and try again.

Token Passing

a protocol for the token ring and token bus.

protocol:
token: a unique bit stream, circulating along all network nodes.
– if a node wants to transmit any message, it must wait until it receives a token.
– once a token arrives, it does not carry any data, a node may append (附加,贴上) the message and the destination address to the token.
在这里插入图片描述

LAN Protocols

data link layer contains logic link control (LLC) and medium access control (MAC).
– LLC handles logical links between nodes.
– MAC handles access to the transmission medium.

LAN standards consist of MAC and LLC protocols.
两种拓扑:
在这里插入图片描述

Ethernet

在这里插入图片描述
经典以太网的体系结构就是一根长电缆围绕建筑物,这根电缆连接着所有的计算机。
advantage: easy to add/remove a node.
disadvantage: collisions do occur.
– works well in general, but occasionally substantial delays may happen.

Frame

  • Frame format:
    在这里插入图片描述
    preamble (序文): a 7-oclet (a sequence of 8 bits) pattern cosisting of alternating (交替的) 0’s and 1’s, is used for synchronisation.
    (Synchronisation establishes the sampling rate.确定采样率)
    frame delimiter (帧定界符): is a special pattern ‘10101011’, indicating the start of a frame.
    destination address: indicate the destination is either a specific node (if the first bit is 0) or all nodes (if the first bit is 1).
    source address: specifies where the frame comes from.
    data field length (数据域长度): contains the number of octets in the combined data / pad fields.
    data/pad field (数据域): must be between 46 to 1518 octets. If there is not enough data, extra octets are added to make up the difference.
    frame chech sequence (帧校验序列): is an error checking code (32 bits CRC)
  • Frame transmission 帧传递
  1. MAC unit monitors the signal on the bus, then starts transmission of a frame through the transceiver (收发器).
  2. the transceiver simultaneously monitors a collision.
  3. if a collision occurs, the MAC unit transmit a jamming signal.

MAC单元监控总线上的信号,然后开始通过收发器传输帧。收发器此时同步监控碰撞。如果碰撞发生,MAC单元会传输一个jamming signal。

  • Frame reception 帧接收
  1. once the MAC unit detects an incoming signal from the transceiver, synchronisation is achieved by preamble.
  2. then the MAC unit test delimiter, then, from destination address, determines if this frame should be received.
  3. if so, the rest of the frame is processed and passed to the higher layer.

当MAC单元检测到一个从收发器进来的信号,序文会实现同步。然后MAC单元会检测帧定界符,然后通过目的地址来决定是否接受这个帧。如果接受,帧的剩余部分将被处理并传递到更高层。

Token Ring

在这里插入图片描述advantage: collisions cannot occur
disadvantage: a malfunction (故障,失灵) at one node may destroy/duplicate (复制) a token, thus affecting the entire network.

Frame

  • Frame format:
    在这里插入图片描述
    在这里插入图片描述
    using the differential Manchester encoding scheme.
    signal J: starts like a 0 (从0开始), but no transition in the middle.
    signal K: starts like a 1, but no transition in the middle.
    starting delimiter (开始定界符): a pattern ‘JK0JK000’.
    access control: ring maintenance.
    frame control: ring maintenance.
    destination address: same as Ethernet
    source address: same as Ethernet
    data field: 0 to 5000 (typical) octets
    frame check sequence: same as Ethernet
    ending delimiter (结束定界符): a pattern ‘JK1JK1IE’.
    ‘I’ bit: 0 for the last frame, 1 otherwise
    ‘E’ bit: 1 whenever an error is detected
    frame status: ring maintenance
  • Frame transmission 帧传递
  1. a service request from the upper layer is encapsulated by the MAC unit.
  2. the MAC unit awaits a token.
  3. the MAC unit transmits a data frame with a token.

下层传来一个被MAC单元封装了的服务请求,MAC单元等待token,MAC单元用token传递一个数据帧。

  • Frame reception 帧接收
  1. when the MAC unit detects the reception of a data frame, it determines, form destination address, if this frame should be accepted.
  2. if so, the MAC unit processes its data field, then transmits a token.
  3. otherwise, it retransmits a received data frame.

当MAC单元检测到了一个数据帧的接收的时候,从目的地址来判定要不要接收这一数据帧。如果需要接收,MAC单元会处理数据域。如果不需要接受,MAC单元会重新发出这个数据帧。

Interconnecting LANs

phisical restrictions for connecting LAN protocols within a small geographical area (在一个小的地理区域内连接局域网协议的物理限制):
number of computers (more computers, more traffic)
cable length (up to several hundred meters)
Methods:
layer 1 connection: repeater 中继器
layer 2 connection: bridge 网桥

Repeater

physical layer connections:
在这里插入图片描述
– a repeater connects between LANs having the same protocol and the same frame format.
– nodes on interconnected LANs do not recognise the existence (存在) of a repeater. So there is no need to change the network protocol.
– phsyically, it is simply a buffer (i.e., an amplifier 一个缓冲区,即一个放大器) of electrical signal.
在这里插入图片描述

Station A sees every frame transmitted by, say, station C, regardless of whether the frame is addressed to station A. (站A会看到例如站C传输的每一个帧,不管该帧是否寻址到站A)
– heavier traffic in the network, difficult to build a very large LAN system using repeaters only.

Bridge

data link layer connections
在这里插入图片描述

– a bridge is a connector with the ability to execute (执行) a subset (子集) of a protocol.
error correction
frame formatting
– it can connect between LANs having different protocols and different frame formats.
在这里插入图片描述

suppose bridge 1 receives any frame from the LAN2 side, it is transmitted to LAN1 only if it is destined for any station on LAN1. (假如网桥1从LAN2接收到了任何帧,都要确认了这个帧的目的地址是LAN1上的任何一个站。)
– a bridge selectively accepts/rejects frames based on their destination. can reduce unnecessary traffic, thus more efficient. can accommodate (适应) some security feature.

Bridging different LAN protocols has some considerations:

  1. different LANs may have different bit rates, so it requires a sufficient buffer space when transmitting frames to the slower side.
  2. each LAN has a different frame format, so it requires reformatting.
  3. each LAN has a different maximum frame size (e.g., 1518 octets for the Ethernet, 5000 octets for the token ring), so it has to break a large frame into smaller ones.

Bridge Routing

Fixed routing bridge (固定路由)

  • requires a routing table
  • drawback: needs to update routing table each time network configuration (配置) changes

Transparent bridge (透明网桥)

  • supported by all standard bridges
  • make all the frame forwarding decisions (转发决策), end nodes (终端节点) do not realise the bridge is there.
  • can create and update its own routing table
  • route learning: examines the source address when a frame is received (route learning algorithm)
  • simple configuration on bridges without hardware or software changes to the end nodes 网桥的配置简单,无需对终端节点进行硬件或软件更改
  • slow, since the operation involves table lookup/update.
  • loops in a network may cause a problem 循环会导致问题
  • table learning algorithm requires considerable time to adjust to a new topology of a network. 表学习算法需要相当长的时间来适应新拓扑

Transparent bridge: route learning algorithm (自学习算法)

  1. watch all frames arriving at each LAN
  2. for each frame, store in a cache (缓存):
    MAC address: the source address
    port #: the associated (关联的) LAN the frame arrived on
    age: the arrival time
  3. for each frame, the cache is queried for (查询) the destination address
    – is found, the frame is forwarded to the LAN associated with the address, apart from the LAN the frame arrived on (filtered) 转发到相关联的那个地址,但是应该除去这个帧来时的那个LAN。
    – is not found, the frame is forwarded to all LANs apart from the LAN the frame arrived on (flooding) 转发到其他所有的LAN,除去到达的这个LAN。

本质是寻找到那个“对”的接口。一开始网桥的routing table是空的,随着有第一个站点发送数据,逐渐填补这个routing table。一开始网桥对于每一个地址应该在哪个接口的那个方向是全然不知的,但是每一个帧发送数据的时候需要给出三个参数,源地址,进入的接口和时间。当一个帧B的目的地址和某个已经发过的帧A的源地址一样的时候,就要送去那个帧A当时记下所通过的接口,通过那个接口必然能到达目的地。记录时间是为了不断刷新网络拓扑的信息,因为拓扑会经常发生变化而且并非所有的工作站都一直接电工作。只要在一定时间以前的都予以删除,这样就能使得routing table能反映网络当前的拓扑状态。
当然,这样的情况会造成有一些帧根本无法找到能匹配的source address,如果没有的话,就通过其他接口进行转发。如果有,就按照routing table里给出的接口进行转发。但是应当注意,如果转发表里给出的那个接口就是当前接口,就转发失败。

  • entries in the table show that ‘an end node with a MAC address lies in direction of the port# from the bridge, and the entry was made at age time ago’
  • unused MAC addresses (e.g. addresses not checked or updated within a set length of time) are removed from the table (time-out policy)

e.g.
在这里插入图片描述

Source routing bridge (源网桥路由)

  • optional feature for bridges
  • intelligence moved from bridges to end nodes, thus requiring much less processing at bridges 是一种比较智能的方法,因为选择了最佳路径
  • a source node determines and stores a route to the destination
  • quickly accommodating适应 new paths for frequently changing network topologies
  • allow network loops, and used in token ring

how it works

  • a source node can discover a route to a destination by transmitting a paths explorer packet that replicates (复制) itself at bridges, sending a copy over each possible path / 一个source node可以通过发送paths explorer packet来获得到目的地的路径。paths explorer packet在网桥自己复制自己,然后把copy发送给每一个可能的路径
  • each copy records its route so that a route can be identified when it reaches the destination / 每一个copy都记录自己的路径,所以每一个到达终点的路径都可以被记录下来
  • a source node caches the discovered route, which can be used for subsequent (随后的) packets to the same destination / source node缓存发现的路径,用于发送接下来想要去往同一个目的地的包
  • a source routing packet requires additional information in the header, contained in a field known as the RI (routing information) field / 一个source routing packet需要在头部额外添加信息,包含在RI field里

Within the same LAN, packets with the RI field are processed by the source routing bridge and ones without are handled by the transparent bridge.

Transparent bridge VS source routing bridge

  • ease of configuration配置
    little effort to configure parameters for TB
    – SR requires that every LAN be assigned a number and that every bridge can be configured with the LAN number for each of its ports 对每个LAN分配一个号码,对每个网桥的每个端口配置 LAN number
  • bandwidth overhead 带宽开销
    – the number of paths in a network increases exponentially以指数方式 across bridges, hence the number of paths explorer packets grows exponentially when finding a route for SR / 路径过多,所以paths explorer packets过多
    TB wastes bandwidth by forwarding packets needlessly when cache entries项目 at the bridge are not established, although the waste is not nearly as spectacular壮观的 as SR / 传送那些没有缓存项目的flooding的东西是waste,但是waste是不如SR的
  • universality
    – TB is not fully transparent when connecting different types of LANs (e.g., packet size problem) / 链接不同种类LAN的时候无法完全透明,比如包大小的问题,“透明”就是说局域网的站点并不知道发送的帧将经过几个网桥,网桥对各站来说是透明的。
    – SR can handle the packet size problem by identifying the maximum packet size when a route is discovered
  • cost and performance
    – TB can be implemented at a reasonable cost
    – SR requires more processing at end nodes, thus increasing the cost; this additional node cost is multiplied by the number of nodes, which is greater than the number of bridges; hence the resulting figure would be vastly larger than any increase of the cost at bridges.
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值