[Computer Network] Study Notes of Lake University of Science and Technology---Computer Network Architecture

This article has been included in the column
⭐️ "Computer Network" ⭐️

Internet

basic concept

[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly (img-JnqzgaOf-1660355441352) (C:\Users\Lenovo\AppData\Roaming\Typora\typora-user-images\ image-20220625062242459.png)]

network, internet, internet

Network: Network (Network) consists of several **nodes (Node) and links (Link)** that connect these nodes

img

Internet (Internet): Multiple networks are interconnected through routers, thus forming a network with a larger coverage, that is, the Internet (Internet). Therefore, the Internet is also called "Network of Networks".

img

Internet: The Internet (Internet) is the world's largest interoperable network (hundreds of millions of users and millions of interconnected networks).

img

The difference between internet and Internet

  • Internet (Internet or Internet) is a general term that generally refers to a network formed by interconnecting multiple computer networks . The communication protocol between these networks can be arbitrary.
  • Internet (Internet) is a special term . It refers to the current world's largest, open, specific computer network formed by the interconnection of many networks . It uses the TCP/IP protocol family as the communication rule. Its predecessor is ARPANET in the United States. .

Arbitrarily interconnecting several computer networks (no matter what protocol is used) and being able to communicate with each other constitutes an Internet (internet), not the Internet (Internet).

img

development stage

img

ISP

ISPinternet service provider I_ _SP

img

How do ordinary users access the Internet?

Answer: Access to the Internet through an ISP

ISP can apply for a block of IP addresses from the Internet management agency, and at the same time have communication lines and networking equipment such as routers. Any organization or individual can get the required IP address from the ISP only by paying the fee .

Because all hosts on the Internet must have IP addresses to communicate, they can access the Internet through the ISP.

China's Big Three ISP: China Telecom, China Unicom and China Mobile

img

Internet Based on Three-layer Structure of ISP

img

Once a user can access the Internet, he can also become an ISP. All he needs to do is to buy some equipment such as modems or routers so that other users can connect to him.

standardized work

  • The standardization work of the Internet has played a very important role in the development of the Internet.
  • A great feature of the Internet in specifying its standards is that it is open to the public.
    • All RFC (Request For Comments) technical documents on the Internet can be downloaded free of charge from the Internet;
    • Anyone can email comments or suggestions about a document at any time.
  • The Internet Society ISOC is an international organization responsible for the overall management of the Internet and the promotion of its development and use worldwide.
    • The Internet Architecture Board (IAB) is responsible for managing the development of Internet-related protocols;
    • IETF, the Internet engineering department, is responsible for researching short-term and short-term engineering issues, mainly for the development and standardization of protocols;
    • The Internet Research Unit, IRTF, conducts theoretical research and develops issues that require long-term consideration.

img

  • Formal standards for the Internet go through four stages :

    1. Internet-Draft (not an RFC document at this stage)

    2. Proposed standards (become RFC documents from this stage)

    3. Draft Standard

    4. Internet Standards

component

  • edge part

    Consists of all hosts connected to the Internet (desktops, large servers, laptops, tablets, smartphones, etc.). This part is used directly by users for communication (transmitting data, audio or video) and resource sharing .

  • core part

    Consists of a large number of networks and the routers that connect these networks . This part serves the edge part (provides connectivity and switching).

img

image-20201006180725282

A router is a special-purpose computer, but we don't call it a host. A router is a key building block for packet switching. Its task is to forward received packets. This is the most important part of the network core.

The part at the edge of the Internet is all the hosts connected to the Internet. These hosts are also called end systems .

End systems can vary widely in functionality:

  1. A small end system can be an ordinary PC, a smartphone with internet access, or even a tiny webcam.

  2. A large end system can be a very expensive mainframe computer.

  3. The owner of the end system can be an individual, or an organization (such as a school, an enterprise, a government agency, etc.), or of course an ISP.

Replenish:

Implications for communication between end systems

"Host A communicates with host B" actually means: "a program running on host A communicates with another program running on host B". That is, " a process on host A communicates with another process on host B ". It's called "computer-to-computer communication" for short.

The communication methods between end systems can generally be divided into two categories:

img

Client-server approach:

  • Both client and server refer to the two application processes involved in the communication.
  • The client-server approach describes the relationship between the service and the serviced process.
  • The client is the requester of the service, and the server is the provider of the service.

Both the service requester and the service provider use the services provided by the core part of the network.

