网络设备 | 中继器 / 集线器 / 网桥 / 网卡 / 交换机 / 路由器 / 网关

注:本文为 “网络设备” 相关文章合辑

机翻,未校。


Network Devices (Repeater, Hub, Bridge, NIC, Switch, Router and Gateway)

In this tutorial, you will learn about the concept of Network Devices (Repeater, Hub, Bridge, NIC, Switch, Router and Gateway). After reading this tutorial, you will get some basic idea about which device works on which layer, how it works, what are its advantages and disadvantages, etc.
在本教程中,您将了解网络设备(中继器、集线器、桥接器、网卡、交换机、路由器和网关)的概念。阅读本教程后,您将了解哪个设备在哪个层工作、它是如何工作的、它的优点和缺点是什么等的一些基本概念。

Roles of Network Devices 网络设备的角色

Generally, network devices are responsible for communication over a network. How the user will connect to the network, which path to choose to send the data, and to whom to send the data are the basic responsibilities of the network devices.
通常,网络设备负责通过网络进行通信。用户将如何连接到网络,选择以哪条路径发送数据,以及向谁发送数据是网络设备的基本职责。

  • A network cannot be created without network devices. Each network device has its own responsibilities and functions.
    没有网络设备,就无法创建网络。每个网络设备都有自己的职责和功能。
  • Network devices operate in different layers, and they use different information needed for communication.
    网络设备在不同的层中运行,它们使用通信所需的不同信息。

The figure below shows the different network devices that operate on different layers.
下图显示了在不同层上运行的不同网络设备。

在这里插入图片描述

As shown in the figure, different network devices operate on different layers on which they interpret different pieces of information.
如图所示,不同的网络设备在不同的层上运行,它们在其上解释不同的信息片段。

The network devices are as follows:
网络设备如下:

  1. Repeater and Hub 中继器和集线器

  2. Bridge, NIC, and Switch 网桥、网卡和交换机

  3. Router 路由器

  4. Firewall 防火墙

  5. Gateway 网关

  6. Client and Server 客户端和服务器

Repeater and Hub 中继器和集线器

Repeaters and hubs are physical layer devices. Both devices are used as connection devices at the physical layer. Let us understand these two devices one by one.
中继器和集线器是物理层设备。这两个设备都用作物理层的连接设备。让我们一一了解这两种设备。

Repeater: The repeater only works in the physical layer. Repeaters are used to regenerate weak signals.
中继器:中继器仅在物理层工作。中继器用于再生微弱信号。

  • When the sender sends a signal over a network, it travels a certain distance. There is a repeater between the sender and the receiver that receives the signal sent by the sender before it becomes weak or corrupted and reproduces the original bit pattern. After that, the repeater sends the newly created refresh signal to the receiver.
    当发送者通过网络发送信号时,它会传播一定的距离。发送器和接收器之间有一个中继器,该中继器在发送器变弱或损坏之前接收发送器发送的信号,并再现原始位模式。之后,中继器将新创建的刷新信号发送到接收器。

  • When the cable covers a short distance, we split the cable into segments and install a repeater between the segments. The repeater performs the function of a two-port node.
    当电缆覆盖一小段时,我们将电缆分成几段,并在两段之间安装中继器。中继器执行双端口节点的功能。

  • The main disadvantage of the repeater is that it forwards each frame received on the ports, as it has no filtering capability.
    中继器的主要缺点是它转发端口上接收到的每个帧,因为它没有过滤功能。

  • Furthermore, the repeater is a regenerator, not an amplifier.
    此外,中继器是再生器,而不是放大器。

The diagram below shows the functionality of the repeater on the network.
下图显示了中继器在网络上的功能。

在这里插入图片描述

  • As shown in the figure, there is a repeater between the sender and the receiver. When the sender sends a signal to the receiver, the signal strength starts decreasing during transmission.
    如图所示,发送方和接收方之间有一个中继器。当发送者向接收器发送信号时,信号强度在传输过程中开始降低。
  • The repeater receives the signal before the signal is too weak or corrupted, reproduces it, and sends it to the receiver.
    中继器在信号太弱或损坏之前接收到信号,再现它,并将其发送到接收器。
  • It also shows that the repeater does not connect two LANs, but it connects two segments, increasing the physical length of the LAN.
    它还表明,中继器不连接两个局域网,而是连接两个段,增加了局域网的物理长度。

