当前位置:网站首页>The difference between router and switch
The difference between router and switch
2022-07-28 06:14:00 【Ke Yulong】
You must be familiar with switches and routers , Do you know the difference between them ?
Today I'll show you the difference between routers and switches !
Here is my understanding of the difference between switches and routers , I hope I can help friends in need


The difference between switch and router
The main differences are reflected in the following aspects :
(1) In appearance :
In terms of appearance, we distinguish the two , Switches usually have many ports and look bulky , The ports of the router are much less and the volume is much smaller ( Figure 2 ), In fact, the following figure is not a real router, but integrates the functions of the router , In addition, there is the function of the switch (LAN The port is used as the port of the switch ,WAN Is the port used to connect the external network ), The two antennas are wireless AP Access point ( It is commonly referred to as wireless LAN wifi).
(2) Different levels of work :
The original switch worked in OSI Data link layer of open system interconnection model , That's the second floor , The router works in OSI The network layer of the model , It's the third floor . Because of this, the principle of the switch is relatively simple , Generally, hardware circuits are used to forward data frames , And routers work on the network layer , Shoulder the heavy responsibility of network interconnection , To implement more complex protocols , With more intelligent forwarding decision-making function , Usually run the operating system in the router , Implement complex routing algorithms , Prefer software to realize its function .
(3) Data forwarding depends on different objects
Switches use physical addresses or MAC Address to determine the destination address of the forwarded data . Routers use different networks ID Number ( namely IP Address ) To determine the address of data forwarding .IP Address is implemented in software , It describes the network where the device is located , Sometimes these layer 3 addresses are also called protocol addresses or network addresses .MAC The address usually comes with the hardware , Distributed by the network card manufacturer , And it has been solidified into the network card , Generally speaking, it can't be changed . and IP The address is usually assigned automatically by the network administrator or the system .
(4)” Division of labor “ Different
Switches are mainly used to set up local area networks , The router is responsible for connecting the host to the external network . Multiple hosts can be connected to the switch through network cable , At this time, the local area network is set up , You can send data to other hosts in the LAN , Like the flying autumn we use 、 LAN software such as polar electronic classroom forwards data to other hosts through switches , Of course, broadcasting software such as polar electronic classroom uses broadcasting technology to make all hosts receive data . However , The LAN built through the switch cannot access the external network ( That is Internet), At this time, we need a router for us ” Open the door to the wonderful world outside “, All hosts of LAN use private network IP, Therefore, it must be transformed into a public network through a router IP Then you can access the Internet .
(5) Conflict domain and broadcast domain
Switch partition conflict domain , But do not divide the broadcast domain , The router divides the broadcast domain . The network segment connected by the switch still belongs to the same broadcast domain , Broadcast packets are propagated across all network segments connected to the switch , In this case, it will lead to broadcast storm and security vulnerability problems . The network segment connected to the router will be assigned different broadcast domains , The router will not forward broadcast data . The only packet that needs to be sent to the host in the LAN is the unicast packet , Other hosts will not receive data , This is different from the original hub , The arrival time of data is determined by the forwarding rate of the switch , The exchange forwards broadcast data to all hosts in the LAN .
(6) The last thing to say is :
Routers generally have the function of firewall , It can selectively filter some network packets . Some routers now have the function of switch , Some switches have the function of routers , go by the name of 3 Layer switch , Widely used . By comparison , The function of router is more powerful than that of switch , But the speed is also slow , Expensive , The layer-3 switch has the ability to forward messages linearly , It also has the good routing function of router, so it is widely used .
边栏推荐
- Distributed cluster architecture scenario optimization solution: distributed scheduling problem
- Shutter webivew input evokes camera albums
- 深度学习(增量学习)——(ICCV)Striking a Balance between Stability and Plasticity for Class-Incremental Learning
- Ssh/scp breakpoint resume Rsync
- 无约束低分辨率人脸识别综述一:用于低分辨率人脸识别的数据集
- 深度学习(增量学习)——ICCV2021:SS-IL: Separated Softmax for Incremental Learning
- Deep learning (self supervised: Moco V3): An Empirical Study of training self supervised vision transformers
- Self attention learning notes
- Which is more reliable for small program development?
- 三、OpenVINO实战:图像分类
猜你喜欢

Transformer's understanding

小程序开发如何提高效率?

Tf.keras build neural network function expansion

深度学习——Patches Are All You Need

Record the problems encountered in online capacity expansion server nochange: partition 1 is size 419428319. It cannot be grown

self-attention学习笔记

强化学习——价值学习中的DQN

Clustering of machine learning

Knowledge point 21 generic

深度学习(自监督:MoCo v2)——Improved Baselines with Momentum Contrastive Learning
随机推荐
pytorch深度学习单卡训练和多卡训练
Deep learning - metaformer is actually what you need for vision
Reinforcement learning - proximal policy optimization algorithms
uView上传组件upload上传auto-upload模式图片压缩
What are the detailed steps of wechat applet development?
Reinforcement learning - incomplete observation problem, MCTs
二、OpenVINO简述与构建流程
深度学习(自监督:CPC v2)——Data-Efficient Image Recognition with Contrastive Predictive Coding
Nlp项目实战自定义模板框架
The difference and connection between cookies, sessions and tokens
Invalid packaging for parent POM x, must be “pom“ but is “jar“ @
Neural network optimization
Which enterprises are suitable for small program production and small program development?
Reinforcement learning - Strategic Learning
Differences between processes and threads
Convolutional neural network
How to choose an applet development enterprise
深度学习数据窃取攻击在数据沙箱模式下的威胁分析与防御方法研究阅读心得
强化学习——价值学习中的DQN
深度学习(自监督:MoCo v2)——Improved Baselines with Momentum Contrastive Learning