Computer Networks - Top Down Computer Networks and the Internet

Table of contents

1. What is a computer network

1.1 Concept 

1.2 The specific composition of the Internet

2. Structure of computer network

2.1 The Network Edge

2.1.1 Access network

2.1.2 Physical Media 

2. 2 The network core

2.2.1 Circuit switching 

2.2.2 Multiplexing

2.2.3 Message exchange 

2.2.4 Packet switching 

2.2.5 Network of Networks 

3. Computer network performance

4. Computer network architecture and reference model 

4.1 OSI Reference Model 

4.2 TCP/IP Reference Model

4.3 Internet protocol stack 


1. What is a computer network

1.1 Concept 

Computer Network = Communication Technology + Computer Technology

Computer network is the product of the close combination of communication technology and computer technology , and it is a collection of interconnected and autonomous computers.

  • Interconnection: Interconnection through communication links
  • Autonomy: no master-slave relationship

For long-distance and large-scale networks, hosts are interconnected through switching networks

Generally speaking, the computer network we are talking about mainly refers to the public Internet ( The Public Internet )

1.2 The specific composition of the Internet

From the point of view of composition 

The Internet is a worldwide computer network, that is, it is a network that interconnects billions of computing devices throughout the world, such as: laptops, smartphones, tablets, televisions, game consoles, thermostats, home security systems, Household appliances, watches, glasses, automobiles, transportation control systems, etc.

We refer to these devices as hosts or end systems

Hosts are connected together through communication links and packet switches

  • Communication link: Composed of different physical media, including - coaxial cable, copper wire, optical fiber and radio spectrum, and its transmission rate is measured in bits per second (bit/s or bps)
  • Packet switch: forwards packets received from one link through another link. Typical devices include routers working at the network layer and switches working at the link layer ( link -layer switches )

If the host wants to connect to the Internet, it needs to use Internet Service Providers ( Internet Service Providers, ISPs ) to access the network and enjoy network services (mentioned later)

From a service point of view

Communication infrastructure that provides communication services for network applications:

  • Web, VoIP, email, online game, e-commerce, social network, …

Provides an application programming interface (API) for web applications:

  • Allows applications to "connect" to the Internet, send/receive data
  • Provides data transmission services similar to the postal system

 what is agreement

A protocol is a collection of rules. In order to ensure the accuracy of data exchange in the network, some pre-agreed agreements must be followed. These rules, standards or conventions established for data exchange in the network are called network protocols ( abbreviated as "protocol")

A protocol is similar to a set of rules, and both parties in the dialogue must abide by this set of rules to be able to have a normal dialogue (communication). A kind of rule, for example, in class, if students want to ask questions to the teacher, they must raise their hands first, and then they can only ask questions after getting the teacher's consent, and then the teacher will answer the questions.

The subject of network communication is a "machine" rather than a person, and can only exchange "electronic" or "digital" messages. Therefore, all communication processes in computer networks must abide by certain/some rules—protocols

In a computer network, a network protocol controls a set of rules for communication between two (or more) peer entities. It is horizontal and consists of syntax  , semantics , and timing .

Grammar :

  • Structure or format of data and control information
  • signal level 

Semantics :

  • What kind of control information needs to be sent
  • What actions are performed and what responses are made
  • error control 

Timing :

  • sequence of events
  • speed match 

In the study of various protocols in the future, we will see how the protocol regulates the process of sending and receiving all information in the network . Learning protocols is an important part of learning computer networks

Internet protocol standard

  • RFC: Request for Comments
  • IETF: Internet Engineering Task Force

2. Structure of computer network

2.1 The Network Edge

Computers and other devices connected to the Internet are often referred to as end systems because they are located at the edge of the Internet. Internet end systems include: desktop computers (eg, desktop PCs, Macs, and Linux appliances), servers (eg, Web and email servers), and mobile computers (eg, laptops, smartphones, and tablets).

End systems are also called hosts because they house (i.e. run) application programs such as web browser programs, web server programs, e-mail client programs or e-mail server programs, etc. Hosts are sometimes further divided into two categories: client ( client ) and server ( server )

2.1.1 Access network

The function of the access network is to connect the edge of the network to the core of the network (edge ​​router) 

