当前位置:网站首页>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 ;

原网站

版权声明
本文为[Xiao Qiao]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/209/202207280520117311.html