当前位置:网站首页>Network layer: IP protocol
Network layer: IP protocol
2022-06-22 06:42:00 【FIappy Brid】
ip Protocol related concepts
- host : Equipped with ip Address , But the device that does not perform route control !
- Router : Equipped with ip Address , And can do their best to control the route !
- node : Host and router !
Form of agreement
- 4 Bit version number (version): instructions ip Version of protocol , about IPv4 Namely 4,IPv6 Namely 6!
- 4 Bit head length (header length) : IP The length of the head is 32bit, That is to say length*4 Bytes of ,4bit The maximum length of the representation of is 15, therefore ip The maximum length of the head is 60 byte !
- 8 Bit service type (Type Of Service): 3 Bit priority field ( Have been abandoned ),4 position TOS Field , and 1 Bit reserved field ( Must be set to 0).
- TOS: 4 Bits denote respectively minimum delay , Maximum throughput , The most reliable , Minimum cost . These four conflict with each other , Only one... Can be chosen !
- 16 Bit total length : IP How many bytes does the datagram occupy as a whole !
- 16 Bit mark (id): It uniquely identifies the message sent by the host . If IP Messages are fragmented at the data link layer , So every piece of id It's the same !
- 3 Bit flag field : The first one is reserved , The second is 1 Indicates that fragmentation is prohibited ( At this time, if the message length exceeds MTU ,IP The module will discard the message ), The third means " More pieces ", If IP The message is fragmented , The third position mark of the last partition is 1 End of expression , Others are set to 0!
- 13 Bit slice offset (frameagement offset): It's the shards relative to the original IP Offset at the beginning of the message .
- 8 Bit lifetime (Time to Live TTL): The maximum number of message hops when datagram arrives at destination . The initial value is 64, Every time we go through a route ,TTL -= 1, Down to 0 It hasn't arrived yet , Then discard it . This field is mainly used to prevent routing loops !
- 8 Bit agreement : Indicates the type of upper layer protocol !
- 16 Bit header checksum : Use CRC Painstaking verification , To identify if the head is damaged !
- 32 Bit source address ,32 Bit destination address : Indicates the sender and receiver !
Segment division
IP The address is divided into two parts , Network number and host number
- network number : Ensure that two interconnected network segments have different identifications !
- Host number : Ensure that in the same network segment , Hosts have the same network number , But the unused host must have a different host number !
- Different subnets put together hosts with the same network number !
- If you add a host to the subnet , Then the network number of this host is consistent with that of this subnet , But the host number cannot be the same as other hosts in the subnet !
- DHCP : It can assign to new hosts in the subnet IP Address , Avoid the trouble of manual management !
- Subnet mask : Used to distinguish network number and host number , Usually 32 Positive integer , take IP The address and subnet mask are bitwise AND , The result is the network number !
- special IP :
- take IP All host addresses in the address are set to 0, It becomes a network number , Represents a local area network !
- take IP All host addresses in the address are set to 1, It becomes a broadcast address , It is used to send datagrams to all hosts connected to each other in the same link !
- 127.* Of IP Address is used for local loopback test , Commonly used 127.0.0.1!
private IP and Public network IP
If a local area network is set up within an organization ,IP Address is only used for LAN communication , Instead of connecting directly to Internet On , Use any IP The address can be , however RFC1918 It specifies the private use of the local king of components IP Address :
- 10.* The first eight digits are network numbers , common 167772176 An address !
- 172.16. To 172.31. front 12 Bit is the network number , common 1048576 An address !
- 192.168.* , front 16 Bit is the network number , common 655535 An address , Included in this scope , Are called private IP , The rest are called public networks IP( overall situation IP)!
- One router can be configured with two IP Address , One is WAN Oral IP , One is LAN Oral IP( subnet IP)!
- Router LAN Port connected host , All belong to the subnet of the current router !
- Different routers , subnet IP It's all the same ( Usually 192.168.1.1) . Hosts in the subnet IP Can't repeat , But between subnets IP It can be repeated !
- Every home router , In fact, it is also a node in the router subnet of the operator . Such an operator router may have many levels , The outermost operator router WAN mouth IP It's a public network IP 了 !
- When the host in the subnet needs to communicate with the external network , The router will IP The first IP Address conversion ( Replace with WAN Oral IP), In this way, replace... Step by step , In the final packet IP The address becomes the public network IP. This technology is called NAT(Network Address Translation , Network address translation ).
route
Concept : Find a way to the destination in the complex network structure !
IP The transmission process of a packet :
- When IP Data packets , When you reach the router , The router will check the destination first IP!
- The router decides that the packet can be sent directly to the target host , Or send it to the next router !
- Repeat the above steps , Until the end is achieved IP Address !
边栏推荐
- Anaconda introduction, installation and use nanny level tutorial
- [5g NR] ng setup of ngap protocol
- Test ofnatural clusters via s-dbscan a self tuning version of DBSCAN
- 【M32】单片机 Code、RO Data、RW Data、ZI Data 简单解读
- 【5G NR】NAS连接管理—CM状态
- 5g-guti detailed explanation
- Overview of coherent sonar Geoswath
- Advanced usage of setting breakpoints during keil debugging
- Languo technology helps the ecological prosperity of openharmony
- keil C关于switch语句问题导致芯片不能正常运行
猜你喜欢
![[openairinterface5g] rrcsetuprequest for RRC NR resolution](/img/de/34e71154941f977546362f10a19929.jpg)
[openairinterface5g] rrcsetuprequest for RRC NR resolution

The tidb community offline exchange meeting was seen by the partners from Tianjin and Shijiazhuang~

【5G NR】NAS连接管理—CM状态

关于solidity的delegatecall的坑

Performance comparison and analysis

C skill tree evaluation - customer first, making excellent products

Which is the best agency mode or decoration mode

Common auxiliary classes - (key)
![[openairinterface5g] high level module interface and ITTI entity thread creation](/img/29/9a04338437271c350bef992a26828d.png)
[openairinterface5g] high level module interface and ITTI entity thread creation

Expert system clips from introduction to mastery (I) introduction and overview of clips
随机推荐
Cmake entry level syntax
Detailed explanation of eight locks
[openairinterface5g] project directory structure
SQL 注入漏洞(十四)xff 注入攻击
MySQL ifnull processing n/a
[5g NR] UE registration management status
MySQL Niuke brush questions
[5g NR] ng interface
成功解决raise KeyError(f“None of [{key}] are in the [{axis_name}]“)KeyError: “None of [Index([‘age.in.y
On the pit of delegatecall of solidity
5G-GUTI详解
代理模式与装饰模式到底哪家强
SQL 注入漏洞(十三)base64注入
[PHP]TP6 CLI模式下创建tp6和多应用配置以及常见问题
Surfer grid file clipping
Difference between thread and process
Great progress in code
[5g NR] RRC connection reconstruction analysis
【OpenAirInterface5g】高层模块接口及itti实体线程创建
[5g NR] ng setup of ngap protocol