当前位置:网站首页>Detailed explanation of network foundation
Detailed explanation of network foundation
2022-07-06 14:07:00 【Unknown white hat】
Catalog
The composition of the network
Network hierarchical model structure
Data encapsulation and de encapsulation
Network foundation
The composition of the network
What is the Internet ?
Use the transmission medium to connect the terminal devices in different areas to realize information and data sharing
What are the components of the network ?
Network devices
Wired network : Router 、 Switch 、 A hub 、 bridge 、 The server
Wireless network :AC( Wireless network controller )、AP( Wireless access control access point )
Terminal equipment ( Devices that users can directly contact )
mobile phone 、PC( Personal computer )、ipad……
Transmission medium
Twisted pair 、 Coaxial cable 、 Optical fiber 、 Serial cable
Network protocol
Routing protocol
Exchange network protocol
Network topology
Operator network
LAN
Access layer The network equipment used to connect users to the network constitutes the access layer
Convergence layer The equipment composition range used to involve the access layer equipment into the core layer is the convergence layer
Core layer The range of network devices used to forward LAN data is the core layer
Ethernet frame structure
MAC A representation of an address
1 byte =8 The bit
48 A bit ---6 Bytes
Binary system 、 Decimal system 、 Hexadecimal (10-A、11-B、……、15-F)
MAC The composition of the address
48 A bit : 24 IEEE( Institute of electrical and Electronics Engineers )---OUI( Organization unique identifier )
Huawei 、 Hua three 、 American Cisco 、 Agility
24 Distributed by the manufacturer
MAC The role of address
It is used to uniquely identify a device in the network
Ethernet frame structure
SMAC: Source mac Used to identify the device that sends data
DMAC: Purpose mac Used to identify the device that receives this data
Protocol stack
What is a protocol stack ?
The sum of protocols of all layers in the network
ISO International Organization for Standardization - Standardize the protocol stack of the network
Network hierarchical model structure
OSI Seven layer model structure
application layer
The presentation layer
The session layer
Transport layer
The network layer
Data link layer
Physical measurement
TCP/IP Model Protocol data unit
application layer : Generate data data
Transport layer : TCP/UDP agreement — encapsulation TCP/UDP Head Data segment
The network layer : IP( Internet Protocol )、ARP( Address resolution protocol )-- encapsulation IP Head Data packets
Data link layer : Ethernet frame header Data frame
The physical layer
IP Head structure
IP Address representation
IPv4 Address :
192.168.1.4
IP The address is expressed in dotted decimal .32 Bit binary number to represent
IP The composition of the address
IP Address = The Internet is + Host bit
IP Address function
Used to identify a device in the network
IP Address classification
A、0.0.0.0~127.255.255.255
B、128.0.0.0~191.255.255.255
C、192.0.0.0~223.255.255.255
D、224.0.0.0~239.255.255.255
E、240.0.0.0~255.255.255.255
Subnet mask
Representation form 255.255.255.0
from 32 Binary numbers to form , It is usually expressed in dotted decimal numbers
The binary number between each bit in the subnet mask must be continuous ,
1 And 1 There can be no 0,0 And 0 There can be no 1
effect
Used to distinguish IP The network bit and host bit in the address , Bits for 1 The position of indicates the network bit
Bits for 0 Indicates the host bit
IP Address calculation
Internet address All hosts are 0 Of IP Address means network address
The host address The host bit is not all 1 And all 0 The address of
Broadcast address All hosts are 1 Indicates the broadcast address
IP Address and subnet mask calculate the maximum number of hosts that can be accommodated in a network segment 、 Number of available hosts 、
Calculate the network address of each network segment 、 Broadcast address 、 Available host address range
192.168.20.0/24
24 What does it mean ? The length of subnet mask is 24 position , Network bit 24 position , Host bit 8 position
network address 0000 0000 –192.168..2.0
Broadcast address 1111 1111 – 192.168.2.255
The maximum number of hosts that can be accommodated ( Including network address and broadcast address ):
Number of available hosts ( The number of addresses in the network segment other than broadcast address and network address ):
VLSM( Variable length subnet mask )
192.168.3.0/24
192.168.3.0/26 4 Subnet - Divided into four departments
IP Head structure
IP Head fixed length size —20 byte
SIP: Source IP, Used to identify the device that sends data
DIP: Purpose IP, Used to identify the device that receives data
Transport layer protocol
The transport layer protocol consists of TCP( Transmission control protocol )、UDP( User packet protocol )
TCP characteristic : High reliability 、 The transmission rate is slow
UDP characteristic : Low reliability 、 Fast transmission rate
TCP agreement
Is a connection oriented transport layer protocol
What is connection oriented ? Before transmitting data, a communication channel must be established
TCP Head structure
Source port( Source port number ) Dport( Destination port number )
Syn( Request bit ) 、ack( Confirmation bit )、fin( End bit )、seq number( Serial number )、ack number( Confirmation no. )
TCP Why is the protocol reliable 、 Slow speed ?
Before transmitting data : Establish a communication channel
TCP Three times mobile phone system ( request 、 Respond to ):
Ack=seq+1
Transmitting data :
Packet loss retransmission mechanism :
After data transmission :
Four times breakup mechanism :
UDP agreement
It is a connectionless transmission protocol
What is for connectionless ? There is no need to establish a communication channel before transmitting data
Data encapsulation and de encapsulation
During the unpacking process, if the Ethernet frame structure DMAC With the receiving device MAC When the address does not match , Then the device will refuse to receive data
In the process of data encapsulation and de encapsulation , Source and purpose IP The address is always maintained , Source and purpose MAC The address will change according to different scenes
边栏推荐
- [VMware abnormal problems] problem analysis & Solutions
- A complete collection of papers on text recognition
- 实验四 数组
- HackMyvm靶机系列(1)-webmaster
- Implementation principle of automatic capacity expansion mechanism of ArrayList
- SRC挖掘思路及方法
- 【educoder数据库实验 索引】
- Safe driving skills on ice and snow roads
- Hackmyvm target series (1) -webmaster
- How to turn wechat applet into uniapp
猜你喜欢
Read only error handling
Applet Web Capture -fiddler
QT meta object qmetaobject indexofslot and other functions to obtain class methods attention
Hackmyvm Target Series (3) - vues
Xray and Burp linked Mining
Record a penetration of the cat shed from outside to inside. Library operation extraction flag
Meituan dynamic thread pool practice ideas, open source
Hackmyvm target series (5) -warez
HackMyvm靶机系列(7)-Tron
Strengthen basic learning records
随机推荐
Using spacedesk to realize any device in the LAN as a computer expansion screen
7-7 7003 组合锁(PTA程序设计)
4. Branch statements and loop statements
Yugu p1012 spelling +p1019 word Solitaire (string)
7-11 机工士姆斯塔迪奥(PTA程序设计)
. How to upload XMIND files to Jinshan document sharing online editing?
Analysis of penetration test learning and actual combat stage
Applet Web Capture -fiddler
7-1 output all primes between 2 and n (PTA programming)
7-6 矩阵的局部极小值(PTA程序设计)
7-4 hash table search (PTA program design)
SQL注入
Strengthen basic learning records
7-6 local minimum of matrix (PTA program design)
WEB漏洞-文件操作之文件包含漏洞
JS several ways to judge whether an object is an array
附加简化版示例数据库到SqlServer数据库实例中
Detailed explanation of three ways of HTTP caching
外网打点(信息收集)
xray与burp联动 挖掘