Hub: The hub operates at the physical layer and is the hardware-based device. The main difference between hub and repeater is that the repeater has two ports for two devices, whereas the hub has multiple ports (4 to 48). Hence, the hub is known as a multiport repeater.
集线器:集线器在物理层运行,是基于硬件的设备。集线器和中继器之间的主要区别在于,中继器有两个端口用于两个设备,而集线器有多个端口(4 到 48 个)。因此,该集线器被称为多端口中继器。

  • Hubs are used to form a star topology on a network that connects multiple devices.
    集线器用于在连接多个设备的网络上形成星形拓扑。

  • If a cable is damaged during transmission, the hub can detect cable damage. This functionality is not present in the repeater.
    如果电缆在传输过程中损坏,集线器可以检测到电缆损坏。中继器中不存在此功能。

  • If a device wants to communicate with another device and both are connected with the help of a hub, then the hub provides a forwarding feature to forward the message from one device to another. But it cannot filter messages because it is hardware-based. If one device sends a message to another device, the hub will broadcast the message to all devices connected to it.
    如果一个设备想要与另一个设备通信,并且两个设备都在集线器的帮助下连接,则集线器提供转发功能,用于将消息从一个设备转发到另一个设备。但它无法过滤消息,因为它是基于硬件的。如果一台设备向另一台设备发送消息,集线器会将消息广播到连接到它的所有设备。

  • If more than one device transmits the signal to the hub, the collision occurs inside the hub.
    如果多个设备将信号传输到集线器,则会在集线器内部发生冲突。

  • The CSMA/CD algorithm is not required for collision detection when the hub uses full-duplex mode over a point-to-point connection.
    当集线器通过点对点连接使用全双工模式时,冲突检测不需要 CSMA/CD 算法。

  • Passive Hub and Active Hub are the two types of hubs.
    被动集线器和主动集线器是两种类型的集线器。

  • Passive Hub: Passive Hub operates below the physical layer and is a connector that connects wires coming from different devices.
    无源集线器:无源集线器在物理层以下运行,是一种连接器,用于连接来自不同设备的电线。

  • Active Hub: It works at the physical level. It is a multiport repeater and is used on the network to form the star topology.
    Active Hub:它在物理级别工作。它是一个多端口中继器,在网络上用于形成星形拓扑。

The figure below shows the structure of the hub.
下图显示了轮毂的结构。

在这里插入图片描述

  • As shown in the figure, five devices are connected to the hub. PC-1 wants to send data to PC-3, so it forwards to the hub. Hub is a hardware device, so it doesn’t understand IP or MAC addresses. It transmits data to all devices. So, we can say that hub does not provide filtering.
    如图所示,有 5 台设备连接到集线器。PC-1 想要将数据发送到 PC-3,因此它转发到中心。Hub 是一种硬件设备,因此它无法识别 IP 或 MAC 地址。它将数据传输到所有设备。因此,我们可以说 hub 不提供过滤。
  • In the second scenario, all devices simultaneously send data to the hub, so all data will collide and be lost.
    在第二种情况下,所有设备同时向集线器发送数据,因此所有数据都会发生冲突并丢失。

Bridges, NIC, and Switches 网桥、网卡和交换机

Bridge, NIC, and Switch are data link layer devices. All three are important for the data link layer to function.
网桥、网卡和交换机是数据链路层设备。这三者对于数据链路层的运行都很重要。

Bridge: The bridge is a hardware as well as software-based device and operates at both physical and data link layers. The bridge checks the MAC addresses of the source and destination in the data link layer, while in the physical layer, the bridge is used to reproduces signals.
桥接器:桥接器是一种基于硬件和软件的设备,在物理层和数据链路层都运行。桥接器在数据链路层检查源和目标的MAC地址,而在物理层中,桥接器用于再现信号。

  • The bridge device acts as a bridge between two LANs and helps to connect them to transmit data with each other.
    桥接设备充当两个局域网之间的桥梁,并帮助连接它们以相互传输数据。
  • Bridge has filtering functionality. With the help of filtering, the bridge filters the MAC address of the destination and decides whether to transmit or drop the frame.
    Bridge 具有过滤功能。在过滤的帮助下,桥接器过滤目的地的MAC地址,并决定是传输帧还是丢弃帧。

The diagram below shows the structure of the bridge.
下图显示了桥梁的结构。

在这里插入图片描述

As shown in the figure, a bridge connects two different LANs to communicate. LAN-1 devices can send frames to LAN-2 via the bridge so that the bridge decides where to send the frame in LAN-2 according to the MAC address of the destination.
如图所示,一个网桥连接两个不同的局域网进行通信。LAN-1 设备可以通过网桥将帧发送到 LAN-2,以便网桥根据目标的 MAC 地址决定将帧发送到 LAN-2 中的哪个位置。