Peer-to-peer connection method:

  • Peer- to-peer connection (peer-to-peer, P2P for short ) means that two hosts do not distinguish which one is the service requester or the service provider when communicating.
  • As long as both hosts are running peer-to-peer connection software (P2P software), they can communicate on an equal, peer-to-peer connection .
  • Both parties can download the shared documents that the other party has stored in the hard disk.

exchange method

The network core is the most complex part of the Internet.

The core part of the network should provide connectivity to a large number of hosts in the network edge, so that any host in the edge part can communicate with other hosts (that is, transmit or receive various forms of data).

The router plays a special role in the core part of the network .

The router is the key component to implement packet switching , and its task is to forward received packets, which is the most important function of the core part of the network.

circuit switching

(Circuit Switching)

img

image-20201006182240000

The traditional two-by-two connection method is very inconvenient when there are a lot of phones and there are a lot of phone lines

Therefore, in order for each phone to communicate with another phone easily, an intermediate device should be used to connect these phones. This intermediate device is a telephone exchange

img

image-20201006182634249

  • The way telephone switches connect telephone lines is called circuit switching;

  • From the perspective of communication resource allocation, switching (Switching) is to dynamically allocate transmission line resources in a certain way;

  • The three steps of circuit switching:

    1. Establish a connection (allocate communication resources)

    2. Talking (always occupying communication resources)

    3. Release the connection (return communication resources)

[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-T3Sv8ATP-1660355441364)(https:upload-images.jianshu.io/upload_images/24878825-acb87df045723236.png?imageMogr2 /auto-orient/strip|imageView2/2/w/1200/format/webp)]

image-20201006183020317

When circuit switching is used to transmit computer data, the transmission efficiency of the lines is often very low.

This is because computer data appears on transmission lines in bursts.

So computers usually use packet switching instead of circuit switching

packet switching

(Packet Switching)

img

image-20201006183312843

Usually we regard the entire block of data representing the message as a message .

Before sending the message, divide the longer message into smaller equal-length data segments , before each data segment. After adding some headers composed of necessary control information , a packet is formed, which can also be referred to as "packet" for short, and correspondingly, the header can also be called "packet header".

The header contains the destination address of the packet

Packets can take different paths from the source host to the destination host.

sender

  • Construct group
  • send packet

router

  • cache grouping
  • Forward packets
  • referred to as "packet forwarding"

There are no direct wires between the input and output ports in the router.

The process of a router processing a packet is:

  1. Put the received packet into the cache first (temporary storage);

  2. Look up the forwarding table to find out from which port a certain destination address should be forwarded;

  3. Send the packet to the appropriate port for forwarding .

receiver

  • receive packet
  • restore message

message exchange

(Message Switching)

The switch node in the message exchange also adopts the storage and forwarding method, but the message exchange has no limitation on the size of the message, which requires the switch node to need a large buffer space. Message switching was mainly used in the early telegraph communication network, but it is less used now and is usually replaced by more advanced packet switching methods .

Comparison of exchange methods

Assume that A, B, C, and D are the four node switches that the packet transmission path passes through, and the ordinate is time

img

image-20201006184451671

analyze:

Circuit switching:

  • Before communication, a connection must be established first; after the connection is established, the established connection can be used for data transmission; after data transmission, the connection needs to be released to return the communication line resources occupied by the previously established connection.
  • Once the connection is established, each node switch in the middle is in a straight-through form, and the bit stream can go directly to the end point;

Message exchange:

  • Messages can be sent at any time without the need to establish a connection in advance; the entire message is first transmitted to the adjacent node switch, stored and then forwarded to the next node switch.
  • The entire message needs to be stored and forwarded on each node switch. Since the size of the message is not limited, each node switch needs to have a large buffer space.

Packet switching:

  • Packets can be sent at any time without prior connection establishment. Each packet that constitutes the original message is stored and forwarded on each node switch in turn. Each node switch caches the received packets while sending packets.
  • The packets that constitute the original message are stored and forwarded on each node switch. Compared with message exchange, the forwarding delay is reduced, and it can also prevent excessively long messages from occupying the link for a long time. error control.

img

Performance Indicators for Computer Networks

rate

img

image-20201007012419698

img

image-20201007012439769

bandwidth

img

image-20201007012943970

throughput

img

image-20201007013119621

An Ethernet with a bandwidth of 1 Gb/s means that its rated rate is 1 Gb/s, and this value is also the absolute upper limit of the throughput of the Ethernet . Therefore, for an Ethernet with a bandwidth of 1 Gb/s, the actual throughput may be only 700 Mb/s, or even lower.

Note: Throughput can also be expressed in bytes or frames per second

