当前位置:网站首页>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 ;
边栏推荐
- FTP服务
- Installation and configuration of unit test framework jest with typescript
- Centos7 deploy MySQL database server
- [C language] string library function introduction and simulation
- [C language] custom structure type
- Compilation and preprocessing of C language
- Implementation of simple address book in [c language]
- Array solution script
- Which brand of air conduction earphones is better? These four should not be missed
- prometheus监控nacos
猜你喜欢
随机推荐
Cocos2d-x learning notes Tile Map tiledmap
[the beginning of self redemption]
HDU-1159-CommonSubsequence(LCS最长公共子序列)
DNS正向解析实验
Optimization ideas from ordinary query commodities to highly concurrent query commodities
Ubuntu18.04+Centos7配置redis主从【学习笔记】
Rain Scene Effect (I)
Which brand of air conduction earphones is better? These four should not be missed
Technology sharing | common proxy tools for interface testing
Test interview questions collection (II) | test tools (with answers)
Ubuntu18.04+centos7 configure redis master-slave [learning notes]
Hdu-5805-nanoape loves sequence (thinking questions)
How to simulate the implementation of strcpy library functions
PKU-2739-Sum of Consecutive Prime Numbers(筛素数法打表)
Scratch command
Skimming records -- sequence traversal of binary tree
FTP服务
Analysis of the semaphore source code of AQS
NFS 共享存储服务
Array solution script









