What is the Internet

There are two ways to answer this question: one is to describe the hardware and software that make it up; The other is to describe it as a networking facility that provides basic services for distributed applications. In fact, the first way to describe it is in terms of its composition, and the second way to describe it is in terms of its function.

All of these devices connected to the Internet are called hosts or end systems.

The end system is connected through a communication link and a packet switch.

When one end system sends data to another, the sending system divides the data and adds the header byte (some necessary information) to each segment. The resulting packet is called a packet in computer network terminology.

The packet switch receives the incoming packet from one of its inbound communication links and forwards the packet from one of its outbound communication links. The main types of packet switches are routers and Link layer switches.

  • Link layer switches are usually used in the access network
  • Routers are usually used in the core of a network

An end system accesses the Internet through an Internet Service Provider (ISP).

1.1 Service Description

An end system connected to the Internet provides a socket interface that specifies how programs running on one end system request the Internet infrastructure to deliver data to a specific destination program running on another end system.

In simple terms, it provides apis to send and receive data.

1.2 protocol

Protocol: Defines the format and order in which insulation is exchanged between two or more communication entities, as well as the actions taken to send or receive a message or other events.

Through the protocol, it is convenient for all the different end systems, different cpus, different operating systems to communicate in the same way.

2. Network edge

The end system, at the edge of the Internet hence the name. The end system also becomes the host, which hosts (that is, runs) applications. The host is further divided into clients and servers.

2.1 access network

An access network is a network that physically connects an end system to its edge router.

An edge router is the first router on the path from an end system to any other remote end system.

  • Family access
    • Digital Subscriber Line (DSL)
    • cable
    • Fiber To The Home (FTTH)
    • Dial and satellite
  • Enterprise (or home) access
    • Ethernet and WIFI
  • Wide area wireless access
    • 3G, 4G, AND LTE

2.2 Physical Media

As a bit travels from source to destination, it travels through a series of “emitters and receivers” pairs, and for each emitters and receivers, the bit is transmitted through a physical medium transmitting electromagnetic waves or light pulses.

Specific have

  • Guided mediaWaves travel along solid media
    • Twisted-pair copper wire
    • Coaxial cable
    • Optical fiber
  • Unguided mediaRadio waves travel through air or outer space
    • Terrestrial radio channel
    • Satellite radio channel

3. Network core

The core of the network is the mesh network composed of the packet switches and links of the interconnection system

There are two basic methods of moving data over network links and switches: circuit switching and packet switching

3.1 Packet Switching

In various network applications, end systems exchange messages with each other. In order to send a packet from the source system to the destination system, the source divides the long packet into smaller data segments called packets. Each packet is transmitted over communication links and packet switches.

Some important concepts:

  • Store and forward transmission
    • This means that the entire packet must be received before the switch can begin transmitting the first bit of the packet to the output link.
    • It’s basically a buffer that you can transfer when it’s full.
  • Queuing delay and packet loss
    • For each connected link, the packet switch has an output buffer (also known as an output queue) that stores the packets that the router is ready to send to that link.
    • If the incoming packets need to be transmitted to a certain link but the link is busy transmitting other packets, the link must wait, which is called queuing delay.
    • Packet Loss occurs when a packet arrives and finds that the cache is full of other packets.
  • Routing table and routing selection protocol
    • Each end system has an address called an IP address. When the source host sends a packet to the destination system, the source contains the IP address of the destination in the header of the packet
    • Each router has a forwarding table that maps the destination address (or part of the destination address) to an output link.
    • The Routing protocol is used to automatically set up these forwarding tables

3.2 Circuit Switching

In a circuit-switched network, during the communication session between the end systems, the switch reserves the relevant resources (cache, link transfer rate) on the communication path between the end systems, that is, the connection is established first, and then the communication;

Multiplexing in circuit-switched networks

  • Time-division Multiplexing TDM: refers to the Time is divided into fixed interval frame, each frame is divided into a fixed number of Time interval; When the network needs to establish a connection, the network will specify a time slot for the connection in each frame; During this time slot, the link is used to transmit the data of the link;

  • Frequency-division Multiplexing: The Division of the Frequency domain into Frequency bands, which are then assigned to connections; This band is used exclusively to transmit the data of the link. The width of this band becomes the bandwidth.

3.3 Comparison between packet switching and circuit switching

Advantages of packet switching:

  • It offers better bandwidth sharing than circuit switching;
  • It is simpler, more efficient and cheaper to implement than circuit switching.

Disadvantages of packet switching:

  • Packet switching is not suitable for real-time services because the end-to-end delay is variable and unpredictable, depending on the situation of the entire network.

Advantages of circuit switching:

  • Provide end-to-end data transmission rate guarantee;

Disadvantages of circuit switching:

  • There is a quiet period in circuit switching, which means that when the dedicated circuit is idle, the resources it occupies are not fully utilized.
  • The process of establishing the connection is complicated;

The trend is towards packet switching.

