Basic Articles of computer network

Source: Internet
Author: User

Foundation Chapter I.

Problem: Building a network

1.1 Applications

统一资源定位符(uniform resource locator,URL)
After clicking on a URL, you may need to exchange up to 17 messages on the Internet to get the page, and the page itself is small to be stored in a single message. 6 of these messages are used to translate the server name into his corresponding Internet address (IP address, which is referred to as DNS resolution), and 3 messages are used to establish a connection between the browser-to-server transmission Control Protocol (transmission. protocol,tcp). 4 messages are used to make HTTP the request sent by the browser get , and the server sends back the requested page (as well as the acknowledgement of the message received by both parties), and 4 to close the TCP connection.

1.2 Requirements 1.2.1 Connectivity

交换网 switched network
1. Circuit switching circuit switched (more for telephone systems)
2. Packet switching packet switched (more for computer networks)

Circuit Switching
First, a dedicated circuit is established through a series of links, which then allows the source node to send the stream to the target node via this link.

packet switching
The main feature of packet switching networks is that nodes in a network send discrete chunks of data to each other, and we call each chunk a grouping (packet) or a message Packet switching networks generally use a strategy called Storage-forwarding (Store-and-forward).

Route Selection
The process of determining how information is forwarded to the target node, based on the address (Mac or IP).

1.2.2 Cost
    1. Simultaneous time division Multiplexing (Synchronous time-division MULTIPLEXING,STDM)
    2. Frequency Division Multiplexing (frequency-division MULTIPLEXING,FDM)
    3. Statistical multiplexing (statistical multiplexing)

Congestion congested
If a switch receives a packet at a time that is faster than it forwards the packet, the switch will eventually exhaust his cache space and some of the packets will be discarded.

1.2.3 Support for public services

Reliability
1. Bit fault (bit error)
2. Group-level errors, that is, the network is missing the entire group
Cause: The packet contains an uncorrectable bit fault, congestion is lost, and the software running on one node that handles the packet has an error.
3. node and link level
The physical link is cut off or the connected computer crashes.

Network architecture
    1. OSI Architecture
    2. Internet architecture
1.3.1 Tiering and protocols

Abstraction Layer
When the system becomes complex, the system designer introduces another layer of abstraction. The abstract idea is to define a unified model that captures the main features of the system and encapsulate the model as an object that provides an operable interface to the rest of the system, and the details of how the object is implemented are hidden from the object's users.

Network Hierarchical Structure
First, it breaks down the problem of building a network into a number of parts that can be processed, and you don't have to want to implement all of the functionality in one piece of software, but in several layers, each of which solves part of the problem. Second, it provides a more modular design, and if you want to add some services, you only need to modify one layer of functionality and continue to use the functionality provided by the other layers.

Protocol (PROTOCOL)
The abstract objects that make up the layers of the network system are called Protocols (Protocol). Each of these protocols defines two different interfaces. First, he defines a service interface for other objects on the same computer that want to use its communication service. Second, one protocol defines a peer interface (peer interface) for the peer entity on the other machine.

Package
Cause: In the hardware layer, the peer entity communicates directly between the peers through a link, in addition to the peer entity communication is indirect. The communication between each protocol and its peer entity is to pass the message to the lower-level protocol, and the message is sent by the lower-level protocol to its peer entity.
Mode: A lower-level protocol receives a message, which is 首部(header) appended to the message, and some protocols are added to the message 尾部(tailer) . The format is defined by its protocol specification, and the adventure part of the message is called 消息体(body) or有效载荷(payload)

1.3.2 OSI Architecture

The architecture developed by ISO is called 开放系统互联(Open Systems Interconnection,OSI)体系结构 .

Divides the network into 7 layers, where one or more protocols implement the functions assigned to a particular layer.
Transport layers and higher levels are typically run only on the terminal host, not on intermediate switches or routers.

    1. The application layer application includes the File Transfer Protocol (FTP), which defines a protocol for which file transfer applications can interoperate
    2. The presentation layer presentation focuses on the format of the data exchanged between peers, such as whether an integer is a 16,32 or 64-bit, the first transmission or the last transmission of the most significant bit, or how to format a video stream.
    3. The session Layer session provides a namespace for practicing the different transport streams of an application. For example, in a video conferencing application, he can simultaneously manage an audio stream with a video stream
    4. The transport layer transport processes the channel to the process in which the data unit is commonly referred to as messages (message)
    5. The network layer network handles the routing of nodes in packet switching networks. At this level, the node-switched data units are often called groupings ( packet ) rather than frames
    6. The Data Link layer data link collects bitstream to form a larger aggregate called frame, typically by a network adapter and a device driver running on the node operating system to implement the data link layer.
    7. The physical layer physical processes the transmission of the original bits on the communication link
1.3.3 Internet Architecture