Access Network: The network that physically connects end systems to their edge routers .

Edge router: is the first router on the path from an end system to any other remote end system

1. Home access – DSL, cable, FTTH, dial-up and satellite 

Today, there are two most popular types of broadband residential access - digital subscriber line ( DSL ) and cable 

Residents typically obtain DSL Internet access from the local telephone company that provides local telephone access . Therefore, when using DSL, the user's local phone company is also its ISP. Use the existing telephone line to connect to the DSLAM of the central office, usually the uplink transmission rate is less than 2.5 Mbps (typical rate is less than 1 Mbps), and the uplink transmission rate is less than 24Mbps (typical rate is less than 10)

DSL modems encode signals at different frequencies according to frequency division multiplexing , so that traditional telephone signals and data signals can coexist on the home telephone line

  • Ahigh-speed downstream channel, in the 50 kHz to 1 MHz band
  • Amedium-speed upstream channel, in the 4 kHz to 50 kHz band
  • An ordinary two-way telephone channel, in the 0 to 4 kHz band

This method allows a single DSL line to be shared by a phone call and an Internet connection 

Cable Internet access  leverages the cable companies' existing cable infrastructure. Homes get cable Internet access from the company that provides cable TV, which also requires a special modem called a cable modem

Like DSL, cable Internet access uses frequency division multiplexing technology. The cable modem divides the HFC network (hybrid fiber coax) into two channels, upstream and downstream. These two channels are - Up to 30Mbps downlink transmission rate, 2Mbps uplink transmission rate

Each family (equipment) accesses the ISP through the cable network → optical fiber, which is different from DSL's exclusive access to the central office, and each family shares the access network from the home to the cable headend

Another higher-speed technology is fiber to the home ( FTTH ), FTTH provides a fiber path directly from the local central office to the home

2. Business (and Home) Access - Ethernet and WIFI

On corporate and university campuses, and increasingly in home environments, local area networks (LANs) are used to connect end systems to edge routers.  

Among them, Ethernet is the most popular LAN technology in companies, universities and homes, and end systems are usually directly connected to Ethernet switches

The wireless access network connects the terminal system and the router through the shared wireless access network, and through the base station (base station) or "access point" (access point), wireless LAN access based on IEEE802.11 technology, commonly known as WIFI

In a wireless LAN environment, wireless users send/receive branches from/to an access point, which is connected to the corporate network (most likely using wired Ethernet), which in turn is connected to the wired Internet. A wireless LAN user usually must be located within tens of meters of the access point, using 802.11b/g (WiFi) transmission rate: 11Mbps, 54Mbps

A typical home access network

3.  Wide area wireless access - 3G and LTE

Devices such as the iPhone and Android are increasingly used to send messages on the move, share photos on social networks, watch videos and stream music. These devices employ the same wireless infrastructure as cellular mobile phones, sending and receiving packets through a base station operated by a cellular network provider. Unlike WiFi, a user only needs to be within tens of thousands of meters (rather than tens of meters) of a base station.  

2.1.2 Physical Media 

For each transmitter-receiver pair, the bit is sent by propagating electromagnetic waves or pulses of light across a physical medium

Examples of physical media include twisted-pair copper wire, coaxial cable, multimode fiber optic cable, terrestrial radio spectrum, and satellite radio spectrum. Physical media is divided into two types: guided media ( guided media ) and unguided media ( unguided media )

  • Guided media - the wave travels along a solid medium , such as fiber optic cable, twisted-pair copper wire, or coaxial cable
  • Unguided media—waves traveling through air or outer space , such as wireless local area networks or digital satellite channels

1. Twisted pair copper wire 

Twisted pair is the most commonly used ancient transmission medium. It consists of two copper wires twisted side by side with certain rules and insulated from each other. Twisting reduces electromagnetic interference to adjacent wires. Widely used in local area networks and traditional telephone networks, twisted pair wires are divided into two types

  • Unshielded twisted pair ( Unshielded twisted pair, UTP )
  • Shielded twisted pair ( Shielded twisted pair, STP ), a layer of shielding layer braided with metal wire is added outside the unshielded twisted pair

2. Coaxial cable 

