--- network infrastructure computer network (TCP / IP five layer model, data encapsulation and demultiplexing)

  • Knowledge network commonly used terms and basic concepts
  • Familiar with the OSI model and TCP / IP five layer model
  • Understood that process data transmission network communications
  1. Recognition network commonly used terms
  • ip address
    ip address is a host to express our poor because the number of memory, usually represented in dotted decimal IP, each data will include the source IP and destination IP, IP is marked our two computers communication, commonly ip address : IPV4,32 bit address range is 4.2 billion 9,000, apparently ip address is not enough in our world so the devices, methods usually used here:
    the DHCP dynamic address allocation: For whom who gave allocation.
    NAT: address substitution, people use the Internet to achieve the same IP address
    Here Insert Picture Description

  • PORT port:
    on the host represents a marked process, (uint16_t) pid port can not be used as port number, because pid will change, network programming carve the client and server side, initiate connections to the party is the client and the passive acceptance of the request a server, each data contains our source ip, source port, the purpose of ip, purpose port. PORT is to label application on your computer.

  • Protocol
    communication between the parties agreed, in which each layer contains its own protocol, the protocol data is packaged unified communication and parsing operations to ensure the accuracy of the data.
    Network protocol: data format consisting of a network communication environment,
    protocol layering: is a protocol package, then the package easy to use, a clear division of the service interface and protocol implementation for the standard form for us to use.

  1. Familiar with the OSI model and the TCP / IP five layer model
    of the OSI model: seven layer network model is called the Open Systems Interconnection Reference Model, and is defined on a logical specification.
    Here Insert Picture Description
    Although we are in the OSI model each layer has its own implementation for the physical device corresponding to each layer, for each of the services, protocols and interfaces to distinguish clearly and carefully. Although the seven-layer model features distinguish carefully, but more difficult to achieve, generally use TCP / IP five layer model in reality.
  • TCP / IP five layer model of
    Here Insert Picture Description
    a physical layer: Optical responsible for signal transmission, the physical hardware landmark: Hub
    data link layer: a data frame transmitted between neighboring devices, hardware signature: switch (physical layer to the link layer functions and implement the link layer). The main protocols: Ethernet protocol
    network layer: responsible for address management and routing. Hardware signature: (address selection is responsible for communication, the physical layer to the network layer) router. Main protocols: IP protocol
    data transfer between the client and the client is responsible for: the transport layer. The main protocols: TCP, UDP protocol.
    Application Layer: responsible for data between applications communicate. The main protocols include HTTP, FTP, SMTP, DNS.
    The computer operating system is the physical layer to the transport layer.
  1. Understood that process data transmission network communication
    data transmitted by main and sub-package
    Here Insert Picture Description
    before before being sent to the physical network, the protocol stack from top to bottom along a data transfer application is packaged, each layer of the base data in the upper layer on with their own header information (something further comprising a trailer information) to implement the process is changed to the function package.
  • Demultiplexing
    When the frame reaches the host, the protocol stack from the bottom up in sequence along the transfer, some of the layers is responsible for sequentially processing the data frame header information of the current layer, the respective layers to obtain the desired information, and ultimately we obtain data required by the application, this process is the use points. Demultiplexing is to rely on header information of the type of field implementation.
    Here Insert Picture Description
    We will explain in detail later in our main protocol header information and protocol.

Guess you like

Origin blog.csdn.net/boke_fengwei/article/details/90692357