time delay

Latency refers to the time it takes for data (a message or packet, or even bits) to travel from one end of a network (or link) to the other.

Network latency consists of several parts:

  • sending delay

The time required for a host or router to send a data frame is the time from the first bit of a data frame to the time when the last bit of the frame is sent.

  • propagation delay

The time it takes for an electromagnetic wave to travel a certain distance in a channel.

  • processing delay

When a host or router receives a packet, it takes a certain amount of time to process it

  • queuing delay

As packets travel across the network, they pass through many routers. However, after the packet enters the router, it must first be queued in the input queue for processing.

Sometimes queuing delays are seen as part of processing delays

Total delay = sending delay + propagation delay + processing delay (processing delay + queuing delay)

img

image-20201007014139333

img

image-20201007015401505

When the processing delay is negligible, which one is dominant, the transmission delay or the propagation delay, needs to be analyzed on a case-by-case basis

delay-bandwidth product

Delay Bandwidth Product = Propagation Delay * Bandwidth

img

image-20201007115317347

round trip time

Information on the Internet is not only one-way transmission but two-way interaction. Therefore, we sometimes need to know the time required for a two-way interaction .

img

image-20201007115647631

Utilization

There are two types of utilization: channel utilization and network utilization .

img

image-20201012164544306

Packet loss rate

img

computer network architecture

img

The TCP/IP architecture is the most used today, and the largest, global-covering, TCP/IP-based Internet does not use the OSI standard.

The TCP/IP architecture is equivalent to merging the physical layer and data link layer of the OSI architecture into a network interface layer , and removing the session layer and presentation layer

The protocol used by TCP/IP at the network layer is the IP protocol, and the IP protocol means the Internet Protocol, so the network layer of the TCP/IP architecture is called the Internet layer

img

In the operating system of the user host, there is usually a TCP/IP protocol family that conforms to the TCP/IP architecture standard.

The routers used for network interconnection also have a TCP/IP protocol family that conforms to the TCP/IP architecture standard.

It's just that routers generally only include the network interface layer and the Internet layer.

img

Network interface layer : No specific content is specified. The purpose of this is to interconnect various network interfaces all over the world, such as: wired Ethernet interface, WIFI interface of wireless LAN, etc.

Internet layer : Its core protocol is the IP protocol.

Transport layer : TCP and UDP are two important protocols in this layer.

Application layer : This layer contains a large number of application layer protocols, such as HTTP, DNS and so on.

**IP protocol (internet layer) can interconnect different network interfaces (network interface layer) and provide network interconnection services to the TCP protocol and UDP protocol (transport layer)** on it

The TCP protocol, on the basis of enjoying the network interconnection service provided by the IP protocol, can provide reliable transmission services to the corresponding protocols of the application layer .

On the basis of enjoying the network interconnection service provided by the IP protocol, the UDP protocol can provide unreliable transmission services to the corresponding protocols of the application layer .

The most important thing in the TCP/IP architecture is the IP protocol and the TCP protocol , so TCP and IP are used to represent the entire protocol family.

img

During the teaching, the network interface layer of the TCP/IP architecture is divided into the physical layer and the data link layer

The need for stratification

img

physical layer issues

img

This picture shows

  • First, strictly speaking, the transmission medium does not belong to the physical layer

  • The signal transmitted by the computer is not the square wave signal shown in the figure

This example is just to make it easy for beginners to understand

Data Link Layer Issues

