当前位置:网站首页>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 .
边栏推荐
- How to use Bert
- 深度学习——MetaFormer Is Actually What You Need for Vision
- Deploy the project to GPU and run
- Using neural network to predict the weather
- 无约束低分辨率人脸识别综述三:同质低分辨率人脸识别方法
- 知识点21-泛型
- Deep learning (II) into machine learning and deep learning programming
- 基于tensorflow搭建神经网络
- Deep learning (incremental learning) - iccv2022:continuous continuous learning
- 深度学习(一):走进机器学习与深度学习理论部分
猜你喜欢

机器学习之聚类

matplotlib数据可视化

Deep learning (incremental learning) - iccv2022:continuous continuous learning

Solution to the crash after setting up a cluster

Reinforcement learning - Multi-Agent Reinforcement Learning

使用神经网络实现对天气的预测

循环神经网络

Cyclic neural network

Why is the kotlin language not popular now? What's your opinion?

知识点21-泛型
随机推荐
word2vec和bert的基本使用方法
卷积神经网络
深度学习(增量学习)——ICCV2021:SS-IL: Separated Softmax for Incremental Learning
Four perspectives to teach you to choose applet development tools?
强化学习——价值学习中的SARSA
Reinforcement learning - Multi-Agent Reinforcement Learning
Tf.keras build neural network function expansion
pytorch深度学习单卡训练和多卡训练
First meet flask
Quick look-up table to MD5
Deep learning (incremental learning) -- iccv2021:ss-il: separated softmax for incremental learning
Reinforcement learning - incomplete observation problem, MCTs
The business of digital collections is not so easy to do
The difference and connection between cookies, sessions and tokens
Solution to the crash after setting up a cluster
Deep learning (incremental learning) - iccv2022:continuous continuous learning
Classification of iris based on Neural Network
flutter webivew input唤起相机相册
《AdaFace: Quality Adaptive Margin for Face Recognition》用于人脸识别的图像质量自适应边缘损失
Digital collections become a new hot spot in tourism industry