Coaxial cables consist of an inner conductor, insulation, mesh braided shield, and plastic outer layer and are generally divided into two categories 

  • 50Ω coaxial cable (baseband coaxial cable), mainly used to transmit baseband digital signals
  • 75Ω coaxial cable (broadband coaxial cable), mainly used to transmit broadband signals, used in cable TV system

3. Optical fiber

An optical fiber is a thin, flexible medium that guides pulses of light, each of which represents a bit. Optical fiber communication is to use optical fiber to transmit light pulses for communication. Light pulses represent 1, and no light pulses represent 0. A fiber can support extremely high bit rates, up to tens or even hundreds of Gbps

The optical fiber is mainly composed of a core and a cladding. The core is very thin, only 8 to 100 microns. Light waves are transmitted through the core, and the cladding has a low refractive index. When the fiber shoots from a medium with a high refractive index to a medium with a low refractive index, its angle of refraction will be greater than the angle of incidence. Therefore, as long as the incident angle is greater than a certain critical angle, total reflection will occur, that is, when the light hits the cladding, it will be refracted back to the core, and this process is repeated, and the light is transmitted along the fiber

4. Terrestrial radio channels 

Radio channels carry signals in the electromagnetic spectrum. It does not require the installation of physical wires, and has the ability of traditional walls, providing connectivity to mobile users, and carrying signals over long distances, making it an attractive medium

5. Satellite radio channels

A communication satellite connects two or more microwave transmitter/receivers on Earth, which are called ground stations. The satellite receives transmissions on one frequency band, uses a transponder to regenerate the signal, and transmits it on another frequency. Two types of satellites are commonly used: geostationary satellites and low-Earth orbit satellites

2. 2 The network core

The network core, which is a mesh network of branch switches and links interconnecting Internet end systems

The bold shaded part in the figure below is the network core 

 Key functions of the network core: routing + forwarding 

  • Routing - Refers to the network-wide process of determining the end-to-end path of a packet as it travels from source to destination 

  • Forwarding - switching packets from the router's input port to the correct output port

    

The basic problem that the network core solves is: how to realize the data from the source host to the destination host through the network core? 

the answer is

data exchange

There are three ways of data exchange

  • circuit switching
  • message exchange
  • packet switching 

2.2.1 Circuit switching 

Before data transmission, a dedicated (exclusive) physical communication path must be established between the two nodes. This path has been exclusively used during the entire data transmission and will not be released until the end of the communication. 

Circuit switching, in the process of data transmission, users always occupy end-to-end fixed transmission bandwidth 

One of the most typical circuit switching networks is the telephone network . First, dialing is required to establish a connection and then communicate. Therefore, circuit switching is divided into three stages:

  1. establish connection
  2. communication
  3. release company

Frequency division multiplexing or time division multiplexing    is used in circuit switching to achieve link sharing 

2.2.2 Multiplexing

Multiplexing ( multiplexing ), referred to as multiplexing, is a basic concept in communication technology

The idea of ​​multiplexing is to divide the link/network resources (such as bandwidth) into "resource slices" in a certain way, and then allocate the resource slices to each call (call), and each call exclusively allocates the allocated resource slices For communication, resource slices may be "idle" ( idle ) (no sharing)

There are four typical multiplexes :

1. Frequency division multiplexing ( frequency division multiplexing-FDM )

 Divide the channel into sub-channels of different frequency bands   according to the frequency bandwidth

Each user of frequency division multiplexing occupies different bandwidth resources

Note that the "bandwidth" here is the frequency bandwidth, and its unit is Hz, not the data transmission rate 

Generally speaking, assume that the frequency bandwidth on a channel is 0~1000Hz, of which 0~100Hz is used for communication by Xiao Wang, 100~200Hz is used by Xiao Li for communication, and 200~300Hz is used by Xiao He for communication...

2. Time division multiplexing ( time division multiplexing-TDM )

Time division multiplexing is to divide time into time division multiplexing frames (TDM frames) of equal length , and each user occupies a time slot with a fixed sequence number in each TDM frame

The time slot occupied by each user occurs periodically (the period is the length of the TDM frame) 

All users of time division multiplexing occupy the same frequency bandwidth at different times

In layman's terms, it means that 0-1s Xiaohong uses the channel, 1-2s Xiaogreen uses the channel, 2-3 seconds Xiaozi uses the channel... until everyone takes turns to use it up and then start over 

