跳至主要内容

路由器与交换机区别

交换机和路由器的区别:
1.路由器可以给局域网自动分配IP,虚拟拨号,交换机只是用来分配网络数据的。
2.路由器在网络层,根据IP地址寻址,可以处理TCP/IP协议,交换机不可以。

3.交换机在中继层,根据MAC地址寻址。路由器可以把一个IP分配给很多个主机使用,这些主机对外只表现出一个IP(例如学服网络)。交换机可以把很多主机连起来,这些主机对外各有各的IP(例如寝室网络)。
4.路由器提供防火墙的服务,交换机不能提供该功能。集线器、交换机都是做端口扩展的,就是扩大局域网(通常都是以太网)的接入点,也就是能让局域网可以连进来更多的电脑。路由器是用来做网间连接,也就是用来连接不同的网络。

区别一:交换机是一根网线上网,但是大家上网是分别拨号,各自使用自己的宽带,大家上网没有影响。而路由器比交换机多了一个虚拟拨号功能,通过同一台路由器上网的电脑是共用一个宽带账号,大家上网要相互影响。
区别二:交换机工作在中继层,交换机根据MAC地址寻址。路由器工作在网络层,根据IP地址寻址,路由器可以处理TCP/IP协议,而交换机不可以。
区别三:交换机可以使连接它的多台电脑组成局域网,如果还有代理服务器的话还可以实现同时上网功能而且局域网所有电脑是共享它的带宽速率的,但是交换机没有路由器的自动识别数据包发送和到达地址的功能。路由器可以自动识别数据包发送和到达的地址
区别四:举几个例子,路由器是小邮局,就一个地址(IP),负责一个地方的收发(个人电脑,某个服务器,所以你家上网要这个东西),交换机是省里的大邮政中心,负责由一个地址给各个小地方的联系。简单的说路由器专管入网,交换机只管配送,路由路由就是给你找路让你上网的,交换机只负责开门,交换机上面要没有路由你是上不了网的。
区别五:路由器提供了防火墙的服务。路由器仅仅转发特定地址的数据包,不传送不支持路由协议的数据包传送和未知目标网络数据包的传送,从而可以防止广播风暴。

三层交换机和路由器的区别
  虽然他们都具有路由功能。
  但是三层交换机的主要功能仍是数据交换,它的路由功能通常比较简单,因为它所面对的主要是简单的局域网连接,路由路径远没有路由器那么复杂,它用在局域网中的主要用途还是提供快速数据交换功能,满足局域网数据交换频繁的应用特点。
  路由器的主要功能还是路由功能,它的路由功能更多的体现在不同类型网络之间的互联上,如局域网与广域网之间的连接、不同协议的网络之间的连接等,所以路由器主要是用于不同类型的网络之间。它最主要的功能就是路由转发,解决好各种复杂路由路径网络的连接就是它的最终目的,所以路由器的路由功能通常非常强大,不仅适用于同种协议的局域网间,更适用于不同协议的局域网与广域网间。它的优势在于选择最佳路由、负荷分担、链路备份及和其他网络进行路由信息的交换等等路由器所具有功能。为了与各种类型的网络连接,路由器的接口类型非常丰富,而三层交换机则一般仅同类型的局域网接口,非常简单。
  从技术上讲,路由器和三层交换机在数据包交换操作上存在著明显区别。路由器一般由基于微处理器的软件路由引擎执行数据包交换,而三层交换机通过硬件执行数据包交换。三层交换机在对第一个数据流进行路由后,它将会产生一个MAC地址与IP地址的映射表,当同样的数据流再次通过时,将根据此表直接从二层通过而不是再次路由,从而消除了路由器进行路由选择而造成网络的延迟,提高了数据包转发的效率。同时,三层交换机的路由查找是针对数据流的,它利用缓存技术,很容易利用ASIC技术来实现,因此,可以大大节约成本,并实现快速转发。而路由器的转发采用最长匹配的方式,实现复杂,通常使用软件来实现,转发效率较低。
  正因如此,从整体性能上比较的话,三层交换机的性能要远优于路由器,非常适用于数据交换频繁的局域网中;而路由器虽然路由功能非常强大,但它的数据包转发效率远低于三层交换机,更适合于数据交换不是很频繁的不同类型网络的互联,如局域网与互联网的互联。如果把路由器,特别是高档路由器用于局域网中,则在相当大程度上是一种浪费(就其强大的路由功能而言),而且还不能很好地满足局域网通信性能需求,影响子网间的正常通信
  综上所述,在局域网中进行多子网连接,最好还选用三层交换机,特别是在不同子网数据交换频繁的环境中。一方面可以确保子网间的通信性能需求,另一方面省去了另外购买交换机的投资。当然,如果子网间的通信不是很频繁,采用路由器也无可厚非,也可达到子网安全隔离相互通信的目的。具体要根据实际需求来定。
   三层交换与路由最大的区别就在于:路由支持nat转换,而三层不支持。在实际工程中体现出来就在:路由上直接接光纤可以上网,而将光纤接到层三设备上是不能上网了。三层每个端口都有专用的mac地址,有专用的ASIC集成电路。