4. Delay, packet loss, and throughput in a packet switching network


  • Processing delay: Processing delay is caused by the node’s need to parse the necessary information about the packet and then determine its outbound link (operations such as indexing and forwarding tables), usually on the order of microseconds or less.
  • Queuing delay: When other packets are being transmitted on the outbound link of a packet, the packet is subjected to queuing delay. The queue delay is a function of the intensity and nature of the traffic reaching the queue and can usually reach the millisecond to microsecond level.
  • Transmission delay: it is the time required to push all the bits of the packet onto the link. The actual transmission delay is usually on the order of milliseconds to microseconds.
  • Propagation delay: the time it takes a bit to enter a link from the beginning of the link to the next node.

The difference between transmission and propagation

  • Transmission delay is the time required for the router to extract packets, and it is a function of packet length and link transmission rate
  • The propagation delay is the time it takes a bit to travel from one router to another, and it is a function of the distance between the two routers

Packet loss

  • The arriving group found a full queue. Since there is no place to store the packet, the router will discard the packet and the packet will be lost


  • Represents the amount of data passing through a network (or channel or interface) in a unit of time

5. Protocol layer

The computer network adopts a layered architecture, which is of high value because it provides modularity, and also facilitates the diversity of service implementations: one layer provides services to the next layer, while it can take advantage of the services provided by the next layer. As long as there are no changes to the services provided above and the services utilized below, the implementation within the layer has no impact on the system architecture; For large, complex systems that require constant updates, changing the implementation of services without affecting other components of the system is another important advantage of the layered pattern.

A protocol layer can be implemented using hardware and software, and different parts of a protocol layer are often located in different parts of a network component. Protocol layering has the advantages of conceptualization and structure. Modularity makes it easier to update system components. However, layering also has its disadvantages, which are redundancy in functionality. For example, many protocol stacks provide error recovery for both link and end-to-end situations. A second potential disadvantage is that functionality in one layer may require information that only appears in other layers.

5.1 OSI Reference Model

  • The application layer
    • Provide services to the application and specify the details related to communication in the application. Protocols include file transfer, email, and remote login (virtual terminal).
  • The presentation layer
    • Convert information processed by the application into a format suitable for network transmission, or convert data from the next layer into a format that can be processed by the upper layer.
    • Therefore, it is mainly responsible for data format conversion.
  • The session layer
    • Responsible for establishing and disconnecting communication connections (logical paths of data flow), and managing data transmission.
  • The transport layer
    • It plays a role of reliable transmission. Processing is performed only on the nodes of both communication parties, rather than on the router.
  • The network layer
    • Transfer data to the destination address. The destination address can be an address that is connected by multiple networks through a router. This layer is therefore primarily responsible for addressing and routing.
  • Data link layer
    • Responsible for the communication between nodes on the physical plane.
  • The physical layer
    • Responsible for the 0, 1 bitstream (0, 1 sequence) and the voltage level, light flicker between the interchange.

5.2 TCP/IP Reference Model

  • The application layer
    • The application layer is responsible for handling specific application details.
  • Transport layer
    • The transportation layer primarily provides end-to-end communication between applications on two hosts.
  • The network layer
    • Sometimes referred to as the Internet layer, it handles the activities of packets in the network, such as routing packets.
  • The link layer
    • Sometimes called the data link layer or network interface layer, it usually includes the device drivers in the operating system and the corresponding network interface cards in the computer. Together, they handle the details of the physical interface with the cable (or any other transmission medium).

5.3 Five-layer reference model

  • The application layer
    • The application layer is where network applications and their application layer protocols persist.
    • Application layer protocols are distributed across multiple end systems, and applications in one end system use the protocols to communicate with applications in another end system. Packets at the application layer are called packets.
  • Transport layer
    • The transportation layer of the Internet transmits application-layer messages between application endpoints.
    • We call the transportation layer groups segments.
  • The network layer
    • The network layer moves network layer groups called datagrams from one host to another.
  • The link layer
    • At each node, the network layer passes the datagram down to the link layer, the link layer passes the datagram along the path to the next node, and at the next node, the link layer passes the datagram to the network layer.
  • The physical layer
    • Moves bits in a frame from one node to the next. Related to the actual transmission media.

5.4 packaging

  • aApplication-layer messagesIs sent to the transport layer. In the simplest case, the transport layer receives the message and attaches additional information (transport layer receives or does not receive information).
    • This header information will be used by the transport layer on the receiving end. The application layer message together with the header information of the transport layer constitutes a transport-layer segment.
    • The transport layer segment thus encapsulates the application layer packet. Additional information may include the following: (1) Information that allows the transport layer at the receiving end to deliver the packet upward to the appropriate application; (2) For example, error detection bit information. This information enables the receiver to determine whether the bit in the packet has been changed en route.
  • The transport layer transmits the packet to the network layer, which adds the network layer header information such as the system addresses of the source and destination end to generate network-layer datagram.
  • The datagram is then passed to the link layer, which (naturally) adds its own link layer header information and creates a link-layer frame.

At each layer, a packet has two types of fields: the header segment and the payload field. The payload is usually from the upper packet.