当前位置:网站首页>交换机和路由器的异同
交换机和路由器的异同
2022-07-07 12:12:00 【sinat_36789271】
1、路由器可以给你的局域网自动分配IP,虚拟拨号,就像一个交通警察,指挥着你的电脑该往哪走,你自己不用操心那么多了。交换机只是用来分配网络数据的。
2、路由器在网络层,路由器根据IP地址寻址转发数据包,路由器可以处理TCP/IP协议,交换机不可以。交换机在数据链路层,交换机根据MAC地址寻址转发数据包。
3、路由器可以把一个IP分配给很多个主机使用,这些主机对外只表现出一个IP。交换机可以把很多主机连起来,这些主机对外各有各的IP。
4、路由器可以提供防火墙,交换机不能提供该功能。集线器、交换机都是做端口扩展的,就是扩大局域网(通常都是以太网)的接入点,也就是能让局域网可以连进来更多的电脑。路由器是用来做网间连接,也就是用来连接不同的网络。
5、举个例子:路由器相当于邮局,把信投递到收件人地址,它的任务就完成了。但是信邮到了你们宿舍楼,而这个地址不是你一个人专享的,所以楼管王大爷还要负责把信给到你手里,他不会关心收件人地址,只看收件人姓名,然后打个内线电话叫你来取信。
如果没有邮局,你没法向世界各地的漂亮妹子们发信,也没法从楼外的漂亮妹子那里收信。但是因为楼管王大爷的存在,你仍然可以通过他与同宿舍楼的好基友书信往来。
所有邮局构成的系统,就是“广域网”,而你的宿舍楼,就是“局域网”,构建局域网是不需要路由器的。
PS:
1、广播过不了路由器
2、MAC地址决定了数据帧的下一跳,而IP地址决定了数据包的终点
3、互联网不转发私有地址
边栏推荐
- 最长上升子序列模型 AcWing 1012. 友好城市
- 属性关键字Aliases,Calculated,Cardinality,ClientName
- Xshell connection server changes key login to password login
- ES日志报错赏析-Limit of total fields
- 2022-7-6 Leetcode27. Remove the element - I haven't done the problem for a long time. It's such an embarrassing day for double pointers
- Excusez - moi, l'exécution a été réussie lors de l'utilisation des données de puits SQL Flink à Kafka, mais il n'y a pas de nombre dans Kafka
- 作战图鉴:12大场景详述容器安全建设要求
- Wired network IP address of VMware shared host
- Laravel Form-builder使用
- Mysql怎样控制replace替换的次数?
猜你喜欢
SSRF vulnerability file pseudo protocol [netding Cup 2018] fakebook1
Build a secure and trusted computing platform based on Kunpeng's native security
How to check the ram and ROM usage of MCU through Keil
【立体匹配论文阅读】【三】INTS
[fortress machine] what is the difference between cloud fortress machine and ordinary fortress machine?
2022-7-7 Leetcode 34.在排序数组中查找元素的第一个和最后一个位置
作战图鉴:12大场景详述容器安全建设要求
"Song of ice and fire" in the eleventh issue of "open source Roundtable" -- how to balance the natural contradiction between open source and security?
TPG x AIDU | AI leading talent recruitment plan in progress!
Wired network IP address of VMware shared host
随机推荐
交付效率提升52倍,运营效率提升10倍,看《金融云原生技术实践案例汇编》(附下载)
docker部署oracle
. Net core about redis pipeline and transactions
Clickhouse (03) how to install and deploy Clickhouse
2022-7-7 Leetcode 844. Compare strings with backspace
现在网上开户安全么?那么网上开户选哪个证券公司?
請問,在使用flink sql sink數據到kafka的時候出現執行成功,但是kafka裏面沒有數
ARM Cortex-A9,MCIMX6U7CVM08AD 处理器应用
Huawei image address
Excuse me, as shown in the figure, the python cloud function prompt uses the pymysql module. What's the matter?
Redis can only cache? Too out!
Supply chain supply and demand estimation - [time series]
"Song of ice and fire" in the eleventh issue of "open source Roundtable" -- how to balance the natural contradiction between open source and security?
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
[untitled]
The difference between memory overflow and memory leak
Flask session forged hctf admin
The delivery efficiency is increased by 52 times, and the operation efficiency is increased by 10 times. See the compilation of practical cases of financial cloud native technology (with download)
2022-7-6 初学redis(一)在 Linux 下下载安装并运行 redis
Vmware共享主机的有线网络IP地址