网络交换机和路由器的区别
  网络交换机,是一个扩大网络的器材,能为子网络中提供更多的连接端口,以便连接更多的计算机。随着通信业的发展以及国民经济信息化的推进,网络交换机市场呈稳步上升态势。它具有性能价格比高、高度灵活、相对简单、易于实现等特点。所以,以太网技术已成为当今最重要的一种局域网组网技术,网络交换机也就成为了最普及的交换机。
  路由器(Router),是连接因特网中各局域网、广域网的设备,它会根据信道的情况自动选择和设定路由,以最佳路径,按前后顺序发送信号。路由器是互联网络的枢纽,"交通警察"。目前路由器已经广泛应用于各行各业,各种不同档次的产品已成为实现各种骨干网内部连接、骨干网间互联和骨干网与互联网互联互通业务的主力军。路由和交换机之间的主要区别就是交换机发生在OSI参考模型第二层(数据链路层),而路由发生在第三层,即网络层。这一区别决定了路由和交换机在移动信息的过程中需使用不同的控制信息,所以说两者实现各自功能的方式是不同的。

Popular posts from 产品随想的博客

Steve Jobs at 44, By Michael Krantz, 1999

Differences and Similarities Between Apple and Pixar Apple turns out many products--a dozen a year; if you count all the minor ones, probably a hundred. Pixar is striving to turn out one a year. But the converse of that is that Pixar's products will still be used fifty years from now, whereas I don't think you'll be using any product Apple brings to market this year fifty years from now. Pixar is making art for the ages. Kids will be watching Toy Story in the future. And Apple is much more of a constant race to continually improve things and stay ahead of the competition.  His Role At Pixar At Pixar my job is to help build the studio and recruit people and help create a situation where they can do the best work of their lives. And to some degree it's the same at Apple. But at Pixar, I don't direct the movies, whereas at Apple probably, if I had to pick a role out of a film production, I'd be the director. So it...

《Becoming Steve Jobs》Chapter 12 Two Decisions

Jim Collins, the bestselling author of the management classics Built to Last: Successful Habits of Visionary Companies and Good to Great: Why Some Companies Make the Leap … and Others Don’t, has a wonderful phrase to describe an essential characteristic of great leaders: deep restlessness. Collins applies the phrase to Steve, one of the two great leaders who inspire him the most (the other is Winston Churchill, the great English politician who was prime minister during most of World War II, from 1940 to 1945, and again from 1951 to 1955). Collins believes this restlessness is far more important and powerful than simple ambition or raw intelligence. It is the foundation of resilience, and self-motivation. It is fueled by curiosity, the ache to build something meaningful, and a sense of purpose to make the most of one’s entire life. 自己何其有幸,在不到30的年纪,就能感受到乔布斯的心境 “The things he was trying to do,” says Collins, “were always hard. Sometimes those things beat him up. But the response to fighti...

《Becoming Steve Jobs》Chapter 15 The Whole Widget

What the world did see was an effective and visionary leader at the height of his powers. These were complicated years for Apple, but Steve handled almost every challenge in exactly the manner he wanted. He had fallen into leadership at such a young age, but he was comfortable in that role now, and justifiably sure of his capacity to guide Apple’s tens of thousands of employees to the goals he set for them. During these years, he would ensure the company’s continued success in personal computers by engineering a deft switch to a new kind of microprocessor; ruthlessly and successfully managing some major transitions in his executive team; and optimizing and building upon the efficiency and ambition of the company’s product development “treadmill,” as Tim Cook describes it. This is also when he delivered what is likely to be remembered as the most notable product of his life, the iPhone, and then improved even that by pivoting once again into a strategy he personally had not wanted to pu...

