当前位置:网站首页>Network - network layer
Network - network layer
2022-07-28 06:54:00 【Xiao Qiao】
One 、 Network layer functions
Address management and routing .
Two 、 Knowledge involved in the network layer
host : Equipped with IP Address , But devices that do not perform routing control ;
Router : Both equipped with IP Address , And routing control ;
route : It belongs to the technology used in routers , It mainly plans the route of network data transmission ( Which direction is closer )
node : Host and router ;
Segment division :
IP The address is divided into two parts , Network number and host number
network number : Ensure that the two network segments connected with each other have different identifications
Host number : Within the same network segment , Hosts have the same network number , But there are different host numbers
IP Format of address :4 Parts of , Every part is 0~255( Decimal system )
classification :A~E, There are five types of addresses, each of which has a range
| Category name | network number | Host number |
|---|---|---|
| A | The first 1 Parts of | after 3 Parts of |
| B | front 2 Parts of | after 2 Parts of |
| C | front 3 Parts of | Last 1 Parts of |
The host number range indicates the network , How many hosts can be put ;
DHCP technology :
The new host nodes in the subnet can be automatically assigned IP Address , Avoid manual management IP, Generally, the router comes with DHCP, It can be seen as DHCP The server ;
Subnet mask :
Format and IP The address is the same (32 Binary number )
effect : distinguish IP How to distinguish the network number and host number of the address ?IP Address and subnet mask are calculated by bit and , Get the network number , Negative network number , It's the host number ;
Application scenarios : Distinguish whether it is the same network segment IP, A host sends a datagram to the destination host , Use the subnet mask to separate the hosts IP And purpose IP Get the network number , contrast , The same is the same network segment ;
special IP: The host addresses are all 1, Show broadcast ( Purpose IP It is no longer locating a host , Instead, all hosts in the network segment , Will send this datagram ) This machine ip:127.0.0.1
IP The number of addresses is limited :
CIDR To some extent, it alleviates IP The address is insufficient ( Improved utilization , Reduce waste , however IP The absolute upper limit of address has not increased )
Solution :
① Dynamically assign addresses : Only devices connected to the network are assigned IP Address , So the same MAC Address devices , Every time you access the Internet , Got IP The address is not necessarily the same ;
②NAT technology : Be able to put private IP When communicating with the outside world, it turns to the overall situation IP, private IP And the big picture IP Mutual transformation technology
(NAPT technology : Provide LAN host IP+ process port and Router public network IP+port Means of mutual transformation )
③IPv6: Not at all IPv4 Simple upgrade of , These are two unrelated agreements , Not compatible with each other ,IPv6 use 16 byte 128 To represent a IP Address , But at the moment IPv6 It's not universal yet ;
边栏推荐
- NiO example
- Analysis of the semaphore source code of AQS
- Question brushing record - linked list
- Scratch command
- 网络——传输层(详细版)
- Test interview questions collection (III) | computer network and database (with answers)
- Pku-2739-sum of constructive prime numbers
- Technology sharing | do you know the functions of the server interface automated testing and requests library?
- 小tips
- Pku-2524-ubiquitous relations (parallel search template)
猜你喜欢

NFS 共享存储服务

MySQL master-slave
![[C language] dynamic memory management](/img/bb/2ec65b38e85f53269dc03d885d70f4.png)
[C language] dynamic memory management

Cocos2d-x learning notes Tile Map tiledmap
![Implementation of simple address book in [c language]](/img/75/8f2f4dd1c166808047cda6bea5a746.png)
Implementation of simple address book in [c language]

Redis cache design and performance optimization

C language memcpy library functions and the role of memmove

DNS domain name resolution service

Dynamic memory management function of C language

Compilation and preprocessing of C language
随机推荐
什么是线性表?
思寒漫谈测试人职业发展
Ubuntu18.04搭建redis集群【学习笔记】
Qgraphicsview promoted to qchartview
cocos2d-x 学习笔记——瓦片地图TiledMap
Test interview questions collection (III) | computer network and database (with answers)
Regular execution of scratch
KVM hot migration
rancher部署实战
Technology sharing | interface testing value and system
Technology sharing | how to simulate real use scenarios? Mock technology to help you
Water drop effect on umbrella
KVM热迁移
NFS shared storage service
Redis implementation of distributed lock and analysis of the main process of redismission distributed lock
技术分享 | 使用 cURL 发送请求
FTP服务
Analysis of the semaphore source code of AQS
小tips
What is the most practical gift for Tanabata? A gift that will never go wrong is worth buying