3. Wavelength division multiplexing- WDM 

Wavelength division multiplexing is the frequency division multiplexing of light

We know that light has a wavelength, and the signal in the optical fiber is transmitted in the form of light, so if the signal is distinguished according to different wavelengths, wavelength division multiplexing can be realized   

In the actual use process, the signal of user 0 is modulated into light of a certain wavelength by the modulator, and after transmission, the information corresponding to the correct wavelength is decoded by the optical demodulator at the end point  

In layman's terms, one user uses light of x wavelength, and another user uses light of y wavelength to separate the light according to different wavelengths, which can be transmitted on the shared optical fiber (channel), and can be distinguished at the destination. to open 

4. Code division multiplexing ( Code division multiplexing-CDM )

Code division multiplexing is to give each user a chip sequence to distinguish users, each user uses the same frequency carrier , and uses their own chip sequence to encode data

Encoded signal = (raw data) × (chip sequence)

  • If sending bit 1 (+1), send your own m bit chip sequence
  • If bit 0 (-1) is sent, the inverse code of the m bit chip sequence of the chip sequence is sent 

in particular:

Each user is allocated a unique m bit chip sequence ( chipping sequence ), where "0" is represented by "-1" and "1" is represented by "+1"
, for example:

Chip sequence of station S: (–1 –1 –1 +1 +1 –1 +1 +1)

Each user chip sequence is orthogonal to each other ( orthogonal )    

Decoding: the inner product of the chip sequence and the coded signal 

Let's see an example of decoding

In a CDMA network, a station is receiving data sent by another station whose code sequence is (-1,1,1,-1,-1,-1,1,-1), if the station receives (- 111-1-1-11-1 1-1-1111-11 1-1-1111-11 -111-1-1-11-1), then the data received by this station is?

A. 1001

B. 0001

C. 0110

D. 1000

Note that the length of the chip sequence is 8 bits at this time, so 8 binary bits can transmit one bit of effective information, and what the station receives is 

-111-1-1-11-1 1-1-1111-11 1-1-1111-11 -111-1-1-11-1 

It can be seen that the total length is 32, so there are 4 binary bits of information, in which the black part is the same as the original site code sequence, and the red part is opposite to the original site code sequence, so the black part represents 1, the red part represents 0, and the entire information is 1001 

The process of code division multiplexing is shown in the figure below:

In layman's terms, code division multiplexing is equivalent to giving each user an ID number (chip sequence), and then buying a ticket with the ID card to get on the same train to the same place, and you can use the ID card to identify you when you leave the station. 

2.2.3 Message exchange 

In various network applications, the end systems exchange messages with each other, the source (application) sends the whole information, and the data exchange unit is the message , which carries the destination address and source address information

When the router receives the message, it needs to use the " store-and-forward " mechanism to forward the message. The message exchange does not group the message, so the router needs to accept all the large messages before forwarding.

Store-and-forward transmission: means that the entire packet must be received before the switch can begin transmitting the first bit of the packet to the output link 

2.2.4 Packet switching 

Packet switching is to split the message into a series of relatively small data packets on the basis of message switching, which is the so-called packet. In this process, there are some things worth noting

  • The splitting and reassembly of packets are completed on the source host and the destination host respectively, that is to say, the router responsible for forwarding in the middle will not reassemble the grouped packets, but simply forward them.
  • Each small packet needs a packet header , which will bring additional overhead

grouping: 

Reorganization: 

Message switching versus packet switching

The same point: both use store-forward switching

difference:

  • Message exchange is "store-and-forward"  with complete messages
  • Packet switching "store-and-forward" in smaller packets

From the perspective of efficiency, in packet switching, each router does not need to process all the data at one time, but processes it in batches, which is similar to the working principle of the pipeline, so the efficiency can be maximized

Consider the following scenario

Message length: M bits 

Link bandwidth: R bps

Packet length: L bits

Number of intermediate routers: 2

Time required for message exchange :

  • M/R seconds are required for each packet transmission
  • The router cache size is at least M bits (if it is smaller, the message will be discarded)

Total time = time for the sender to send a complete message + time for the router to forward a complete message × 2 = M/R+(M/R)×2 = 3M/R

