这些概念性的东西,其实,有的区别不是很大,有的区别很大。

Hub

就是一个重复转发器,就是从一个port接受到数据后,就会原样的向其他的所有端口发送刚才收到的数据。个人理解为是工作在物理层的东西。但是,后来发展中,出现了些所谓的智能hub,就是可以做简单的配置,实现端口管理。这个所谓的智能的hub,和后续的bridge/switch的差别貌似小了一步。下面参考外文网站上的介绍:

A hub is a repeater, which is a OSI model device, the simplest possible. Hubs are a common connection point for devices in a network and are commonly used to connect segments of a LAN. A hub takes the incoming data packet that comes into a port and copies it out to all the other ports in the hub.  It doesn't perform any filtering or redirection of data. Although it's actually a little more complicated, a good analogy might be that of an Internet Chat room.  Everything that everyone types in the chat room is seen by everyone else.  If there are too many people trying to chat things get bogged down.

A passive hub serves simply as a conduit for the data, enabling it to go from one device (or segment) to another. So-called intelligent hubs include additional features that enables an administrator to monitor the traffic passing through the hub and to configure each port in the hub. Intelligent hubs are also called manageable hubs.  A third type of hub, called a switching hub, actually reads the destination address of each packet and then forwards the packet to the correct port.

Hub有个最大的问题就是从一个端口进来的数据,会毫无保留的向其他端口发送,不管其他端口连接的LAN是否是该数据包的真正去向。所以,就存在严重的冲突问题,这就造成严重的带宽损耗。但是,这个玩意简单便宜,有一定的使用价值。

Bridge

是一个工作在二层的数据转发设备,端口数量比较少,有端口学习,STP/RSTP协议,基于MAC地址实现数据转发。

Bridges (sometimes called "Transparent bridges") work at OSI model Layer 2. This means they don't know anything about protocols, but just forward data depending on the destination address in the data packet.  This address is not the IP address, but the MAC (Media Access Control) address that is unique to each network adapter card. The bridge is the device which is used to connect two local-area networks (LANs), or two segments of the same LAN that use the same protocol.

With a Bridge, all your computers are in the same network subnet, so you don't have to worry about not being able to communicate between computers or share an Internet connection. DHCP servers will work fine across Bridges, or if you assign your own IP addresses, you'll use the same first 3 "octets" of the IP address (Example: 192.168.0.X)

However, the only data that is allowed to cross the bridge is data that is being sent to a valid address on the other side of the bridge.  No valid address, no data across the bridge.  Bridges don't require programming.  They learn the addresses of the computers connected to them by listening to the data flowing through them.

Bridges are very useful for joining networks made of different media types together into larger networks, and keeping network segments free of data that doesn't belong in a particular segment.

Switch

这个估计是很多人都比较熟悉的,端口比较多,数据传送速率也比bridge相对快,支持的管理能力也比较强,也是工作在2层的协议,同样也是基于MAC实现数据转发。但是个人觉得,和bridge没有太多本质区别。有点类似增强版的bridge。

Switches are the same thing as Bridges, but usually have multiple ports with the same "flavor" connection (Example: 10/100BaseT).

Switches can be used in heavily loaded networks to isolate data flow and improve performance.  In a switch, data between two lightly used computers will be isolated from data intended for a heavily used server, for example.  Or in the opposite case, in "auto sensing" switches that allow mixing of 10 and 100Mbps connections, the slower 10Mbps transfer won't slow down the faster 100Mbps flow.

Although switch prices are dropping so that there is very little difference from hub prices, most home users get very little, if any, advantage from switches, even when sharing broadband Internet connections.  Broadband connections for most users are in the 1-2Mbps range, far below even 10Mbps speeds.  Since you share that bandwidth, you can see that your speedy 100BaseT connection isn't even breaking a sweat when you're using the Internet.

bridge和switch都有端口学习的功能,所以,在很大程度上,从某个口进来的数据,他们知道要向那个端口发出去,所以,大大降低了数据冲突的可能性,从而提高带宽利用率!

Router

这个,大家应该最容易接受了,他是工作在3层的网络设备,基于IP地址实现数据转发,链接不同的子网,实现大的网络互联,今天的互联网通信,跨地域的连接,都离不开它的功劳。相对来说,其原理也比其他的要复杂!

Routers forward data packets from one place to another, too!  However routers are OSI model Layer 3 devices, and forward data depending on the Network address, not the Hardware (MAC) address.  For TCP/IP networks, this means the IP address of the network interface.

Routers isolate each LAN into a separate subnet, so each network adapter's IP address will have a different third "octet" (Example: 192.168.1.1 and 192.168.2.1 are in different subnets).  They are necessary in large networks because the TCP/IP addressing scheme allows only 254 addresses per (Class C) network segment.

Routers, like bridges, provide bandwidth control by keeping data out of subnets where it doesn't belong.   However, routers need to be set up before they can get going, although once set up, they can communicate with other routers and learn the way to parts of a network that are added after a router is initially configured.

Routers are also the only one of these four devices that will allow you to share a single IP address among multiple network clients.

Gateway

这个就是我们常说的网关,他的主要作用是连接两个不同的网络,这两个网络可能采用了不同的网络协议在通讯。又称网间连接器、协议转换器。网关在网络层以上实现网络互连,是最复杂的网络互连设备,仅用于两个高层协议不同的网络互连。网关既可以用于广域网互连,也可以用于局域网互连。由于现在的网络基本都是基于TCP/IP的协议进行通信的,所以,当前常见的路由器,也就充当了网关的角色。

