当前位置:网站首页>14.ip protocol -bite
14.ip protocol -bite
2022-06-29 15:35:00 【Aeolian u】
IP agreement
IP Form of agreement

4 Bit version : 4/6(0100,0110), Main discussion IPv4.(0100)
4 Bit head length : and TCP similar .
TOS( Service type , Only 4 Bit effective , You can switch modes ): minimum delay , Maximum throughput , Highest reliability , Minimum cost , Only one form can be taken at a time
4.16 Bit total length : Single IP The maximum length of datagram cannot exceed 64KB(65536Byte), If you exceed ,IP The protocol itself implements such operations as subcontracting and grouping IP For packets , I don't care what is in the load at all. I just segment the data
. The following three fields are used for subcontracting and packaging
16 Bit identifier : The same IP Multiple datagram splits IP The identity of the datagram is the same
13 Bit shift : To describe the bag, who comes first and who comes later , Slice offset is not exactly a simple 1,2,3,4 Instead, you can calculate the space of the intermediate difference based on the slice offset . Put the last one in the middle IP Datagram insertion .( How to base on UDP Realize subcontracting ? The solution is to copy IP The homework )
3 Bit mark : Only one is good at ,0 It means there are follow-up ,1 It means the last package ( End mark )
8 Bit lifetime (TTL): It means a IP How many times can a datagram be forwarded over the network . When a datagram is sent , There will be an initial TTL( For example, common values ,128 perhaps 64)IP Datagrams go through one router at a time ,TTL It will decrease 1 If TTL Reduced to 0 了 , At this point, the router that receives the packet will discard the packet .
Some bags contain IP Address , May never arrive . A bag like this , It's impossible to forward endlessly on the network ( It takes up too much hardware resources )
natural IP Datagrams will be in the established TTL Arrive in .
8 Bit agreement : What kind of protocol does the transport layer use .TCP Or is it UDP Have different values
16 Bit header inspection and : It is correct enough to validate the data
32 Bit source IP Address : Source IP Indicates the sender's address
32 Purpose P Address : Purpose IP Indicates the recipient address .
about IPv4 Come on , One IP The address is essentially 32 An integer
You usually use “ dotted decimal " In this way to express this IP Address three points , hold 32 Bit integers are divided into 4 Parts of , Each part 1 Bytes . The value of each part is 0-255
IP Address management
IP An address is a dotted decimal data
IP The address is divided into two parts : network number + Host number
network number : Describe current network information ( Identification of LAN )
Host number : Distinguish the hosts inside the LAN
Be careful : In the same LAN , The network numbers between hosts are the same , The host number cannot be the same . Two adjacent LANs ( Connected to the same router ), The network number is also different .
distinguish IP Network number and host number in the address :
introduce Subnet mask : Subnet mask , Also a 32 position , An integer expressed in dotted decimal 
Of the subnet mask It's all on the left 1, On the right 0( Can't 1,0 Mixed arrangement )
These on the left 1 It means which bits are network numbers
be left over 0 It means which bits are the host number
for example : In the general domestic scene , There are few LAN devices ( Not more than 255) The common subnet mask is 255.255.255.0
The decimal system is :
1111 1111 1111 1111 1111 1111 1111 0000 0000
In this LAN IP Address before 24 individual bit Time network number , after 8 individual bit Bit is the host number
If there are more LAN devices , Some other values will appear in the subnet mask
special IP Address :
If IP The host number of is all 0, The IP It means network number .( A normal device in the LAN , Host number cannot be set to 0)
If IP The host number of is all 1(255), The IP It means " Broadcast address ". Messages sent to this broadcast address , The whole LAN can receive
IP The address is 127 At the beginning , The IP All means " Loopback IP", Indicates that the host itself ,127.0.0.1( Loopback IP Typical representative of )
IP The address is 10 start ,192.168 start ,172.16-172.31 start , It means that we should IP The address is a LAN internal IP( Intranet IP)
besides , The rest IP be called Extranet IP( Used directly on the WAN IP)
Be careful : Extranet IP It must be unique . Every extranet IP Will correspond to a unique device .
Intranet IP It is only unique in the current LAN . In different LANs , You can have the same intranet IP The equipment
solve IPv4 The problem of insufficient address
1. Dynamic allocation IP Address : When the equipment is connected to the network, there are IP, Are you disconnected IP( There is no reduction in equipment ,IP The address has not been added : Treat the symptoms, not the root cause )
2.NAT Mechanism : Let multiple devices share the same external network IP.
Specifically :
NAT Mechanism , hold IP Divided into intranet ( LAN ) And the Internet ( Wide area network ), So the Internet IP It can be accessed anywhere on the Internet . Intranet IP It can only be accessed within the current LAN and is unique in the current LAN . At the same time, several devices in the intranet , You can share the same external network IP. here , Every extranet IP Can mean thousands of , Even tens of thousands of devices .
So when using the same extranet IP Multiple users access the extranet server through the LAN ( Extranet IP) when , The operator's router will be modified here IP The datagram , The source that will be sent from the intranet IP Change to the Internet IP, Router device with such function , Also known as NAT equipment .
Then through the ISP The same IP Multiple users of the same address access the same server at the same time ( Extranet IP) when , The port is used to distinguish , And return the respective response data
NAT Just a wave of renewal , But it doesn't solve the problem fundamentally
3.IPv6
IPv6 A longer field is used in the header to represent IP Address 16 Bytes ,128 position ,2 Of 128 Power 
Each number is a hexadecimal number (4bit) Each colon is divided 2 Bytes
IPv6 It is said that it can distribute one to every sand on the earth IP Address
Routing
Routing , That is, planning the path .
Between two devices , To find a way , Can complete the process of transmission
To find the way , Premise is , You have to know the way first
IP The routing of the protocol is similar .IР Destination address in datagram , It means where the bag is going to be sent , This destination address , If the current router knows directly , Just tell you the way ~ If the current router does not know , Will tell you a general direction , Let you ask when you go to the next router
Go back in turn , In fact, it is getting closer and closer to the goal . At this time, you will always encounter a router that knows this address, so you can forward it concretely , sometimes , Not only did he encounter a router that knew the address, but he also knew several routes ~~ You can choose a more suitable way .
边栏推荐
- SSL v** technical principle
- What is the time complexity of the redis command?? (the actual question is about the underlying structure of redis)
- MCS: discrete random variables - geometric distribution
- MySQL开发规范.pdf
- What is the relationship between synchronized and multithreading
- 极化SAR地表分类
- Hi,你有一份Code Review攻略待查收
- Lumiprobe click chemistry - non fluorescent azide: azide-peg3-oh
- Biovendor free light chain( κ and λ) Chemical properties of ELISA Kit
- postgresql源码学习(25)—— 事务日志⑥-等待日志写入完成
猜你喜欢

