当前位置:网站首页>Network connection (III) functions and similarities and differences of hubs, switches and routers, routing tables and tables in switches, why do you need address translation and packet filtering?
Network connection (III) functions and similarities and differences of hubs, switches and routers, routing tables and tables in switches, why do you need address translation and packet filtering?
2022-07-04 10:30:00 【Big bear loves to work】
Just keep holding on , The worst result is nothing more than late success
3.0 Preface
- This chapter mainly talks about after the network package leaves the network card It is transmitted to the hub through the network cable , Then the hub pairs the packets Broadcast , The network packet is then sent to the switch , Switch According to the MAC Address Conduct Forwarding of network packets , Then the data arrives at the router , Router According to the IP Address forwarding , Then forward and deliver in a circular way , And many knowledge points involved in this process
3.1 Reach the hub through the network cable
- The structure diagram of the hub is as follows :
The work of the hub can be put simply :
- The network packet signal passes RJ-45 Transfer to hub , In the hub Relay circuit The signal will be processed to a certain extent Shaping and error suppression , After that, the network signal will be radio broadcast All ports of the hub
Network cable passing " Twisted pair " To suppress noise
3.2 Through the switch
- The structure diagram of the switch is as follows :
- The work of the switch It can be put simply as :
- Packets arrive at the switch through the port , Switchboard Each port The structure of all similar a sheet No, MAC Address of the network card , It is the same as the network card ( See the last blog ) Send and receive data .
- After the switch receives the data , Query the address table inside the switch , See if it is in the network package MAC The record corresponding to the address , Find the output port
- Through the switching circuit The network packet is transferred to the corresponding output port , Then the output port forwards the data
- The address table inside the switch is the address table of the device MAC A record table of the address and which port the device is connected to is shown below :
- Generally, the automatic maintenance of the switch , No manual maintenance required
- Generally, the automatic maintenance of the switch , No manual maintenance required
3.3 Through the router
- The structure diagram of the router is shown below : It is divided into Forwarding module and Port module
- The working mode of the router is briefly described as :
- Receive the data packet through the port module , Then the forwarding module according to the IP The address is queried in the routing table , Further judge the next Forward destination address
- The forwarding module transfers the packet to the corresponding port ( The result of looking up the table )
- The port sends packets , Before sending the packet, it will first query according to the forwarding target address MAC Address , New use MAC Replace the old address MAC Address
- Structure of routing table
- The relationship between router and switch
- In essence , Router and switch are entrusted , The router entrusts the switch to forward the network packet to the next router
- Routers are based on IP Agreement work , Switches are Ethernet protocols that work
- The router address translation and Packet filtering function
3.4 The similarities and differences between switches and routers
Item | Router | Switch |
---|---|---|
Forwarding basis | According to the... In the head IP Address | According to the... In the head MAC Address |
Look up the table matching method | Ignore the host number , Only match records with the same network number (IP Address ) | Only match MAC A record with exactly the same address |
" surface " Maintenance mode of | Packet forwarding and maintenance are independent of each other | The process of packet forwarding is automatically maintained , It is part of packet forwarding |
When the packet does not know where to forward | Direct discarding / Forward to default route (0.0.0.0) | Broadcast to all ports |
边栏推荐
- /*Write a loop to output the elements of the list container in reverse order*/
- Huge number (C language)
- Snake (C language)
- Rhcsa - day 13
- Legion is a network penetration tool
- Recursive method to achieve full permutation (C language)
- PHP代码审计3—系统重装漏洞
- Does any teacher know how to inherit richsourcefunction custom reading Mysql to do increment?
- leetcode842. Split the array into Fibonacci sequences
- C language - stack
猜你喜欢
DDL statement of MySQL Foundation
Servlet基本原理与常见API方法的应用
Evolution from monomer architecture to microservice architecture
[FAQ] summary of common causes and solutions of Huawei account service error 907135701
如果不知道這4種緩存模式,敢說懂緩存嗎?
Summary of several job scheduling problems
Seven examples to understand the storage rules of shaped data on each bit
A little feeling
MPLS: multi protocol label switching
system design
随机推荐
uniapp 处理过去时间对比现在时间的时间差 如刚刚、几分钟前,几小时前,几个月前
Student achievement management system (C language)
Legion is a network penetration tool
MySQL case
2021-08-11 function pointer
Dynamic memory management
/*Write a function to open the file for input, read the contents of the file into the vector container of string class 8.9: type, and store each line as an element of the container object*/
Exercise 9-4 finding books (20 points)
Es entry series - 6 document relevance and sorting
Online troubleshooting
Today's sleep quality record 78 points
If you don't know these four caching modes, dare you say you understand caching?
Button wizard business running learning - commodity quantity, price reminder, judgment Backpack
Tables in the thesis of latex learning
转载:等比数列的求和公式,及其推导过程
Jianzhi offer 04 (implemented in C language)
【Day1】 deep-learning-basics
Devop basic command
Dynamic memory management
What is devsecops? Definitions, processes, frameworks and best practices for 2022