具体的工作流程如下:

(1) 当交换机从某个端口收到一个数据包,它先读取包头中的源MAC地址,这样它就知道源MAC地址的机器是连在哪个端口上的;

(2) 再去读取包头中的目的MAC地址,并在地址表中查找相应的端口;

(3) 如表中有与这目的MAC地址对应的端口,把数据包直接复制到这端口上;

(4) 如表中找不到相应的端口则把数据包广播到所有端口上,当目的机器对源机器回应时,交换机又可以学习一目的MAC地址与哪个端口对应,在下次传送数据时就不再需要对所有端口进行广播了。

帧转发过程:

When a frame arrives at a switch port, it is placed into one of the port’s ingress queues.
The queues each can contain frames to be forwarded, with each queue having a different
priority or service level. The switch port then can be fine-tuned so that important frames
get processed and forwarded before less-important frames. This can prevent time-critical
data from being “lost in the shuffle” during a flurry of incoming traffic.
As the ingress queues are serviced and a frame is pulled off, the switch must figure out not
only where to forward the frame, but also whether it should be forwarded and how.
Three fundamental decisions must be made: one concerned with finding the egress switch
port, and two concerned with forwarding policies. All these decisions are made
simultaneously by independent portions of switching hardware and can be described as
follows:
■ L2 forwarding table—The frame’s destination MAC address is used as an index, or
key, into the content-addressable memory (CAM), or address, table. If the address is
found, the egress switch port and the appropriate VLAN ID are read from the table.
(If the address is not found, the frame is marked for flooding so that it is forwarded
out every switch port in the VLAN.)
■ Security ACLs—Access control lists (ACL) can be used to identify frames according
to their MAC addresses, protocol types (for non-IP frames), IP addresses, protocols,
and Layer 4 port numbers. The ternary content-addressable memory (TCAM)contains ACLs in a compiled form so that a decision can be made on whether to forward
a frame in a single table lookup.
■ QoS ACLs—Other ACLs can classify incoming frames according to quality of
service (QoS) parameters, to police or control the rate of traffic flows, and to mark
QoS parameters in outbound frames. The TCAM also is used to make these decisions
in a single table lookup.

转载于:https://blog.51cto.com/weber213/512337

第二层交换机工作原理相关推荐

  1. 网络基础笔记(三)二层交换机工作原理、单点故障与链路聚合、DHCP

    目录   0x01 二层交换机工作原理   0x02 二层交换机单点故障如何解决   0x03 链路聚合   0x04 DHCP 0x01 二层交换机工作原理 二层交换机MAC表的限制 1.交换机MA ...

  2. 计算机网络交换机原理,计算机网络__交换机工作原理

    计算机网络交换机工作原理 在前面了解到根据交换机在OSI参考模型中工作的协议层不同,将交换机分为二层交换机.三层交换机.四层交换机.交换机工作的协议层不同,其工作原理也不相同.下面我们将介绍各层交换机 ...

  3. 6.OSI七层模型及交换机工作原理及VLAN(虚拟局域网)及VTP(vlan同步技术)

    交换机工作原理及VLAN(虚拟局域网) ❤OSI参考模型:从下往上,第一层是物理层 物理层:在设备之间传输比特流(以010101这样的二进制进行传输,以电信号的形式进行传输,0没有,1有) 物理层给线 ...

  4. 交换机:简述对交换机工作原理的认识

    一.交换机工作原理 交换机在接收到数据帧以后,首先.会记录数据帧中的源MAC地址和对应的接口到MAC表中,接着.会检查自己的MAC表中是否有数据帧中目标MAC地址的信息,如果有则会根据MAC表中记录的 ...

  5. 交换机原理_交换机工作原理解析

    原文连接:http://www.elecfans.com/dianzichangshi/20171204593673.html 交换机原理 数据传输基于OSI七层模型,而交换机就工作于其第二层,即数据 ...

  6. 交换机工作原理及端口安全配置

    目录 相关概念认识 交换机工作原理 交换机端口安全 相关概念认识 交换机是一种用于电(光)信号转发的网络设备.它可以为接入交换机的任意两个网络节点提供独享的电信号通路.最常见的交换机是以太网交换机.交 ...

  7. 网络工程师入门必备「思科模拟器」实现交换机工作原理_5分钟学会!超详细实验配置解析~

    交换机: 再当今局域网中,交换机作为是作为最常见的以太网交换设备.大到服务器级华为思科交换机,小到十几块钱的塑料盒子.那么作为局域网中最常见的交换设备,它是如何进行工作的. 交换机的工作环境: 交换机 ...

  8. CCNP1交换:三层架构概述、路由器交换机登录密码破解、VLAN、trunk(ISL、dot1Q)、DTP、VTP、交换机工作原理

    文章目录 CCNP1交换:三层架构概述.路由器交换机登录密码破解.VLAN.trunk(ISL.dot1Q).DTP.VTP.交换机工作原理 一.企业网三层架构概述: 1.冗余: 2.三层架构: 二. ...

  9. 路由器/交换机工作原理(RIP/OSPF协议工作原理)

    交换机工作原理 交换机负责局域网内主机之间的数据转发 交换机内部有一个MAC地址表,记录了MAC地址与交换机端口的对应信息,当数据需要转发时主机将数据包发送给交换机,交换机将数据包中的源地址映射到端口 ...

最新文章

  1. 211高校神级硕士论文刷屏!75行字错了20行!学校回应:导师停招
  2. 苹果ios用js的Date()出现NaN问题解决办法
  3. 在线看大会!就来云栖号!
  4. 命令color_【按键精灵教程】CmpColorEx、FindMultiColor 命令详解
  5. 【Elasticsearch】你看懂 Elasticsearch Log 中的 GC 日志了吗?
  6. intellisense_SQL Server IntelliSense的使用和故障排除–适用于SQL Server 2012或更高版本
  7. (第八章)左右外连接
  8. ES6进阶Async与Await,你不知道的同步与异步
  9. 【搞事情】英文文档单词对比自动翻译
  10. CSDN博客下载器v2.2发布
  11. 华为路由交换工程师学习笔记汇总
  12. TP-LINK设备如何配置无线上网短信Wifi认证?
  13. Python获取实时的时间
  14. virtualbox虚拟机迁移
  15. 驱动精灵卸载后无限蓝屏重启
  16. 人体内部可视化系统市场深度研究分析报告
  17. 全球与中国汽车磁性探伤解决方案市场投资发展格局及前景战略咨询研究报告2021年版
  18. 2021-08-03 git pull 报错 cannot lock ref
  19. 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。
  20. 为何我只能看到3.25GB物理内存

热门文章

  1. [网页设计]Ajax、Comet与Websocket--转
  2. Magento 2.0 Alipay Cross-Border Mobile Payment Extension - Magento 2.0 支付宝跨境支付手机版...
  3. Eclipse中配置CORBA环境
  4. DIY RazorEngine 的程序集生成方式
  5. Hibernate怎么提升数据库查询的性能 (1)
  6. 十二则技巧让Excel操作效率提高
  7. 怎样在SQL Server上部署SSIS包 2
  8. ubuntu下python3及idle3的安装
  9. Java-第三章-从键盘输入整数判断是3和5的倍数!
  10. 可交换的四本书的封面