网关不仅仅具有路由器的路由选择功能,更重要的是能够完成两个不同网络(主要是基于不同的网络协议,例如:OSI 7层模型网络,和基于TCP/IP的网络)之间的协议转换。

Hub, bridge, switch, router, gateway的区别的更多相关文章

  1. Hub,bridge,switch and router的区别

    首先说HUB,也就是集线器.它的作用可以简单的理解为将一些机器连接起来组成一个局域网.而交换机(又名交换式集线器)作用与集线器大体相同.但是两者在性能上有区别:集线器采用的式共享带宽的工作方式,而交换 ...

  2. 系统运维-hub, repeater, switch, router初览

    repeater, hub, switch, router都是针对与osi的7层网络模型的不同层而产生的设备,逐一概览如下: repeater:中继器 是网络物理层的一种连接设备,工作在osi的物理层 ...

  3. vue 中router.go;router.push和router.replace的区别

    vue 中router.go:router.push和router.replace的区别:https://blog.csdn.net/div_ma/article/details/79467165 t ...

  4. HUB、Switch、Router在OSI模型层次信息

    序 (HUB)集线器工作在局域网(LAN)环境,像网卡一样,应用于OSI参考模型第一层,因此又被称为物理层设备. Switch交换机工作在OSI第2层数据链路层 Router路由器工作在OSI第3层网 ...

  5. Describe the difference between repeater, bridge and router.

    中继器,路由器,网桥,网关的区别. 路由器:网络层设备,实现复杂的路径选择,控制IP包从源到目的地的路径:根据IP地址进行选路和转发IP数据包 中继器:物理层设备,物理信号的重新生成,对信号进行整形和 ...

  6. if语句,if...else if语句和switch...case语句的区别和分析

    前段时间在工作中遇到了一个关于条件判断语句的问题,在if语句,if else if语句和switch case语句这三者之间分析,使用其中最有效率的一种方法. 所以就将这个问题作为自己第一篇博客的主要 ...

  7. HUB和Switch

    http://baike.baidu.com/view/600161.htm 当然交换机的功能还不止如此,它可以把网络拆解成网络分支.分割网络数据流,隔离分支中发生的故障,这样就可以减少每个网络分支的 ...

  8. vue-router query和params传参(接收参数)$router $route的区别

    今天做项目时踩到了vue-router传参的坑(query和params),所以决定总结一下二者的区别. 直接总结干货!!! 1.query方式传参和接收参数 传参: this.$router.pus ...

  9. SignalR中长连接与HUB连接的使用方式以及区别

    1 using Microsoft.AspNet.SignalR; 2 using System; 3 using System.Collections.Generic; 4 using System ...

随机推荐

  1. Selenium - IWebDriver 控制scroll bar到底部

    有时候我们需要控制页面滚动条上的滚动条,但滚动条并非页面上的元素,这个时候就需要借助js是来进行操作.一般用到操作滚动条的会两个场景: 注册时的法律条文需要阅读,判断用户是否阅读的标准是:滚动条是否拉 ...

  2. Smart210学习记录-------linux驱动中断

    Linux中断 Linux 的中断处理分为两个半部,顶半部处理紧急的硬件操作,底半部处理不紧急的耗时操作.tasklet 和工作队列都是调度中断底半部的良好机制,tasklet 基于软中断实现.内核定 ...

  3. magento添加多个产品到购物车(Add multiple products to cart )

    Step  1app\design\frontend\base\default\template\catalog\product\list.phtml<?php    $_productColl ...

  4. LinearLayout 控件

    LinearLayout 控件,垂直显示各控件一行一个显示,比较好控件. 用RelativeLayout多个控件会堆在一起 <LinearLayout xmlns:android="h ...

  5. Node.js简单介绍并实现一个简单的Web MVC框架

    编号:1018时间:2016年6月13日16:06:41功能:Node.js简单介绍并实现一个简单的Web MVC框架URL :https://cnodejs.org/topic/4f16442cca ...

  6. HttpServlet详解

    http://www.cnblogs.com/panjun-Donet/archive/2010/02/22/1671290.html Servlet的框架是由两个Java包组成:javax.serv ...

  7. 特性节点Attribute

    深入理解DOM节点类型第六篇——特性节点Attribute document.getElementById('b_results').attributes[0].textContent documen ...

  8. 图像金字塔及其在 OpenCV 中的应用范例(下)

    前言 本文将主要讲解如何使用 OpenCV 实现图像分割,这也是图像金字塔在 OpenCV 中的一个重要应用. 关于图像分割 在计算机视觉领域,图像分割(Segmentation)指的是将数字图像细分 ...

  9. 使用apt-get方式为Kubuntu安装PHP+MYSQL+Apache

    相信很多搭过动态网站的朋友都知道怎么搭web服务器, 本人是linux新手, 以前在windows是直接使用集成的wamp server, 所以在linux没有亲手搭过. 本系统: ubuntu 12 ...

  10. 7-zip的压缩的时候排除某目录

    安装暂且不说了. 看一下帮助. [root@localhost Server]# 7z -Zip [] - Igor Pavlov -- p7zip Version ,Utf16=on,HugeFil ...