跳至主要内容

路由器与交换机区别

交换机和路由器的区别:
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 产品随想的博客

Apple's One-Dollar-a-Year Man, By Steve Jobs, 2000

(FORTUNE Magazine) – Now that Steve Jobs has showed his hand on Apple's Internet and system software strategies and dropped the "interim" from his title, other questions loom. He's always denied it, but isn't it true that his old company, Next, did wind up taking over Apple? Will there ever be an encore to the 15-year-old Macintosh? Short of that, does Apple have any plans to jump into the "Internet appliance" fray? Will Apple ever build computers for business people again? And what, pray tell, does Steve think of all these young Internet zillionaires? Let's ask. Practically every technology that your old company, Next, possessed when Apple acquired it in 1997 is now being used by Apple in some strategic way. This must seem like sweet vindication.  The thing about Next was that we produced something that was truly brilliant for an audience that our heart really wasn't into selling to--namely, the enterprise. I suppose if you were wr...

产品爱好者周刊 第26期:PRISM, XKeyscore, Trust No One

  Products Gitea - Git with a cup of tea   https://gitea.io/en-us/ A painless self-hosted Git service. 自建Git服务,避免GitHub隐私侵犯 https://github.com/objective-see/LuLu LuLu is the free macOS firewall 监视Mac的出站流量,且阻断 OverSight   https://github.com/objective-see/OverSight OverSight monitors a mac's mic and webcam, alerting the user when the internal mic is activated, or whenever a process accesses the webcam. 监视是否有应用调用Mac的麦克风、摄像头 Mozilla Hubs   https://github.com/mozilla/hubs The client-side code for Mozilla Hubs, an online 3D collaboration platform that works for desktop, mobile, and VR platforms. 开源的多人虚拟空间,Mozilla打造,企业级VR诉求 数字移民   https://shuziyimin.org 关于内容源、工具的推荐,适合刚接入国际的新人 SimpleLogin   https://simplelogin.io/ 匿名邮箱工具,转发用,Michael Bazzell推荐 Telegram 群组、频道、机器人 - 汇总分享   https://congcong0806.github.io/2018/04/24/Telegram/#机器人-bot https://archive.ph/iJMBj 献给那些将来到Telegram的朋友 Design Patrick Wardle   https://www.instagram.com/patrickwardle/?hl=en 他的IG,摄影也精彩,审美...

巴菲特致股东信-1980年

 笔记: 会计中对于下属股权公司的记账方式有3种: 持股50%以上,全部并入 持续20%--50%,则按持股比例并入 持股20%以下,则以实际收到的利润返还,计入报表 这种会计方式,会导致伯克希尔旗下,不少的企业,未能暴露实际的收益情况 对伯克希尔而言,对盈余的认定并非取决于持股比例是100%,50%,20%,5%或是1%,盈余的真正价值在于其将来再投资所能产生的效益 我们宁愿将所赚的盈余继续交由不受我们控制的人好好发挥,也不希望转由我们自己来浪费 高通货膨胀等于是对投入的资本额外课了一次税 翻译: https://xueqiu.com/6217262310/131837878 https://archive.ph/XMX5n  原文: Buffett’s Letters To Berkshire Shareholders 1980 巴菲特致股东的信 1980 年 Operating earnings improved to $41.9 million in 1980 from $36.0 million in 1979, but return on beginning equity capital (with securities valued at cost) fell to 17.8% from 18.6%. We believe the latter yardstick to be the most appropriate measure of single-year managerial economic performance. Informed use of that yardstick, however, requires an understanding of many factors, including accounting policies, historical ca...

