There are many kinds of computer networks. According to different classification principles, different types of computer networks can be obtained.
According to size and scope of extension:
- Local area Network (LAN)
- Metropolitan Area Network (MAN)
- Wide area Network (WAN)
The Internet can be considered the world’s largest wan.
According to the topology of the network:
- The star network
- Bus network
- Loop network
- Tree network
- Star loop network
According to the transmission medium of the network:
- Twisted-pair cable network
- Coaxial cable network
- Optical fiber network
- The satellite network
Communication in computer networks must have some conventions, which are called communication protocols. A communication protocol usually consists of three parts:
- The semantic part, which determines the type of conversation between the two parties
- The grammar section, which determines the format of the conversation between the two parties
- Transformation rules are used to determine the response relationship between communication parties
The Open System Interconnection (OSI) model divides computer networks into the following categories:
- Physical layer (lowest level)
- Data link layer
- The network layer
- The transport layer
- The session layer
- The presentation layer
- Application layer (top layer)
Internet Protocol (IP) : Internet Protocol Transmission Control Protocol (TCP) : Transmission Control Protocol
TCP/IP, transmission control/Network protocol, is also called network communication protocol. It is the most basic communication protocol in the use of network. From bottom to bottom, the computer network is divided into:
- Network interface layer (including physical layer and data link layer) (bottom layer)
- The network layer
- The transport layer
- Application layer (including: session layer, presentation layer, application layer) (top layer)
An IP address is used to uniquely identify a communication entity in the network, which can be a host, a printer, or a port on a router.
An IP address is a 32-bit integer. It is usually divided into four 8-bit binary numbers separated by dots. Each 8-bit integer can be converted into a decimal integer ranging from 0 to 255.
A port is a 16-bit integer that indicates to which communicator the data should be processed. A port is an abstract software structure that includes data structures and I/O (basic input/output) buffers.
You can think of an IP address as the address of a person’s place (including the street and house number), but you still can’t find the person just by the address. You also need to know his house number, or port number. And computer networks act as postmen.
When a program needs to send data, it needs to specify the IP address and port number of the destination, and the computer network can send data to the program corresponding to the IP address and port.