So today we understand that under the weak power project, we must know some basic network knowledge, or it is really troublesome to involve the network project! So it is useful to have time to learn more about network knowledge.
Basic concept of the network
Client: Application C / S (client / server) B / S (browser / server)
Server: A machine that provides services, data, and resources to clients.
Request: The client requests data from the server. Click to download massive engineering data for free.
Response: The server responds to the client request, typically returning data to the client.
URL
Uniform Resource Locator (Uniform Resource Locator)
Every resource in the network corresponds to the address of only Yi - URL
IP, subnet mask, router, DNS
IP address
The IP address is a unified address format provided by the IP protocol. It assigns a logical address to each network and each host on the Internet to shield the physical address (each machine has a code, such as MAC). There is a difference in something called a MAC address. Is 32-bit binary data, usually expressed in decimal, separated by ".". An IP address is a logical address that identifies a host on the network and is unique on the local area network.
IP
IP (Protocol Interconnected between Networks) It is a set of rules that enables all computer networks connected to the network to communicate with one another, defining the rules that computers should follow when communicating over the Internet. Any computer system produced by any manufacturer can be interconnected with the Internet as long as it complies with the IP protocol. The IP address is only Yi, that is, the IP address of each machine is Yi only in the world. This refers to the real IP on the network. It is calculated by the "AND" operation of the local IP address and subnet mask and then through various processing (to comply with the TCP protocol, plus the message and port, I If you don't scrutinize it, you can't use it now. Anyway, I know that I have been processed for a while.) By the way, I will teach you how to check your real IP:
Subnet mask
To understand what a subnet mask is, you can't understand the composition of the IP address. The Internet is made up of many small networks, each with many hosts, which form a hierarchical structure. The IP address is designed to take into account the hierarchical characteristics of the address allocation. Each IP address is divided into two parts, a network number and a host number, to facilitate the addressing operation of the IP address.
What is the network number and host number of the IP address? If you do not specify, you do not know which bits are the network number and which are the host numbers. This needs to be implemented by the subnet mask. What is a subnet mask Subnet mask cannot exist alone, it must be used in conjunction with an IP address. The subnet mask has only one effect, that is, the division of an IP address into a network address and a host address. The setting of the subnet mask must follow certain rules. Like the IP address, the subnet mask is also 32 bits long. The left side is the network bit, which is represented by the binary digit "1"; the right side is the host bit, which is represented by the binary digit "0". Assume that the IP address is "192.168.1.1" and the subnet mask is "255.255.255.0". Among them, there are 24 "1"s, which means that the left 24 bits of the IP address corresponding to this are the network numbers; there are 8 "0"s, which means that the right 8 bits of the IP address corresponding to this are the host numbers. Thus, the subnet mask determines which of the 32-bit binary digits of an IP address are network numbers and which are host numbers. This is very important for networks that use the TCP/IP protocol. Only through the subnet mask can the relationship between the subnet where one host resides and other subnets be made, so that the network works normally.
There are hundreds of commonly used subnet masks. Only the two most commonly used subnet masks are described here.
The network with the subnet mask is "255.255.255.0":
The last digit can be arbitrarily changed from 0 to 255, so 256 IP addresses can be provided. However, the actual number of available IP addresses is 256-2, that is, 254, because the host numbers cannot all be "0" or all "1".
Click to download massive engineering materials for free
A network with a subnet mask of "255.255.0.0":
The latter two numbers can be arbitrarily changed from 0 to 255, and 2552 IP addresses can be provided. However, the actual number of IP addresses available is 2552-2, which is 65,023.
The subnet mask setting of the IP address is not arbitrary. If the subnet mask is set too large, that is to say, the subnet range is expanded, according to the subnet routing rule, it is likely that the data of the target host that is not in the same subnet as the local host will be judged by mistake. If the target host is in the same subnet, then the data packet will be looped in this subnet until it times out and is discarded, so that the data cannot reach the target host correctly, resulting in network transmission error; if the subnet mask is set too small Then, the communication between the machines that belong to the same subnet will be treated as a cross-subnet transmission, and the data packets will be handed over to the default gateway for processing, which will inevitably increase the burden of the default gateway (explained below the article), resulting in Network efficiency is declining. Therefore, the subnet mask should be set according to the size of the network. If the size of a network does not exceed 254 computers, use "255.255.255.0" as the subnet mask. Most LANs will not exceed this number, so "255.255.255.0" is the most commonly used IP address. Netmask; if there are more than 1500 computers in a university, this size LAN can use "255.255.0.0".
Gateway
A gateway is essentially an IP address that a network leads to other networks. For example, there are network A and network B. The IP address range of network A is “192.168.1.1~192.168.1.254â€, the subnet mask is 255.255.255.0, and the IP address range of network B is “192.168.2.1~192.168.2.254â€. The subnet mask is 255.255.255.0. In the absence of a router, TCP/IP communication is not possible between the two networks. Even if the two networks are connected to the same switch (or hub), the TCP/IP protocol will be based on the subnet mask (255.255). .255.0) Determine that the hosts in the two networks are in different networks. To achieve communication between the two networks, you must pass through the gateway. If the host in network A finds that the target host of the data packet is not in the local network, it forwards the data packet to its own gateway, and then the gateway forwards it to the gateway of network B, and the gateway of network B forwards it to some network B. Host. The same is true for the process in which network B forwards data packets to network A. Therefore, only by setting the IP address of the gateway, the TCP/IP protocol can realize mutual communication between different networks. So which IP address is the IP address of this machine? The IP address of the gateway is the IP address of the device with routing function. The devices with routing function are routers, servers with routing protocols enabled (essentially equivalent to one router), and proxy servers (also equivalent to one router).
Router (called the default gateway under Windows, the gateway is the route, the route is the gateway)
If you figure out what the gateway is, the default gateway will understand. Just like a room can have multiple doors, a host can have multiple gateways. The default gateway means that if a host cannot find an available gateway, it will send the packet to the default gateway, which will process the packet. The gateway used by the host now generally refers to the default gateway.
How to set the default gateway The default gateway of a computer can't be specified casually. It must be specified correctly. Otherwise, one computer will send the data packet to the computer that is not the gateway, so it can't communicate with the computers of other networks. The default gateway settings are manual and automatic.
Manual setting: Manual setting is applicable to the case where the number of computers is relatively small and the TCP/IP parameters are basically unchanged, such as only a few to a dozen computers. Because this method needs to set the "default gateway" on each computer connected to the network, it is very laborious. Once the IP address of the default gateway has to be modified due to migration, etc., it will bring great trouble to the network management, so it is not Recommended Use. It is important to note that the default gateway must be the IP address in the network segment where the computer is located, but not the IP address in other network segments.
Auto Setup: Auto Setup uses a DHCP server to automatically assign IP addresses, subnet masks, and default gateways to computers on the network. The advantage of this is that once the default gateway of the network changes, as long as the default gateway settings in the DHCP server are changed, all computers on the network get the IP address of the new default gateway. This method is suitable for networks with large network sizes and possible changes in TCP/IP parameters. Another way to automatically obtain a gateway is to obtain it automatically by installing a client program of a proxy server software (such as MS Proxy). The principles and methods are similar to DHCP. Due to space limitations, it will not be detailed.
Default gateway
The Default Gateway is a node in a computer network that forwards packets to other networks. On a typical TCP/IP network, nodes (such as servers, workstations, and network devices) have a defined default routing setting (pointing to the default gateway). The next hop IP address of the sent packet can be clarified without a specific route.
It can be seen that the default gateway is the default gateway, so some people will say that since there is a reason why there is a default gateway out of thin air, my understanding is this, it should be said that the default gateway is a subset of the default gateway. The default gateway has a defined default routing setting (pointing to the default gateway). The default gateway is equivalent to a proxy server temporarily managing the sent packets. When sent to the target host, it is received by the default gateway of the target host and then found. The default gateway is equivalent to the default gateway is the parent class, the default gateway is the subclass ~~
DNS server
Domain Name Server. There is a one-to-one correspondence between domain names and IP addresses on the Internet. Although domain names are easy for people to remember, machines can only know each other's IP addresses. The conversion between them is called domain name resolution. Domain name resolution requires a special domain name. DNS server is the server that performs domain name resolution.
DHCP server
DHCP refers to the range of IP addresses controlled by the server. When the client logs in to the server, it can automatically obtain the IP address and subnet mask assigned by the server. Increase the usage rate of the address.
MAC address
The MAC address is like the number on our identity, and it has the global only Yi nature. (Know this, you don't have to look down)
MAC (Media Access Control) address
The first 24 digits are called Organizationally Unique Identifiers (OUIs), which are codes assigned by different IEEE registries to different manufacturers and distinguish different manufacturers.
The last 24 bits are assigned by the manufacturer itself and are called extension identifiers. The 24 bits after the MAC address in the network card produced by the same manufacturer are different.
The physical address of the network card is usually the EPROM burned into the network card by the network card manufacturer (a kind of flash memory chip, which can usually be erased by program). It stores the computer that actually transmits the data and the host that receives the data when transmitting the data. address. Click to download massive engineering materials for free
That is to say, in the physical transmission process of the underlying network, the host is identified by the physical address, and it must be globally only Yi. For example, a well-known Ethernet card whose physical address is a 48-bit (bit) integer, such as 44-45-53-54-00-00, is stored in the host interface in a machine-readable manner. The Ethernet address management mechanism (except for this) (IEEE) (IEEE: Institute of Electrical and Electronics Engineers) divides the Ethernet address, which is a 48-bit combination, into several independent contiguous address groups. The manufacturer of the Ethernet network card purchases one of them, and in the specific production, the only Yi address is assigned to the Ethernet card one by one.
In a stable network, IP addresses and MAC addresses appear in pairs. If a computer wants to communicate with another computer on the network, then configure the IP addresses of the two computers. The MAC address is set when the network card is shipped from the factory. The configured IP address forms a correspondence with the MAC address. . In data communication, the IP address is responsible for representing the network layer address of the computer, the network layer device (such as a router) operates according to the IP address; the MAC address is responsible for representing the data link layer address of the computer, and the data link layer device (such as a switch) Operate according to the MAC address. The mapping relationship between IP and MAC addresses is performed by the ARP (Address Resolution Protocol) protocol.
server
1, the classification of the server
According to the software development stage, the server can be roughly divided into two types.
(1) Remote server
Alias: external network server, official server
Usage phase: the server used after the application goes online
Use crowd: for all users
Speed: server performance, user's network speed
(2) local server
Alias: intranet server, test server
Phase of use: The server used by the application during the development and testing phases
Use crowd: only for developers and testers inside the company
Speed: Because it is a local area network, it is fast and helps to improve the efficiency of development testing.
2, the choice of local server
The remote server is the local intranet server that opens the external network access. If you are in the learning and development stage, you can set up a local server.
The port number
Ports include physical ports and logical ports. A physical port is an interface used to connect physical devices, and a logical port is a port that is logically used to differentiate services. Ports in the TCP/IP protocol are logical ports that distinguish different services through different logical ports.
What is the use of the port? We know that a host with an IP address can provide many services, such as Web services, FTP services, SMTP services, etc. These services can be implemented by one IP address. So, how does the host distinguish between different network services? Obviously, you can't rely solely on IP addresses because the relationship between IP addresses and network services is one-to-many. In fact, the "IP address + port number" is used to distinguish different services.
1, recognized ports (Well-Known Ports)
This type of port is also often referred to as a "common port." Port numbers for these ports range from 0 to 1023, and they are tightly bound to specific services. Usually the communication of these ports clearly indicates the protocol of a certain service, and such a port can no longer redefine its role. Port 80 is actually used by HTTP communication, while port 23 is dedicated to Telnet services.
2, the registered port (Registered Ports)
The port number is from 1025 to 49151. Assigned to a user process or application. These processes are primarily applications that the user chooses to install, rather than the usual programs that assign well-recognized ports.
3. Dynamic and/or private ports (Dynamic and/or Private Ports)
It is called a dynamic port because it generally does not allocate a certain service, but is dynamically allocated.
Office Adhesive Tape,Sticky Tape,Stationary Tape,Stationery Tape,Office Tape
Shenzhen An Bi Chang Packaging Material Co.,Ltd. , https://www.szabctape.com