Time required for packet exchange :

  • are divided into n groups in total
  • Each packet transmission delay is L/R seconds
  • The router cache is at least L bits

When the first packet passes through the router, the second packet has already been sent. Due to the pipeline structure, the router is forwarding the packet in each small time period.

  1. During the first L/R period, the first packet is forwarded to Router 1
  2. During the second L/R period, the first packet is forwarded to Router 2, while the second packet is forwarded to Router 1
  3. During the third L/R period, the first packet is forwarded to the receiving end, the second packet is forwarded to router 2, and the third packet is forwarded to router 1
  4. ...

It can be seen that within the L/R time after the first packet is sent, the second packet is sent. Assuming that there are N packets, the time when the last packet is sent from the sender is: NL/R, where NL= M (number of packets × packet length = message length), so the sending time of the last packet is M/R, and the last packet needs 2×L/R to reach the receiving end, so

Total time = M/R+2×L/R

For a more general case, suppose there are n routers between the sender and receiver, and the bandwidth of each link is R

The message exchange time is:

 T=(n+1)M/R

The packet exchange time is:

T=M/R+nL/R  

For the following example, refer to the above model

Telegram length: M = 7.5 Mbits 

Link Bandwidth: R = 1.5 Mbps

Packet length: L = 1500 bits

Number of intermediate routers: 2

Message exchange: 15s

Packet switching: 5.002s

Therefore, packet switching is more efficient than message switching, but error control is required to ensure the correctness of data delivery. This part will be introduced in subsequent layers and corresponding protocols.

Packet Switching vs Circuit Switching 

packet switching circuit switching
Allow more users to use the network at the same time Allow both parties to establish a connection to use the network
 Full sharing of network resources Network resources are monopolized
Suitable for burst data transmission network Suitable for real-time services (such as telephony and video conferencing)
Simple, low cost, no call setup required Complicated and requires a call to establish a connection
Congestion may occur, which needs to be resolved by agreement No congestion, exclusive bandwidth

2.2.5 Network of Networks 

As mentioned before, the end system is connected to the Internet through the ISP, and each ISP must be further interconnected, making the global network structure intricate, so no one can give an accurate description of the structure of the Internet

ISPs: Includes residential ISPs like local cable or phone companies, corporate ISPs, university ISPs, ISPs that provide WiFi access in airports, hotels, coffee shops, and other public places, and mobile access for smartphones and other devices cellular data ISP

When we surf the Internet, we often need to use intermediaries such as China Telecom, China Mobile, and China Unicom to connect to the Internet. These companies are so-called Internet service providers, providing us with Internet access services

How do ISPs work?

As an intermediary for providing access services, ISP leases international channels and a large number of local telephone lines, purchases a series of computer equipment, and provides access services to local users through centralized use and distributed pressure.

Each ISP can provide services for some end systems. In order to achieve global communication, ISPs must also establish connections. The connection relationship between ISPs constitutes a complex network structure.

One way is to directly interconnect each ISP, but it will make the network costly and reduce the efficiency

network structure 1

Interconnect all access ISPs with a single global transit ISP. That is, an Internet service provider provides services to all users worldwide,

Naturally, building such a large-scale network will cost a lot of money. In order to be profitable, the global ISP has to charge the access ISP for each connection, so the access ISP is considered as the customer, and the global transmission ISP is considered as the provider

Network structure 2

On the basis of network structure 1, competitors join in from a commercial point of view to form multiple global ISPs. This structure is network structure 2, which is a two-tier hierarchical structure, in which the global transmission provider is at the top, and the receiving Incoming ISP is located on the bottom layer.

At the same time, these global transmission ISPs must be interconnected, otherwise, the access ISP connected to a certain global transmission ISP may not be able to communicate with the access ISPs of other global transmission ISPs

Network structure 3

On the basis of network structure 2, the competitors are further increased, not only there are multiple competing first-tier ISPs, but also there may be multiple competing regional ISPs in one area. This makes the layering of the network structure more obvious

In any given area, there may be a regional ISP ( regional ISP ) to which access ISPs in the area connect.

For example: In China, each city has an access ISP --> connects to a provincial ISP --> connects to a national ISP --> finally connects to the first-tier ISP