产品随想 | 陪读《Make Something Wonderful:Steve Jobs in his own words》1976-1996

  There’s lots of ways to be, as a person. And some people express their deep appreciation in different ways. But one of the ways that I believe people express their appreciation to the rest of humanity is to make something wonderful and put it out there. And you never meet the people. You never shake their hands. You never hear their story or tell yours. But somehow, in the act of making something with a great deal of care and love, something’s transmitted there. And it’s a way of expressing to the rest of our species our deep appreciation. So we need to be true to who we are and remember what’s really important to us. ──Steve, 2007 Introduction by Laurene Powell Jobs Much of what’s in these pages reflects guiding themes of Steve’s life: his sense of the worlds that would emerge from marrying the arts and technology; his unbelievable rigor, which he imposed first and most strenuously on himself; his tenacity in pursuit of assembling and leading great teams; and perhaps, above all,...

360T7 刷机步骤及固件

https://cmi.hanwckf.top/p/360t7-firmware/   360T7的固件支持由immortalwrt-mt798x项目提供支持,请参考: https://cmi.hanwckf.top/p/immortalwrt-mt798x https://github.com/hanwckf/immortalwrt-mt798x 刷机步骤 参考 此处 的办法开启原厂固件的UART和telnet功能 在以下链接下载360T7测试固件(纯净版,无任何插件) https://wwd.lanzout.com/b0bt9idwd 密码:ezex (此固件已过时,请选择其它更新的固件) 接下来将刷入修改版uboot。修改版uboot的优点有: 固件分区可达108MB,原厂uboot只能使用36M 自带一个简单的webui恢复页面 到以下仓库的Release页面下载uboot,目前暂时仅支持360T7,后续将支持更多mt798x路由器。 推荐使用 mt7981_360t7-fip-fixed-parts.bin , fixed-parts 代表uboot分区表在编译期间固定,不会随着uboot环境变量变化。 https://github.com/hanwckf/bl-mt798x/releases/latest 将 mt7981_360t7-fip-fixed-parts.bin 通过HFS等方式上传到路由器,使用以下命令刷入uboot mtd write mt7981_360t7-fip-fixed-parts.bin fip 确认刷入完毕后,拔掉路由器电源。然后将电脑的IP地址设置为固定的 192.168.1.2 ,接着按住路由器的RESET按钮后通电开机,等待8s后用浏览器进入 192.168.1.1 在uboot恢复页面选择要刷入的固件。immortalwrt-mt798x目前编译两个版本的360T7固件。 建议修改版uboot直接使用 immortalwrt-mediatek-mt7981-mt7981-360-t7-108M-squashfs-factory.bin ,两种固件区别如下: mt7981-360-t7-108M 为108M固件分区,原厂uboot不可启动,需要修改版u...

ISSUU使用指南--木喵

作者: 木喵   出处: Wonderworks 问:issuu是什么? 答:Issuu是国外的一个在线文档共享网站,它是你的PDF文档发布专家。它类似于我们熟悉的youtube,但它共享的是文档、杂志之类的文本。 简而言之、同志们想看国外的各种杂志? 想找国外的汇报文本么? 想借鉴国外学生的作品集么? 那么你就要用到它啦~ 今天主要和大家讲两个方面 一、如何在pc端使用和下载issuu上的pdf文档 首先我们打开issuu的网址 https://issuu.com/ 我们可以很清楚的看到网页上呢都是国外的杂志以及一些作者自己制作的pdf文档 首先我们点击右上角的 sign up  然后填写相关信息注册一个账户: 注册完成之后我们就可以搜索我们想要找的资料: 比如说,我想找一些分析图的资料,我们就搜索: architecture diagram 然后我们就可以看到相关的文档了: 点击你所选择的文档, 好了问题来了: sorry,this publication is not available 这个时候!就需要在用pc端的我们做一件必不可少的事: 翻墙 然后我们就能将页面刷新粗来了 好、接下来是非常有建设性意义的一步 怎样把我们网页上的文件 下载下来 呢? 截图? no~no~no~ 接下来,让木喵告诉你怎么下载: 首先你需要复制上面的网址 然后将 https://wenfan.hk/issuu/index_link.php 在另一个网址中打开 将你之前复制的pdf的网址粘贴在下面的对话框中 点击 I‘m not a robot 再点击 get it 然后会出现一堆网址代码 我们 全选 打开你的迅雷点击 新建 将你之前的复制粘贴到下载链接里 然后呢~我们就全都下载成功啦~ 然后我们回到之前的网页向下看 我们可以看到有上传文档的作者(记得要关注哟) 然后还有 info   share   stack   ❤ 如果...

