当前位置:网站首页>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
边栏推荐
猜你喜欢
深度强化文献阅读系列(一):Courier routing and assignment for food delivery service using reinforcement learning
Hackmyvm target series (2) -warrior
实验六 继承和多态
扑克牌游戏程序——人机对抗
QT meta object qmetaobject indexofslot and other functions to obtain class methods attention
Yugu p1012 spelling +p1019 word Solitaire (string)
Strengthen basic learning records
Canvas foundation 2 - arc - draw arc
强化学习基础记录
xray与burp联动 挖掘
随机推荐
攻防世界MISC练习区(gif 掀桌子 ext3 )
7-4 hash table search (PTA program design)
外网打点(信息收集)
Package bedding of components
HackMyvm靶机系列(4)-vulny
Experiment 7 use of common classes
.Xmind文件如何上传金山文档共享在线编辑?
Network layer - simple ARP disconnection
The United States has repeatedly revealed that the yield of interest rate hiked treasury bonds continued to rise
Which is more advantageous in short-term or long-term spot gold investment?
7-6 local minimum of matrix (PTA program design)
[VMware abnormal problems] problem analysis & Solutions
Spot gold prices rose amid volatility, and the rise in U.S. prices is likely to become the key to the future
记一次api接口SQL注入实战
[data processing of numpy and pytoch]
Callback function ----------- callback
Implementation of count (*) in MySQL
记一次,修改密码逻辑漏洞实战
HackMyvm靶机系列(1)-webmaster
A complete collection of papers on text recognition