Network structure 4 

In order to build a network that is more similar to today's Internet, add points of presence (Point of Presence), multi-homing, peer-to-peer and Internet exchange points to network structure 3, and get network structure 4

Network Structure 5

Network structure 5 adds a content provider network ( content provider network ) on the basis of network structure 4, such as Google and Microsoft. A content provider may run its own network and provide services, content

Finally, the Internet realized a three-tier ISP structure

The Internet today is a network of networks with a complex structure consisting of more than a dozen first-tier ISPs and hundreds of thousands of lower-tier ISPs. At the center of the network is usually a large network of few interconnected

  • "Tier-1" commercial ISPs (eg, Netcom, Telecom, Sprint, AT&T), offering national or international coverage
  • Content provider network (eg: Google): private network that connects its data centers to the Internet, usually bypassing Tier 1 ISPs and regional ISPs

3. Computer network performance

Performance indicators measure the performance of computer networks from different aspects. The commonly used performance indicators are as follows:

rate

The rate is the data rate ( data rate ) or data transmission rate or bit rate ( bit rate )

  • The most important performance index in computer network
  • The amount of transmitted information (bits) per unit time (seconds)
  • Unit: b/s (or bps), kb/s, Mb/s, Gb/s
  • k=10^3 、M=10^6 、G=10^9  

The speed often refers to the rated speed or the nominal speed

Bandwidth ( bandwidth )

Bandwidth originally refers to the frequency bandwidth of the signal, that is, the difference between the highest frequency and the lowest frequency, in Hertz (Hz)

In computer networks, the highest data transfer rate is usually called bandwidth

Unit: b/s (bps)

Delay/ Latency ( delay or latency )

Why packet loss and delay occur in packet switching?

Packets are queued in the router cache

There are four types of delays:

  • d_{proc}: node processing delay ( nodal processing delay )
  • d_{tail}: queuing delay ( queuing delay )
  • d_{trans}: transmission delay ( transmission delay )
  • d_{prop}: Propagation delay ( propagation delay )

Node Processing Latency

It refers to the time it takes for some necessary processing of data to be stored and forwarded at the switching node. For example, analyze packet headers and extract partial data from packets. Perform error checking or find appropriate routes, etc., usually less than milliseconds

queuing delay

It means that after the packet enters the router, there are still unprocessed packets in the router, so the packet needs to be queued in the input queue; after the router determines the forwarding port, it must be queued in the output queue until the output link is available. The queuing delay depends on the degree of router congestion , and the actual queuing delay is usually on the order of milliseconds to microseconds

Note: Due to processing delays and queuing delays are negligible unless otherwise stated

transmission delay

It refers to the time required for the node to push all the data (bits) of the packet to the transmission link, that is, the time required from sending the first bit of the packet to the time required for the last bit of the packet to be sent. Delay is also called sending delay

Assume that the size of the packet to be sent by node A is L bits, the link bandwidth is R bit/s, and the transmission delay of node A is L/R

propagation delay

It refers to the time it takes for electromagnetic waves to propagate a certain distance in the channel, that is, the time required for a bit to propagate from one end of the link to the other.

Suppose the link length between node A and node B is d, the signal propagation speed is s, and the propagation delay between A and B is d/s

Distinguishing between transmission delay and propagation delay using the example of a convoy passing a tollbooth

We regard the entire fleet as a group, each vehicle as a bit, and the toll booth as a node, with the following assumptions

  • Assuming that the speed of the vehicle is 100km/h, this speed is equivalent to the propagation speed of the signal  
  • It takes 12 seconds for a car to be released at a toll station, which is equivalent to the transmission time of a bit

The time for the fleet to pass through the toll booth = the time for a car to pass through the toll booth × the number of cars = transmission delay

Time for a car to run from the first tollbooth to the second tollbooth = distance between tollbooths / vehicle speed = propagation delay 

delay-bandwidth product 

It refers to the number of bits sent by the sender when the first bit sent by the sender is about to reach the end, which is equal to the product of the transmission delay and the channel bandwidth

The delay-bandwidth product of a link is also called the link length in bits

Packet loss rate