Foobar2000 组件安装教程

 原作者 博客地址   汉化作者 Asion博客   关于foobar 2000的一些资源 前言 foobar2000 由于其软件架构特点以及开放的姿态,使得第三方很容易开发组件(component)来拓展它的功能。由于在官网下载的默认安装文件只带了少量几个默认的组件,满足不了使用的需求,例如:默认不带 ape,tta,tak 等音频文件格式的解码器,很多无损压缩格式音乐没法播放。所以自己下载安装组件是必备的基本技能。 foobar2000 的中文汉化版(Asion 汉化)为了方便使用,集成了无损压缩文件解码器以及一些其它有用的插件,安装时选上即可,不喜欢折腾的建议使用汉化版。 这里组件指的是 foobar2000 标准组件(*.dll 文件),而非 vst 插件等其它插件,姑且把组件分为两类: 官方组件: 英文版安装包自带,安装时可选择; 第三方组件:非官方自带的组件 除了 foo_input_std.dll 和 foo_ui_std.dll 这两个组件是必须的外,其它的所有组件都 非必需 的,可以随需要增删。第三方组件可以去 官网 、 官方论坛 或者 官方 wiki 去找,也可以去贴吧等地逛逛。 下载 还是要强调一下,这里说的是 foobar2000 component ,不是中文网上通常说的 vst 插件。 下载好的组件包一般是 xxx.zip 或 xxx.fb2k-component 格式的文件,也有用 7z 打包的。前两种都是 zip 压缩(只要把 fb2k-component 改成 zip 文件就变成了 zip: 包)。标准状况下压缩包里的内容结构应该是 xxx.zip yyy.dll README.txt (可能没有) LICENCE.txt (可能没有) (其它杂七杂八) 除少数外一般只有一个 xxx.dll 文件.一定要注意压缩包结构不能是: xxx.zip yy folder (文件夹) zzz.dll … 否则要解压缩,提取那个 dll 文件。 安装 方法一(推荐) 打开 foobar2000 的菜单 文件 > 首选项(file >preferences) 的 组件(components...

巴菲特致股东信-1976年

 笔记: 为什么选择轻资产行业:当竞争疯狂时,不会强迫加入降价大战 最终选择了费雪的思想,选择能理解的优秀企业,以合理的价格买入并长期拥有 翻译: 雪球:https://xueqiu.com/6217262310/131440258 备份:https://archive.ph/XLK0S 原文: To the Stockholders of Berkshire Hathaway Inc, After two dismal years, operating results in 1976 improved significantly. Last year we said the degree of progress in insurance underwriting would determine whether our gain in earnings would be "moderate" or "major." As it turned out, earnings exceeded even the high end of our expectations. In large part, this was due to the outstanding efforts of Phil Liesche's managerial group at National Indemnity Company. In dollar terms, operating earnings came to $16,073,000, or $16.47 per share. While this is a record figure, we consider return on shareholders' equity to be a much more significant yardstick of economic performance. Here our result was 17.3%, moderately above our long-term average and even further above the average o...

《Becoming Steve Jobs》Chapter 11 Do Your Level Best

As a mass-market consumer electronics device, the iPod would eventually be sold, of course, all the usual places: Best Buy, Circuit City, big-box department stores, and even the computer retailers like CompUSA. Steve disdained all these outlets. His obsession with his products continued well after they’d been manufactured. The tacky, low-margin hustle of these chains ran completely against the minimalist aesthetic of his products and the clean exuberance of his marketing. There was only one place where he really enjoyed seeing his products sold to the public: his own Apple stores, which had debuted four months ahead of the iPod. 觉得那些喧嚣、嘈杂的零售渠道,配不上自己极美的产品 Going back as far as the debut of the Mac, Steve had always groused about the way Apple computers were sold in its resellers’ stores. The way his computers were displayed and sold represented the very worst of what could go wrong when things weren’t done his way. The salespeople, always interested in quick turnover, seemed to make litt...

《Becoming Steve Jobs》Chapter 16 Blind Spots, Grudges, and Sharp Elbows

Steve could be pretty thin-skinned when someone prominent criticized the aesthetics of his products. He took great umbrage that Neil would, as Steve put it, “pop off in public like that without coming to talk to us about his technical concerns first.” From that point on he had rebuffed all of Neil’s attempts to smoke the peace pipe. 有趣 He had blind spots, grating behavioral habits, and a tendency to give in to emotional impulse that persisted his entire life. These characteristics are often used to make the case that Steve was an “asshole” or a “jerk,” or perhaps simply “binary”—that odd adjective often used to convey the sense that he was half asshole/half genius from birth to death. These aren’t useful, interesting, or enlightening descriptions. What’s more illuminating is to take a look at the specific ways in which Steve failed to do an effective job of tempering some of his weaknesses and antisocial traits, and to consider how, when, and why some of them continued to flare up even...