There are many kinds of computer network, according to different classification principles, can get a variety of different types of computer network.

Classified by size and reach:

  • Local Area Network (LAN)
  • Metropolitan Area Network (MAN)
  • Wide Area Network (WAN)

The Internet can be regarded as the world’s largest wide area network.

Classified according to the topology of the network:

  • The star network
  • Bus network
  • Loop network
  • Tree network
  • Star loop network

Classified according to the transmission media of the network:

  • Twisted-pair cable network
  • Coaxial cable network
  • Optical fiber network
  • The satellite network

To realize communication in computer network, there must be some conventions, which are called communication protocols. A communication protocol usually consists of three parts:

  • The semantic part is used to determine the type of dialogue between the two parties
  • The grammar section, which determines the format of the dialogue between the two parties
  • The transformation rule is used to determine the response relationship between the communication parties

OSI (Open System Interconnection), from the bottom to the computer network is divided into:

  • Physical layer (lowest level)
  • Data link layer
  • The network layer
  • The transport layer
  • The session layer
  • The presentation layer
  • Application layer (top layer)

IP (Internet Protocol) : Internet Protocol (TCP) Protocol: Transmission Control Protocol

TCP/IP protocol, Transmission Control/Network Protocol, also known as the network communication protocol. It is the most basic communication protocol used in the network. From the bottom up, computer networks are divided into:

  • Network interface layer (including: physical layer, data link layer) (the 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 a network, which could be a host, a printer, or a port on a router.

The IP address is numeric and is a 32-bit (32bit) integer, usually divided into four 8-bit binary numbers separated by a dot. Each 8-bit integer can be converted to a decimal integer from 0 to 255.

A port is a 16-bit integer that indicates which communication program handles the data. A port, therefore, is an abstract software structure that includes data structures and I/O (basic input/output) buffers as the entry point through which an application communicates with the outside world.

IP address can be understood as the address of a person’s place (including street and house number), but address alone is still not able to find the person, you also need to know his room number, that is, port number. And the computer network acts as the mailman.

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 the data to the program corresponding to the IP address and port.