NIC (Network Interface Card): NIC stands for Network Interface Card and is used to connect devices to the network via media. Each NIC has a 48-bit number, known as a MAC address. The MAC address is designed in such a way that no two devices have the same NIC address to avoid collisions on the LAN.

NIC(网络接口卡):NIC代表网络接口卡,用于通过媒体将设备连接到网络。每个 NIC 都有一个 48 位数字,称为 MAC 地址。MAC 地址的设计方式是,没有两个设备具有相同的 NIC 地址,以避免 LAN 上的冲突。

  • Normally, NICs don’t know anything about IP addresses. They use the MAC address of the sender and receiver to send a frame.
    通常,NIC 对 IP 地址一无所知。它们使用发送方和接收方的MAC地址来发送帧。

  • NIC is a hardware device that performs the operations of the data link layer as well as a physical layer.
    NIC 是一种硬件设备,用于执行数据链路层和物理层的操作。

Switch: A switch is a bridge, but it has better performance than a bridge. Classic Ethernet used a bridge but then switched networks came, which become more popular these days. It looks like a hub.
交换机:交换机是桥接器,但它比桥接器具有更好的性能。经典以太网使用桥接器,但后来交换网络出现了,如今这种网络变得越来越流行。它看起来像一个中心。

  • Switches have multi-ports to which devices can be connected using twisted pair cables.
    交换机具有多个端口,可以使用双绞线电缆将设备连接到这些端口。

  • Switches can be classified in two ways, layer-2 switches, and layer-3 switches. Layer-2 and Layer-3 switches are used at the data link layer and the network layer, respectively.
    交换机可以分为二层交换机和三层交换机两种分类方式。二层交换机和三层交换机分别用于数据链路层和网络层。

  • Layer-2 switches allow better performance over the network than bridges, connecting multiple devices and making filtering decisions based on the MAC address of the frame it receives.
    与网桥相比,第 2 层交换机在网络上提供更好的性能,可连接多个设备并根据其接收的帧的 MAC 地址做出过滤决策。

  • Layer-2 switches also have a buffer that holds frames until the switch detects the destination and has processed the frame.
    第 2 层交换机还具有一个缓冲区,用于保存帧,直到交换机检测到目标并处理帧。

  • The layer-3 switch is used as a router at the network layer, which has faster processing power. It rapidly checks the address of the frame and finds the MAC address from the table, if available.
    三层交换机在网络层充当路由器,处理能力更快。它会快速检查帧的地址,并从表中查找 MAC 地址(如果可用)。

The figure below explains the connection of hosts through a switch in the same LAN.
下图说明了通过同一局域网中的交换机连接主机。

在这里插入图片描述

As shown in the figure, switches are used to connect multiple devices on the same LAN. Switches have multi-ports to which each device connects with a twisted pair cable. It supports Ethernet standards such as Fast Ethernet and Gigabit Ethernet.
如图所示,交换机用于连接同一局域网上的多个设备。交换机具有多个端口,每个设备都通过双绞线电缆连接到这些端口。它支持以太网标准,例如快速以太网和千兆以太网。

Router and its Functions 路由器及其功能

A router is a hardware and software-based device, like a switch. It works at the network layer and forwards the packets on the network based on the IP address.
路由器是一种基于硬件和软件的设备,如交换机。它工作在网络层,根据IP地址在网络上转发数据包。

  • The router is a device that helps to connect a LAN to the Internet.
    路由器是一种有助于将 LAN 连接到 Internet 的设备。

  • When the router receives a frame from the device, it de-encapsulates the frame and finds the IP packet. Then, the router examines the IP packet, which stores the destination IP address. Based on the IP address of the destination, it decides path, re-encapsulates the frame in WAN format, and sends it to the next device or destination for further processing.
    当路由器从设备接收到帧时,它会解封装该帧并找到 IP 数据包。然后,路由器检查存储目标 IP 地址的 IP 数据包。根据目标的 IP 地址,它确定路径,以 WAN 格式重新封装帧,并将其发送到下一个设备或目的地进行进一步处理。

  • The router understands both versions of IP that are IPv4 (32-bit) and IPv6 (128-bit).
    路由器可识别 IPv4(32 位)和 IPv6(128 位)的 IP 版本。

  • Router finds a route to send packets and crea

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值