In packet switching, packet loss is called packet loss. The queuing capacity is limited, the arriving packet finds a full queue, since there is no place to store the packet, the router will discard the packet, that is, the packet will be discarded ( lost )

  • Queue buffer capacity is limited
  • Packets arriving in a full queue will be discarded (i.e. packet loss)
  • Discarded packets may or may not be retransmitted by previous nodes or sources

 Packet loss rate = number of lost packets / total number of packets sent

Throughput/rate ( Throughput )

Indicates the transmission data rate (b/s) between the sending end and the receiving end, divided into

  • Instantaneous throughput: the rate at a given moment
  • Average Throughput: Average rate over time

Considering the throughput that the destination path can receive, it is limited by small capacity pipes. The pipeline with the smallest network transmission capacity will become the bottleneck of this link. This link is sometimes called a bottleneck link 

Therefore, the throughput depends on the transmission rate of the link through which the data flows. When there is no other traffic interference, the bandwidth of the bottleneck link is generally taken, that is, the minimum transmission rate  in the link.

4. Computer network architecture and reference model 

 We refer to the collection of layers of a computer network and their protocols as the architecture of the network

 Computer network is a very complex system, we use layered structure to discuss. The basic principles of stratification are as follows:

  • Each layer completes a specific service/function to reduce the complexity of large systems
  • The structure between each layer is clear, which is conducive to the identification of components and their relationships in complex systems
  • Each layer has different functions and can be implemented with the most appropriate technology
  • Maintain the independence of the lower layer from the upper layer, and the upper layer uses the services of the lower layer in one direction
  • The entire hierarchy should be able to promote standardization

In the hierarchical structure of computer networks, the active elements of the nth layer are usually referred to as the nth layer entity ( entity )

Entity represents any hardware or software process that can send or receive information, usually a specific software module

  • A protocol is a collection of rules governing the communication between two peer entities , a protocol is " horizontal
  • Entities at any layer need to use lower-layer services, follow the protocol of this layer, realize the functions of this layer, and provide services to the upper layer . The service is " vertical "
  • The implementation of the lower layer protocol is transparent to the upper layer service users
  • Entities in the adjacent layers of the same system interact through interfaces , exchange primitives through point service access point SAP ( Service Access Point ), and specify the specific service requested

Each layer has its own data unit to transmit, and its name size and meaning are also different. Each message is divided into two parts:

  • The data part, that is, SDU - service data unit, completes the data transmission
  • The control information part, that is, PCI-protocol control information, information that controls the operation of the protocol

These two parts together form a PDU - a protocol data unit, and the PDUs of each layer are different, such as

  • PDUs at the physical layer are called bits
  • The PDU of the data link layer is called a frame
  • PDUs at the network layer are called packets
  • The PDU at the transport layer is called a segment

4.1 OSI Reference Model 

The Open System Interconnection Reference Model (OSI) is a layered network architecture model proposed by the International Organization for Standardization (ISO) in 1984 to support the interconnection of heterogeneous network systems

The Best Learning Tool for Understanding Network Communication (Theoretical Models)

But theory is success, market is failure

The OSI reference model is divided into 7 layers, and each layer completes specific network functions:

Physical Layer ( Physical Layer ) :

Unit: bit 

Mission: Transmitting bitstreams transparently

Function: transparently transmit raw bit streams for data end devices on physical media

The physical layer specifies the interface characteristics (mechanical characteristics, electrical characteristics, functional characteristics, and protocol characteristics), and there are three transmission modes:

  • Simplex ( Simplex )
  • Half-duplex ( half-duplex )
  • Full-duplex ( full-duplex )

Data Link Layer ( Data Link Layer ):

Unit: frame

Task: Assemble IP datagrams from the network layer into frames

Functions: framing, error control, flow control and transmission management

The data link layer is responsible for node -to-node data transmission, adding physical address identification data of the sending end and/or receiving end in the frame header
 

Network Layer ( Network Layer ): 

Unit: Datagram

Task: Transfer the protocol data unit (packet) of the network layer from the source end to the destination end, and provide communication services for different hosts on the packet switching network

Functions: Routing, Flow Control, Congestion Control, Error Control, and Internetworking