[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly (img-vIaMbDdc-1660355441380)(https://upload-images.jianshu.io/upload_images/24878825-f0d9f2816d7bab9d.png ?imageMogr2/auto-orient/strip|imageView2/2/format/webp)]

network layer problem

img

transport layer problem

img

image-20201007142631029

How to identify the application process related to network communication: When a packet arrives, which process should we hand it over to? Browser process or QQ process

application layer issues

img

What method should the application layer use (application layer protocol) to parse data

Summarize

img

img

img

Examples of layered thinking

Example: How a Host's Browser Communicates with a Web Server

img

image-20201007144900565

Parse:

The network-based communication between the host and the web server is actually the network -based communication between the browser application process in the host and the web server application process in the web server

img

image-20201007145242020

What role do the layers of the architecture play in the overall process?

1. The sender sends

img

image-20201007145441370

first step:

  • The application layer constructs an HTTP request message according to the regulations of the HTTP protocol

  • The application layer delivers the HTTP request message to the transport layer for processing

[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-TWiLcu69-1660355441392) (https:upload-images.jianshu.io/upload_images/24878825-cc2b73b1736d5809.png?imageMogr2 /auto-orient/strip|imageView2/2/w/1200/format/webp)]

image-20201007145720661

Step two:

  • The transport layer adds a TCP header to the HTTP request message to make it a TCP segment

  • The header format of the TCP segment is used to distinguish the application process and achieve reliable transmission

  • The transport layer delivers the TCP segment to the network layer for processing

img

image-20201007150234909

third step:

  • The network layer adds an IP header to the TCP segment to make it an IP datagram

  • The first format of the IP datagram is to enable the IP datagram to be transmitted on the Internet, that is, to be forwarded by the router.

  • The network layer delivers the IP datagram to the data link layer for processing

img

image-20201007150723365

the fourth step:

  • The data link layer adds a header and a trailer to the IP datagram to make it a frame (the header is on the right side of the diagram, and the tail is on the left side)

  • The main function of this header is to allow the frame to be transmitted on a link or a network and be received by the corresponding destination host

  • The function of the tail is to allow the destination host to check whether the received frame has a bit error

  • The data link layer delivers the frame to the physical layer

img

image-20201007151342502

the fifth step:

  • The physical layer first regards the frame as a bit stream . The network N1 here is assumed to be Ethernet, so the physical layer will also add a preamble to the front of the bit stream.

  • The function of the preamble is to prepare the destination host to receive the frame

  • The physical layer converts the bit stream equipped with the preamble into a corresponding signal and sends it to the transmission medium

img

image-20201007151900254

Step six:

  • The signal reaches the router through the transmission medium

2. Router forwarding

[External link picture transfer failed, the source site may have an anti-theft link mechanism, it is recommended to save the picture and upload it directly (img-VKy8XYOK-1660355441396)(https:upload-images.jianshu.io/upload_images/24878825-b9824f4625354b9b.png?imageMogr2 /auto-orient/strip|imageView2/2/w/945/format/webp)]

image-20201007152029458

img

image-20201007152138961

img

image-20201007152253899

img

image-20201007152627778

in the router

  • The physical layer turns the signal into a bit stream , then removes the preamble and delivers it to the data link layer

  • After the data link layer removes the header and tail of the frame , it delivers it to the network layer , which actually delivers the IP datagram

  • The network layer parses the header of the IP datagram and extracts the destination network address from it

img

image-20201007152650863

img

image-20201007152812431

img

image-20201007153714840

in the router

  • Search its own routing table after extracting the destination network address . Identify forwarding ports for forwarding

  • The network layer delivers the IP datagram to the data link layer

  • The data link layer adds a header and a trailer to the IP datagram to make it a frame

  • The data link layer delivers the frame to the physical layer

  • The physical layer first regards the frame as a bit stream . The network N2 here is assumed to be Ethernet, so the physical layer will also add a preamble to the front of the bit stream.

  • The physical layer transforms the bit stream with the preamble into a corresponding signal and sends it to the transmission medium, and the signal reaches the Web server through the transmission medium

3. Receiver receives

The encapsulation of the sending process of the sender (host) is exactly the opposite

on the web server

  • The physical layer converts the signal into a bit stream , and then removes the preamble to form a frame and delivers it to the data link layer

  • The data link layer removes the header and tail of the frame and becomes an IP datagram , which is delivered to the network layer

  • The network layer removes the header of the IP datagram and becomes a TCP segment , which is delivered to the transport layer

  • The transport layer removes the header of the TCP segment and becomes an HTTP request message , and delivers it to the application layer

  • The application layer parses the HTTP request message and sends back a response message to the host

The steps to send back a response message are similar to the previous process

img

image-20201007155051275

Terminology

The terminology introduced below comes from the seven-layer protocol architecture of OSI, but it also applies to the four-layer architecture and five-layer protocol architecture of TCP/IP

entity

[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-eW0JEpUU-1660355441403) (https:upload-images.jianshu.io/upload_images/24878825-b4c748c8f731e416.png?imageMogr2 /auto-orient/strip|imageView2/2/w/1200/format/webp)]

image-20201007155444920

protocol

img

image-20201007155545934

Protocol: A collection of rules governing logical communication between two peer entities

Three elements of the agreement:

  • Syntax: Defines the format of the information exchanged

  • Semantics: Define the operations to be completed by both the sender and the sender

  • Synchronization: define the timing relationship between sending and receiving

Serve

img

image-20201007160246561

img

image-20201016104750288

img

image-2020

Guess you like

Origin blog.csdn.net/m0_66139206/article/details/126315282