Unit 5: Networking 2 5.1 Networking 2 How Switches Work

ABOUT THIS VIDEO

Switches connect devices on the same network together: computers, routers, and other switches.

交换机将同一网络上的设备连接在一起:计算机、路由器和其他交换机。

For more on how switches work, review these resources:

有关交换机如何工作的更多信息,请查看以下资源:

思科网络学院对交换网络的介绍

CCNP BCMSN考试(Cisco)开关操作

 

>> Let's now take a closer look
at those switches we were talking about in an earlier module.

>>让我们来仔细看看我们在之前的模块中讨论过的那些开关。

 

Switches connect devices of the same network together.

交换机将同一网络的设备连接在一起。

 

They can connect into other switches and routers as well.

它们还可以连接到其他交换机和路由器。

 

Switches and PCs connected between router interfaces are considered
to be on the same network.

交换机和连接在路由器接口之间的pc被认为是在同一个网络上。

 

When a PC sends an Ethernet frame into a switch, the switch checks the destination MAC address
to see if it knows which interface that MAC address is connected to.

当一台PC向交换机发送以太网帧时,交换机会检查目标MAC地址,看它是否知道该MAC地址连接到哪个接口。

 

If the switch knows where the device with that MAC address is,
the switch sends it out, just that interface.

如果交换机知道有那个MAC地址的设备在哪里,交换机就会把它发送出去,就是那个接口。

 

If the switch doesn't know where a destination MAC address is, the switch floods the frame
out of all interfaces except the interface on which the frame originated.

如果交换机不知道目标MAC地址在哪里,则该交换机将从除帧源所在接口之外的所有接口中溢出帧。

 

So now the obvious question is how does the switch learn
where MAC addresses are in the first place?

那么现在最明显的问题是交换机如何首先知道MAC地址在哪里?


The switch actually starts off knowing nothing, but as frames are sent
into the switch, the switch starts learning.

开关开始时什么都不知道,但是当帧被发送到开关时,开关开始学习。

 

If host A sends a frame for host B into the first interface on the switch,
the switch says I know that the MAC address of host A can now be associated
with the interface on which it was heard.

如果主机A将主机B的帧发送到交换机的第一个接口,交换机说我知道主机A的MAC地址现在可以与它所听到的接口相关联。

 

The switch will make a note of it through a table
in memory called SAT, Source Address Table.

交换机将通过内存中一个名为“源地址表”的表对其进行记录。

 

Since the switch doesn't know where host B is, it floods the frame
out of all the interfaces except the one the frame originated on.

因为交换机不知道主机B在哪里,所以它会将帧从所有接口中溢出,只有帧所在的接口除外。

 

When host B replies, the frame goes into the switch.

当主机B应答时,帧进入交换机。

 

And the switch learns that host B can be found on the second interface.

交换机知道在第二个接口上可以找到主机B。

 

The switch then adds the MAC address of host B and the interface it was heard
on into its source address table as well.

然后,交换机将主机B的MAC地址和它听到的接口也添加到源地址表中。

 

The logic works the same for switches that are connected together.

对于连接在一起的交换机,逻辑是相同的。

 

Each switch maintains its own source address table.

每个交换机维护自己的源地址表。

 

You'll notice that hosts E, F, G, and H are known to switch two on interfaces one,
two, three, and four, respectively.

您将注意到主机E、F、G和H分别在接口1、2、3和4上切换两个。

 

But as far as switch one goes, hosts E, F, G, and H are all accessible
through interface five which connects to switch two.

但就交换机1而言,主机E、F、G、H都可以通过接口5访问,接口5连接交换机2。

 

Hosts A, B, C, and D are known to switch one on interfaces one,
two, three, and four, respectively.

已知主机A、B、C和D分别在接口1、2、3和4上切换一个。

 

But as far as switch two goes, hosts A, B, C, and D are accessible
through interface five which connects to switch one.

但就交换机2而言,主机A、B、C、D可以通过接口5访问,接口5连接交换机1。

 

So if host C sends a frame to host E, it goes into switch one on interface three.

如果主机C向主机E发送一个帧,它进入接口3的交换机1。

 

Switch one consults its source address table
and realizes host E is accessible out of interface five.

交换机1通过查询源地址表,实现了从接口5访问主机E。

 

Therefore, switch one sends the frame out of interface five
where it's picked up by switch two.

因此,交换机1将帧从接口5发送到交换机2接收帧的地方。

 

Switch two now looks at the destination MAC address in the frame
which is still the MAC address of host E.
In an earlier module,
we learned that routers reframe packets at each hop.

交换机2现在查看帧中的目标MAC地址,它仍然是主机E的MAC地址。

在前面的模块中,我们了解到路由器在每次跳转时都会重新构建数据包。

 

Switches, on the other hand, are transparent and don't change a single part of the frame.

另一方面,开关是透明的,不会改变框架的任何部分。

 

After consulting its source address table, switch two sends the frame
out of interface one where host D gets it.

在查询源地址表之后,交换机2从接口1发送帧,主机D从接口1获取帧。

 

In addition to flooding unknown unicasts when the switch doesn't know
where a destination MAC address is, the switch will also flood
multi-casts and broadcasts out of all interfaces,
except the interface that the frame originated on.

除了在交换机不知道目标MAC地址的情况下淹没未知的单播之外,交换机还会淹没所有接口的多播和多播,除了帧源所在的接口。

 

Remember, all ARP requests are always broadcasts.

记住,所有ARP请求都是广播。

 

If there are 20 connected switches in a network with 20 PCs connected to each of those
switches, a single ARP request by one of the PCs will be read
by the other 399

如果一个网络中有20个已连接的交换机,其中20个pc机连接到每个交换机,那么其中一个pc机发出的一个ARP请求将被其他399台计算机读取

 

转载于:https://www.cnblogs.com/sec875/articles/10358037.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值