The network layer is responsible for the delivery of data packets (packets) from the source host to the destination host. During this process, multiple networks may be traversed to ensure that the data packets are delivered to the destination host through a globally unique logical address, such as an IP address. The core function of the network layer is routing, routers (or gateways) interconnect the network, and route packets to the final destination host 

Transport layer ( Transport Layer ): 

Unit: segment (TCP) or user datagram (UDP)

Task: Responsible for communication between two processes in the host

Function: Provide reliable transmission services and services such as flow control, error control, quality of service and data transmission management for end-to-end connections

The transport layer is responsible for source-destination (end-end) (inter-process) complete message transmission, and SAP addressing ensures that the complete message is submitted to the correct process, such as port number

Session Layer ( Session Layer ):

The session layer allows sessions between processes on different hosts. The session layer uses the end-to-end services provided by the transport layer to provide its value-added services to the presentation layer.

  • dialog controlling ( dialog controlling ) - dialogue establishment and maintenance
  • synchronization ( synchronization ) - Insert "synchronization points" in the data flow

Presentation Layer :

The presentation layer mainly deals with the syntax and semantics of exchanging information between two systems , such as big endian and little endian.

Data representation change function conversion to host-independent encoding, also includes data compression/decompression and encryption/decryption

Application Layer ( Application Layer ):

The application layer is the highest layer of the OSI reference model. It is the interface between the user and the network. It supports users to use the network (service) through a user agent (such as a browser) or a network interface. Due to the variety of actual applications of users, this requires the application layer to adopt Different application protocols solve these problems, so the application layer is the most complex layer and the layer with the most protocols used, typically including

  • FTP - File Transfer
  • SMTP - email
  • HTTP——Web、
  • ...

OSI reference model data encapsulation and communication process

Data encapsulation refers to the process of encapsulating a protocol data unit (PDU) in a set of protocol headers and trailers. In the OSI 7-layer reference model, each layer is primarily responsible for communicating with peer layers on other machines. This process is implemented in the "protocol data unit" (PDU), where the PDU of each layer generally consists of the protocol header, protocol trailer and data encapsulation of the layer

Control information mainly includes:

  • Address ( Address ): Identifies the sender/receiver
  • Error-detecting code ( Error-detecting code ): used for error detection or correction
  • Protocol control ( Protocol control ): additional information to implement protocol functions, such as: priority ( priority ), quality of service (QoS), and security control, etc. 

4.2 TCP/IP Reference Model

ARPA proposed the TCP/IP model when researching ARPAnet. The model from low to high is the network interface layer (corresponding to the physical layer and data link layer in OSI), the network layer, the transport layer and the application layer (corresponding to the OSI in OSI layer). session layer, presentation layer and application layer),

TCP/IP has become a de facto international standard due to its wide application (OSI is only a theoretical support, and TCP/IP is a practical application) 

Comparison of TCP/IP Model and OSI Reference Model

Similarities:

  • Both adopt a layered structure, and the functions of each layer are similar
  • are based on the concept of an independent protocol stack
  • It can solve the interconnection of heterogeneous networks and realize computer communication

the difference:

  • OSI defines the concepts of services, protocols, and interfaces, while TCP/IP does not clearly distinguish them
  • OSI supports connectionless and connection-oriented communication at the network layer , but only connection-oriented communication at the transport layer; TCP/IP only supports connectionless communication at the network layer , but supports connectionless and connection-oriented communication at the transport layer

4.3 Internet protocol stack 

Combining the advantages of OSI and TCP/IP, organizing the protocols in a layered (layer) manner and the network hardware and software that implement these protocols, and realizing the five-layer reference model of the Internet

All the protocols in each layer are called the protocol stack ( protocol stack ). The protocol stack of the Internet consists of five layers: physical layer, link layer, network layer, transport layer and application layer

protocol stack Realize function
application layer  Support various network applications (FTP, SMTP, HTTP)
transport layer  Process-to-process data transfer (TCP, UDP)
Network layer Routing and forwarding of data packets from the source host to the destination host IP protocol, routing protocol, etc.
data link layer Data transmission (Ethernet, 802.11 (WiFi), PPP) between adjacent network elements (hosts, switches, routers, etc.)
physical layer  bit transmission

Data Encapsulation for 5-Layer Model 

Guess you like

Origin blog.csdn.net/weixin_58165485/article/details/128531219