当前位置:网站首页>Hub, switch, router
Hub, switch, router
2022-06-21 06:56:00 【ZDB】
A hub 、 Switch 、 Router
1. A hub : Broadcast the input signal to all ports , If multiple signals are input at the same time, collision will occur , Multiple signals cannot be transmitted at the same time . Working on the physical level .2. Switch : It is a layer-2 network device designed based on Ethernet , The port of the switch does not have MAC Address . Forward packets only to those with a specific MAC Address of the connected device , Multiple packets can be forwarded at the same time . Working at the data link layer .
3. Router : Is based on IP The design of the , It's a three-tier network device , Each port of the router has one MAC Address and IP Address .
It mainly completes two functions : Complete routing ( Determine which path ) And packet forwarding ( The action taken when a packet arrives ). The former constructs a routing table according to a specific routing protocol , At the same time, we often or regularly exchange routing information with neighboring routers and constantly update and maintain the routing table . The latter handles the data flow through the router , The key operation is to post the query 、 Forwarding and related queue management and task scheduling .
The basic principle of router : The router's port has MAC Address , Therefore, it can become the sender and receiver of Ethernet packets ; It also has IP Address , In that sense , It's the same as the computer's network card . When forwarding packets , First, the router port receives the Ethernet packets sent to it , Then the router queries the forwarding target , Ethernet packets are then sent out using the corresponding port as the sender .
Packet receiving operation of router 1. First , The electrical signal reaches the network cable interface part , The modules in the router will convert electrical signals into digital signals , Then pass through the end of the package FCS Error checking . 2. If there is no problem, check MAC Receiver in header MAC Address , Let's see if it's a bag for you , If so, put it in the receive buffer , Otherwise, discard the package .
in general , The router's ports all have them MAC Address , Accept only packets that match its address , Mismatched packages are discarded .
1、 Routing table
Routing tables are used to determine how packets are transferred from one subnet to another , In other words, it is used to determine which network card the packets received from a network card should be sent to . stay Linux It can be usedroute add default gw < Default route IP> Configure a default route . Each row of the routing table has at least the target network number 、netmask、 And the network card that should be used to connect to this subnet . When the router receives a packet from a network card , It scans every row of the routing table , Use the inside netmask And the goals in the bag IP Addresses do logic and operations , Find the target network number , If the network number is the same as the network number in this line, keep this router as a backup route , If there are already backup routes, the longest network number will be left in the two routes , Another discard , Then scan the next line until the end . If no route is found after the scan , Just use the default route . After routing , Send the package directly to the corresponding network card . In the concrete realization , The routing table may contain more information for the details of the routing algorithm .
边栏推荐
- Superparameters and model parameters
- Pyg tutorial (3): neighbor sampling
- Candy tunnel JS special effect code
- C语言程序设计——三子棋(学期小作业)
- Weather forecast applet source code / weather wechat applet source code
- 使用cell ranger进行单细胞转录组定量分析
- 155-Solana存储数组
- 打造硬核敲门砖——简历
- Bol Bohr's original dual currency driving model leads the new hotspot of dfi+nft+web3.0
- 网格搜索法
猜你喜欢

Pyg tutorial (4): Customizing datasets

Markdown数学语法【详细总结】

Google Earth Engine(GEE)——全球农田有机土壤碳和氮排放(1992-2018年度)数据集
![[JDBC from introduction to actual combat] JDBC basic customs clearance tutorial (comprehensive summary part I)](/img/70/9ccd367a24a8ef399a7f2cf425a2bb.png)
[JDBC from introduction to actual combat] JDBC basic customs clearance tutorial (comprehensive summary part I)

Bloom filter

Zongzi battle - guess who can win

Mysql database foundation: connection query
![[FPGA wavelet transform] Verilog implementation of image 9/7 integer wavelet transform based on FPGA](/img/e2/c33848f3952ce0a3bf0d315fb0f78c.png)
[FPGA wavelet transform] Verilog implementation of image 9/7 integer wavelet transform based on FPGA

Candy tunnel JS special effect code

双列集合(Map集合)
随机推荐
Small program [phase I]
C语言程序设计——三子棋(学期小作业)
产品经理精通Axure工具篇
154 Solana distribution token
Data visualization practice: data processing
C语言课程设计|学生成绩管理系统(含完整代码)
153-Solana创建PDA和存储
Understanding generics mechanism
Issue 12: Spark zero foundation learning route
GEO2R:对GEO数据库中的数据进行差异分析
MySQL使用什么作为主键比较好
出现ConcurrentModificationException这个异常报错,怎么处理?
AdEx 治理投票:质押奖励减半
scikit-learn中的Scaler
Feature scaling for machine learning
Markdown数学语法【详细总结】
Debezium error report processing series 18: solve the problem that the table structure cannot be obtained
Understand this point
Hamming code verification [simple and detailed]
Binding method of remote data in the combox drop-down list of easyUI