当前位置:网站首页>First understand the principle of network

First understand the principle of network

2022-07-07 03:33:00 dhdhdhdhg


One 、 Network division

1. LAN

Use some network devices to connect multiple hosts , These hosts can communicate with each other , That is to access the resources provided by each other , Such as :

  • html Webpage
  • css file
  • js file
  • picture
  • video
  • music

Be careful : If the LAN is not connected to the public network , Host in LAN , You can't access the resources of the public network

2. Wide area network

We all recognize the open network , All connected hosts can access

3. Network communication

Through the network , Get a resource on a host in the network

Two 、IP Address

Identify the network address of a host on the network

1. Format

Divided into four parts , In the middle "." interval , Each part 0~255(8 A bit , A byte )
This machine ip:127.0.0.1
For network communication :
Such as :A( client ) visit B( Server side ) A web page of

client : Generally, it is the process used by users ( browser )
Server side : A process that provides resources (web The server )
process : A program that runs
Program : Static executable file on hard disk

So we can't only find the host when communicating , To find out which process is on the host , How to find it ? This is it Our process is identified by the port number

3、 ... and 、 Port number

Identification network communication , A process on a host
combination ip and port, You can know which host you want to get on the network , And resources in which process

Four 、 agreement

Network communication , The agreement that everyone should abide by 、 standard
Finally, it is embodied in the format of data packets
It is similar to doing programming problems on Niuke online , Input format : For example, the first line is a number n, The second line is n A digital , Space interval


原网站

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