Basic Switch Operation 阅读笔记

本文是关于《Basic Switch Operation》的阅读笔记,主要介绍了交换机如何基于MAC地址进行桥接,实现透明链接网络,包括地址学习、流量过滤、帧泛洪、广播和组播流量的处理。此外,还讨论了交换机组合可能导致的环路问题及解决的生成树协议,以及交换机性能问题如内存和CPU的影响。
摘要由CSDN通过智能技术生成

这篇阅读笔记主要是阅读文章过程中的一些摘录和总结,主要以英文呈现,因为我觉得强行把英文翻译为中文,麻烦且不说,还会丢失一些信息。不过后面考虑到要给小组成员共享,渐渐写成中文。

Basic Switch Operation, by Joann Zimmerman, Charles E. Spurgeon


  • Ethernet switches perform their linking function by bridging Ethernet frames between Ethernet segments. To do this, they copy Ethernet frames from one switch port to another, based on the Media Access Control (MAC) addresses in the Ethernet frames.
  • Ethernet switches are designed so that their operations are invisible to the devices on the network, which explains why this approach to linking networks is also called transparent bridging. “Transparent” means that when you connect a switch to an Ethernet system, no changes are made in the Ethernet frames that are bridged. The switch will automatically begin working without requiring any configuration on the switch or any changes on the part of the computers connected to the Ethernet network, making the operation of the switch transparent to them.
  • every port on a switch has a unique factory-assigned MAC address.

However, unlike a normal Ethernet device that accepts only frames addressed directed to it, the Ethernet interface located in each port of a switch runs in promiscuous mode. In this mode, the interface is programmed to receive all frames it sees on that port, not just the frames that are being sent to the MAC address of the Ethernet interface on that switch port.

1. How switch works?

1.1 Address learning

  • When switch receives a frame, records the port ID and its corresponding station MAC. This end up a forwarding database.
  • This database(forwarding database) is used by the switch to make a packet forwarding decision in a process called adaptive filtering. Without an address database, the switch would have to send traffic received on any given port out all other ports to ensure that it reached its destination (so call flooding).

1.2 Traffic Filtering

  • Each port in the switch has the ability to hold frames in memory, before transmitting them onto the Ethernet cable connected to the port.
  • A frame will only be sent to its destined port, other ports will not see this frame. This switch logic keeps traffic isolated to only those ethernet cables/segments, prevents flow of unnecessary trafiic on other segments.

1.3 Frame Flooding

  • Switches automatically delete entries in their forwarding database after a period of time – typically 5 mins – if they do not see any frames from a station. This keeps the forwarding database from growing full of stale entries that useless.
  • When recieves a unknown destination address frame, just flood it to all other ports.

1.4 Broadcast and Multicast Traffic

  • Enable broadcast and multicast, so that a frame can be sent to a group of stations.
  • Group address always begin with a specific bit pattern defined in the Ethernet standard.
  • The Ethernet software, also called “interface driver” software, programs the interface to accept frames sent to the group address, so that the interface is now a member of that group. The Ethernet interface address assigned at the factory is called a unicast address, and any given Ethernet interface can receive unicast frames and multicast frames.
1.4.1 Broadcast and multicast forwarding
  • Multicast is more complicated and expensive than broadcast. Stations should tell if they want the multicast frames. And then switches just forward the frames to the indicated ports.
  • Broadcast and Multicast usage: 发现新地址,新开机station动态注册地址。
  • In large LAN, broadcast and multicast may cause heavy traffic.
    Solution:
    * Limit the total number of stations linked to a single networks;
    * Divide into VLAN

2. Combining Switches

2.1 Forwarding Loops

  • 多个交换机组成的大型Ethernet中,可能出现Loops,and then packets will circulate endlessly around the loop, building up to very high levels of traffic and causing an overload && causing the network to be fully occupied with sending broadcast, multicast, and unknown frames, and it becomes very difficult for stations to send actual traffic.

3. Spanning Tree Protocol

3.1. Spanning tree packets

  • 生成树协议的操作基于Bridge Protocol Data Units, or BPDUs. Each BPDU packet is sent to a destination multicast address that has been assigned to spanning tree operation.

3.2. Choosing a root bridge

  • 每个交换机都有个system MAC. BridgeID = priority + system MAC. BID最小的,选作STP算法的根节点。

3.3. Choosing the least-cost path

  • 每个BPDU通过线路时,记录经过的port数量和时间。

3.4. Blocking loop paths

3.5. Spanning tree port states

  • States include: disable, blocking, listening, learning, forwarding. 每个状态的作用以及状态之间切换的条件。
  • 在快速生成树算法(RSTP)中,增加了新state “edge”,意味着该port直接连接的是终端而非switch,从而允许跳过 listening 和 learning ,直接进入 forwarding 。

3.6. Spanning tree versions

  • 802.1D中定义了基本的STP,各厂商都有自己的版本。如 Cisco 的 per-VLAN spanning tree (PVST)
  • The 802.1Q standard includes both RSTP and a new version of spanning tree called Multiple Spanning Tree (MST), which is also designed to provide backward compatibility with previous versions. MST is discussed further in Virtual LANs.

4. Switch Performance Issues

  • 以太网性能取决于网络的拓扑结构、交换机性能等。
  • 当交换机无法及时处理所有port持续接收到的数据时,即性能不足时,会开始丢弃frame,此之谓blocking

4.1 Packet forwarding performance

  • 辅助电路(support circuits) 和 高速缓存都能提高switch的性能,但是贵,所以性能与价格存在 trade-off 。Some less expensive devices may have lower packet forwarding performance, smaller address filtering tables, and smaller buffer memories.

4.2 Switch port memory

  • 一般是 store-and-forward 机制。memory越大越好。设计时一般 A common switch design includes a pool of high-speed buffer memory that can be dynamically allocated to individual switch ports as needed.

4.3 Switch CPU & RAM

  • 交换机在转发最小以太网帧(64 bytes)时,达到传输速率峰值;And then larger frames will have a lower packet rate per second.
  • Latency: is the amount of time it takes to move an Ethernet frame from the receiving port to the transmitting port, assuming that the transmitting port is available and not busy transmitting some other frame.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值