The Internet architecture, and sometimes also the TCP/IP architecture, is its two main protocols.

    1. Application-level application protocols that run above the transport layer, such as FTP, common File Transfer Protocol (Trivial files Transport protocol,tftp), Telnet (telnet), and Simple Mail Transfer Protocol (easy mail Transfer PROTOCOL,SMTP) to enable common applications to interoperate.
    2. TCP/UDP Layer Transmission Control Protocol ( Transmission Control Protocol ) and User Datagram Protocol (Datagram Protocol), TCP and UDP provide an optional logical channel for Applications: TCP provides a reliable byte stream channel, and UDP provides unreliable datagram delivery channels ( Datagrams can be considered a synonym for a message, in the Internet language, TCP and UDP are sometimes referred to as end-to-end (end-to-end) protocols and can also be considered transport protocols.
    3. Internet Protocol layer Internet Protocol This protocol supports the interconnection of multiple network technologies into a logical network
    4. Network layer of a variety of network protocols, expressed as Net1,net2 and so on, in practice, these protocols are hardware (such as network adapters) and software (such as network device drivers) together to implement. For example, Ethernet or Fiber Distributed Data Interface (FDDI) protocol.

There are 3 features of the Internet architecture,
First, the Internet architecture does not have a strict partitioning layer, so it is more free to use IP or an underlying network across layers, in fact, programmers can freely define new channel abstractions or applications that run on any existing protocols.
Second, IP as the focal point of architecture, it defines a common method of exchanging packets in various networks. There can be multiple transport protocols on top of the IP, and each protocol provides a different channel abstraction for the application. In this way, the problem of transmitting messages from the host to the host is completely separated from the problem of providing a useful communication service to the process. IP, this architecture allows for many different network technologies, from Ethernet to FDDI, to ATM, to simple point-to-point links.
Thirdly, in order to put forward an official new agreement in the network architecture, it is necessary to produce a protocol specification and at least one typical implementation of the specification.

沙漏Design concept, the thin waist of the hourglass represents the smallest, well-chosen universal feature set that allows high-level applications and low-layer communication technologies to coexist, share features, and grow rapidly.

1.4 Implementing Network software

Each protocol provides a range of services (service), and the API provides the syntax (syntax) used to invoke these services in a particular operating system.

1.4.1/1.4.2 application Programming Interface (socket) socket1.4.3 protocol implementation of the problem process model

Most operating systems provide an abstraction that is called a process or thread. Each process runs largely independent of other processes, and the operating system is responsible for ensuring that all current processes are allocated resources such as address space and CPU cycles. When the operating system stops the process that is executing on the CPU and starts another process, we convert to the context and include (context switch).

process/Protocol (PROCESS-PER-PROTOCOL) model
Each protocol is implemented by a separate process, which means that when a message moves above or below the protocol stack, he is transferred from one process/protocol to another process/protocol. How a process/protocol delivers messages to the next process/protocol relies on inter-process communication support provided by the host operating system. There is usually a simple mechanism for the process to queue messages. Then, the most important point is that each layer of the protocol diagram requires context switching, which is a typical time-consuming operation.

process/Message (Process-per-message) model
Treat each protocol as a static code and connect the process to the message, that is, when a message arrives from the network, the operating system dispatches a process that is responsible for the message being moved in the protocol diagram. The process of implementing the protocol is called at each layer, resulting in a call to implement the next protocol, and so on.

In two models, the process/message model is more efficient because: on most computers, the efficiency of a procedure call is an order of magnitude higher than the context switch. The first model requires that each layer consumes a context switch, while the second model consumes only one process call per layer.

Message buffers

Socket the second inefficiency is that when the operation is invoked, the send application process provides a buffer that holds outgoing messages, similar to the incoming message that is copied into the buffer when the receive operation is called. He forces the highest-level protocol to copy the message from the application buffer to the network buffer, and vice versa. It is one of the most expensive tasks in protocol implementations to copy data from one buffer to another. This is because the speed of the processor is growing fast, and the memory development is not as fast as the processor.

In order to not replicate the message from one buffer to another in each layer of the protocol stack, most network subsystems define an abstract data type of the message, which is shared by all protocols in the Protocol diagram. This abstraction not only allows the message to be passed up or down in the protocol diagram without having to copy it, but it also provides other methods of non-replication to process the message, such as adding or removing a header, and splitting a large message into small pieces of information. The exact format of the message abstraction varies depending on the operating system.

1.5 Performance 1.5.1 bandwidth and latency bandwidth bandwidth(also become throughput throughput)

The bandwidth of a network is the number of bits that the network can transmit over a specified period of time.

Delay latency(also into a delay delay)

The time it takes to upload a message from one segment of the network to the other. In many cases, it is more important to know that a message is routed from one end of the network to the other and returns the time spent, not just one-way latency. We call it the round-trip time of the network ( round-trip time ).

We usually think that the delay is composed of three parts: first, the speed of light propagation delay; second, the time it takes to send a data unit, which is a function of the network bandwidth and the size of the packet that carries the data; third, the queuing delay inside the network, because the packet switch usually needs to store it for a period of time before it is forwarded.
Calculation formula
latency = propagation + transmit + queue
propagation = distance/SpeedOfLight
transmit = size/bandwidth

When the message includes only 1 bits and we discuss a link instead of the entire network, then transmit queue it doesn't matter, and the delay is only related to the propagation delay ( propagation delay ).

Product of 1.5.2 delay and bandwidth

The product of latency and bandwidth corresponds to the number of bits a sender must send before the first bit reaches the recipient. If the sender wants the receiver to give a signal that the bit has begun to arrive, and the signal is sent back to the sender to be more interested by another channel delay (that is, the round-trip Shienbi of our channel), then the sender can complete twice times the delay and bandwidth product before receiving the signal from the receiver.

Basic Articles of computer network

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.