Steve Jobs: `There's Sanity Returning', 1998

Nobody can doubt the charisma of Steven P. Jobs. The interim CEO of Apple Computer Inc., who returned to the company last July after his ignominious 1985 ouster, has brought back his legendary vision, impatience, and infectious passion for the Macintosh. Jobs spoke to Business Week Correspondent Andy Reinhardt in Apple's stark, fourth-floor boardroom, just after the company rolled out its new software strategy on May 11. Note: This is an extended, online-only version of the Q&A that appears in the May 25, 1998, issue of Business Week. Q: Now that you've introduced the new, bold-looking iMac, are you going to do some radically different products? A: There's a lot of talk about such things -- about handhelds, set-top boxes. A lot of computer companies have been searching for a consumer product. My view is that the personal computer has been the most successful consumer product of the last 10 years. What we have to do, what the industry stopp...

《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...

写给大家看的中文排版指南

作者:Hindy 原文地址: http:// zhuanlan.zhihu.com/uici rcle/20506092 前言:很遗憾,我们的周围充斥着大量排版丑陋的文章。我国的字体排印与日本、美国等设计强国差距实在太大。我希望能够做些力所能及的小事,让更多人意识到“设计”的价值和其必要性,创造更美好的视觉环境。本文旨在帮助普及、提升大家对文字排版的认识,让大家在平时的学习工作中能有更专业的文字排版素养。 必看人群: 设计师、编辑、作家、撰稿人、教师、学生 目录: 1. 中文排版 1.1 引号 1.2 省略号与破折号 1.3 行首行尾禁则 2. 西文排版基础 2.1 西文撰写基础 2.2 西文标点相关 2.3 斜体的用法 2.4 大小写的区别 3. 中西文混排 3.1 基础原则 3.2 标点相关 1. 中文排版 1.1 引号 我国国家标准要求弯引号,个人建议使用直角引号。 示例:你竟然喜欢“苹果表”? 引号中再用引号使用双直角引号。 示例:我问他,“你竟然喜欢‘苹果表’?” 当引号表示讽刺、反语暗示时,使用弯引号(用法参考“西文排版”部分)。 示例:说真的,我也很 “喜欢”“苹果表”哦。 1.2 省略号(删节号)与破折号 省略号占两个汉字空间,包含六个点。 正确示例:中国设计还有太长路要走…… 错误示例:中国设计还有太长路要走… 破折号占两个汉字空间。 示例:中国设计还有太长路要走──加油罢。 1.3 行首行尾禁则 点号(顿号、逗号、句号等)、结束引号、结束括号等,不能出现在一行的开头。 错误示例: 排版时注意某些 符号不能在行首 ,别弄错了。 正确示例: 排版时注意某些 符号不能在行首, 别弄错了。 开始引号、开始括号、开始双书名号等,不能出现在一行的结尾。 错误示例: 她对我们说:“ 这书太赞了。” 正确示例: 她对我们说: “这书太赞了。” 2. 西文排版基础 2.1 西文撰写基础 句首字母大写。 单词间留空格。 示例:Have a question? 2.2 西文标点相关 点号后加一个空格(如逗号、句号等)。 示例:Hello everyone! Welcome to my blog....

产品随想 | 周刊 第127期:晨光只开一刻钟,但比千年松,并无甚不同

Cherry Studio   https://github.com/CherryHQ/cherry-studio Cherry Studio is a desktop client that supports for multiple LLM providers. Support deepseek-r1 Aalto Repository beta   https://repo.aalto.fi/ Images, sounds and videos from Aalto University 这个系列,价值极高 Nokia Design Archive   https://nokiadesignarchive.aalto.fi/ 芬兰这个国家很了不起 对话影石刘靖康:两代未出现划时代的产品,就会沦为平庸的品牌   https://www.geekpark.net/news/308996 还挺喜欢这个创始人的,有一种海盗的内涵 从哈佛、明星创业者到酷家乐副总裁,苏奇的传奇   https://app.modaiyun.com/mdy/article/3FO4K4W0M259 WHO关于猫狗咬伤、抓伤的处理建议 动物咬伤: https://www.who.int/zh/news-room/fact-sheets/detail/animal-bites 狂犬病: https://www.who.int/zh/news-room/fact-sheets/detail/rabies 关于狂犬病的10个事实: https://www.who.int/zh/news-room/facts-in-pictures/detail/rabies INDIGO 新年直播(2025)   https://www.youtube.com/live/ZIgPvSDGAfY 对2024年AI发展的回顾部分特别好 Artab   https://github.com/get-artab/artab Get Inspired by the World's Greatest Artworks Every Time You Open a New Tab. Extension Available for Chrome, Edge, and...

产品随想 | 周刊 第130期:集结信徒,而非官僚

On Dyson, techno-centric design and social consumption   https://2earth.github.io/website/20250707.html 如何創造偉大的事物   https://ryolu.notion.site/1610a94b9c108079a95be4362afd4a26 集結信徒,而非官僚 Reflections on OpenAI   https://calv.info/openai-reflections 创业架构 Shui   https://github.com/rock-zhang/Shui 好好喝水 https://www.ghibli.jp/works/ 吉卜力作品的高清图 From Skeuomorphic to Liquid Glass: Apple's Strategic Bet on the Post-Touch Future   https://omc345.substack.com/p/from-skeuomorphic-to-liquid-glass 迄今为止关于苹果Liquid Glass变革的解读,最好的一篇 The Nueva School   https://en.wikipedia.org/wiki/The_Nueva_School?useskin=vector 看起来是很酷的一个学校 The Barbican   https://arslan.io/2025/05/12/barbican-estate/ 史蒂夫·乔布斯希望你阅读的 9 本书   https://www.douban.com/doulist/147158849/ 《禅者的初心》里有句话:“做任何事,其实都是在展示内心的天性,这是我们存在的唯一理由。” Chuck Feeney was one of the greatest philanthropists ever   https://www.gatesnotes.com/Remembering-Chuck-Feeney 慈善家 My new deadline: 20 years to give away virtually all my wealt...

A Sister’s Eulogy for Steve Jobs

I grew up as an only child, with a single mother. Because we were poor and because I knew my father had emigrated from Syria, I imagined he looked like Omar Sharif. I hoped he would be rich and kind and would come into our lives (and our not yet furnished apartment) and help us. Later, after I’d met my father, I tried to believe he’d changed his number and left no forwarding address because he was an idealistic revolutionary, plotting a new world for the Arab people. Even as a feminist, my whole life I’d been waiting for a man to love, who could love me. For decades, I’d thought that man would be my father. When I was 25, I met that man and he was my brother. By then, I lived in New York, where I was trying to write my first novel. I had a job at a small magazine in an office the size of a closet, with three other aspiring writers. When one day a lawyer called me — me, the middle-class girl from California who hassled the boss to buy us health insurance — and said his cl...

Interview with Steve Jobs, WGBH, 1990

Interviewer: what is it about this machine? Why is this machine so interesting? Why has it been so influential? Jobs: Ah ahm, I'll give you my point of view on it. I remember reading a magazine article a long time ago ah when I was ah twelve years ago maybe, in I think it was Scientific American . I'm not sure. And the article ahm proposed to measure the efficiency of locomotion for ah lots of species on planet earth to see which species was the most efficient at getting from point A to point B. Ah and they measured the kilocalories that each one expended. So ah they ranked them all and I remember that ahm...ah the Condor, Condor was the most efficient at [CLEARS THROAT] getting from point A to point B. And humankind, the crown of creation came in with a rather unimpressive showing about a third of the way down...