使用自定义注解实现Redis分布式锁

ROS notes (10) - Launch file startup

Lumiprobe reactive dye cycloalkyne dye: af488 dbco, 5 isomer

MCS: discrete random variable Pascal Distribution

12.UDP协议-bite

PyTorch 二维多通道卷积运算方式

Render follows, encapsulating a form and adding data to the table

Northwestern Polytechnic University attacked by overseas e-mail

File常用工具类, 流相关运用 (记录)

postgresql源码学习(23)—— 事务日志④-日志组装
随机推荐
Classe d'outils commune de fichier, application liée au flux (enregistrement)
Dynamically listening for DOM element height changes
What is the time complexity of the redis command?? (the actual question is about the underlying structure of redis)
【力扣10天SQL入门】Day7+8 计算函数
File common tool class, stream related application (record)
Development and application of NFT chain Games: Six noteworthy NFT trends in 2022
Paging SQL (rownum, row_number, deny_rank, rank)
Intelligent diagnosis of Alzheimer's disease
第九章 APP项目测试(此章完结)
Lumiprobe 活性染料丨羧酸:Sulfo-Cyanine7.5羧酸
Uncover the practice of Baidu intelligent test in the field of automatic test execution
JS 会有变量提升和函数提升
Informatics Olympiad all in one 2061: trapezoidal area
"Game engine shallow in shallow out" 98 Substancepainer plug-in development
Symfony framework security component firewall configuration
Imgutil image processing tool class, text extraction, image watermarking
NFS configuring file mapping between two hosts
Mysql database naming conventions PDF
动态监听DOM元素高度变化
Informatics Olympiad all in one 1000: introductory test questions