当前位置:网站首页>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 ;
边栏推荐
猜你喜欢

JS逆向100题——第1题

Using C language to realize three piece chess games

Mongo SSL configuration practice

C language memcpy library functions and the role of memmove

浅谈Cookie和Session

cocos2d-x 学习笔记——瓦片地图TiledMap

2022 Tanabata gift recommendation! Nice, cheap and practical gift recommendation

单元测试框架Jest搭配TypeScript的安装与配置

技术分享 | 使用postman发送请求

DHCP原理与配置
随机推荐
raid磁盘阵列
Compilation and preprocessing of C language
Small tips
Ubuntu18.04 set up redis cluster [learning notes]
NAT和PAT的原理及配置
单元测试框架Jest搭配TypeScript的安装与配置
yapi漏洞挂马程序chongfu.sh处理
Test interview questions collection (V) | automated testing and performance testing (with answers)
Redis implementation of distributed lock and analysis of the main process of redismission distributed lock
测试面试题集锦(一)| 软件测试常见必考问题与流程篇(附答案)
Analysis of the semaphore source code of AQS
链表中结点的插入和删除
Elastic common high frequency commands
Fermat's theorem
C language memcpy library functions and the role of memmove
Ten thousand words summarize and realize the commonly used sorting and performance comparison
Rain Scene Effect (I)
进程和线程的区别
Technology sharing | common proxy tools for interface testing
How to simulate the implementation of strcpy library functions