Computer network

This paper is participating in theNetwork protocols must be known and must be known”Essay campaign

About the author

  • The authors introduce

🍓 blog home page: author’s home page 🍓 Introduction: JAVA quality creator 🥇, a junior student 🎓, participated in various provincial and national competitions during school, and won a series of honors


Computer Networks – the network layer

This chapter discusses network interconnection. After the introduction of two different services provided by the network layer, the core content of the Internet protocol IP is entered. Only by thoroughly mastering the main content of IP protocol, can we understand how the Internet works. It also discusses ICMP, several common routing protocols, the main features of IPv6, and the concept of IP multicast. After discussing virtual private network (VPN) and network address translation (NAT), we briefly introduce MPLS.

The most important points of this chapter are:

  1. The concept of a virtual interconnect network.
  2. Relationship between an IP address and a physical address.
  3. Traditional classified-ip addresses (including subnet masks) and classified-free interzone routing selection CIDR.
  4. How the routing protocol works.

Mind mapping

Important Concepts in this chapter:

  • The network layer in the TCP/IP system only provides simple, flexible, connectionless, best-effort delivery datagram services. The network layer does not provide the promise of quality of service, does not guarantee the time limit of packet delivery, and transmitted packets may be wrong, lost, repeated and out of order. The transport layer is responsible for the reliability of communication between processes.
  • The IP network is virtual, because from the network layer, IP network is a unified, abstract network (in fact, is heterogeneous). The abstract Internet at the IP layer shields the complex details of the underlying network, enabling us to use a unified, abstract IP address to handle communication between hosts.
  • There are two types of delivery over the Internet: direct delivery over the local network (without a router) and indirect delivery to other networks (through at least one router, but finally. The next delivery must be direct).
  • An IP address is unique across the entire Internet. Classified IP addresses include class A, B, and C addresses (unicast addresses), and Class D addresses (multicast addresses). The class E address is not used.
  • The IP address of a classification consists of a network number field (specifying the network) and a host number field (specifying the host). The category bit in front of the network number field indicates the category of the IP address.
  • IP address is a hierarchical address structure. The IP address management organization assigns IP addresses only to network numbers. The host number is assigned by the unit that obtains the network number. The router forwards packets only based on the network number connected to the destination host. An IP address identifies an interface between a host (or router) and a link. Multiple host is connected to two or more networks at the same time. Such hosts must have two or more IP addresses at the same time, and their network numbers must be different. Because a router should be connected to at least two networks, a router should have at least two different IP addresses.
  • In the view of the Internet, several lans connected by transponders or Bridges remain one network. All networks assigned network numbers (whether they are small lans or wide area networks that may cover a large geographic area) are equal.
  • The physical address (hardware address) is used by the data link layer and the physical layer, while the IP address is used by the network layer and above layers. It is a logical address (realized by software), and the IP address of the datagram is not visible at the data link layer.
  • IP datagrams are divided into header and data parts. The first part of the header is a fixed length of 20 bytes, which all IP datagrams must have (important fields such as source address, destination address and total length are in the fixed header). Some optional fields of variable length are placed after the fixed header.
  • The TTL field in the IP header gives the maximum number of routers that the IP datagram can pass through in the Internet, which prevents the IP datagram from going around in the Internet without limit.
  • Address resolution Protocol ARP resolves the mapping between IP addresses and hardware addresses of hosts or routers on the same LAN. ARP caching can greatly reduce traffic on a network.
  • In the Internet, we cannot find a host on a network only by hardware address. Therefore, the resolution from IP address to hardware address is very necessary.
  • Classless interzone routing CIDR is a good way to solve the current IP address shortage. CIDR notation follows the IP address with a slash “/” and then writes the number of digits occupied by the prefix. The prefix (or network prefix) identifies the network, and the suffix after the prefix identifies the host. CIDR combines contiguous IP addresses with the same prefix into a “CIDR address block”. IP addresses are assigned in CIDR blocks.
  • CIDR’s 32-bit address mask (or subnet mask) consists of a string of 1s and 0s, and the number of 1s is the length of the prefix. Network addresses can be easily obtained by performing bit-by-bit logical AND operations on IP addresses AND address masks. The default mask for class A addresses is 255.0.0.0. The default mask for Class B addresses is 555.0.0.00. The default mask for class C addresses is 255.255.
  • Route aggregation (replacing many addresses with the same prefix with one) improves overall Internet performance by reducing the number of entries in the routing table and the exchange of routing information between routers.
  • There is a difference between forwarding and routing. “Forward” is the action of a single router. Routing is a collaborative process in which many routers exchange information with each other in order to generate routing tables from which forwarding tables can be exported. If the adaptive routing algorithm is adopted, the routing table and forwarding table can be updated automatically when the network topology changes. In many cases, the term routing table may be used regardless of the distinction between forwarding tables and routing tables.
  • An autonomous system (AS) is a group of routers managed by a single technology. An AS presents a single – and consistent routing policy to other aS.
  • Routing protocols fall into two categories: Internal gateway protocols (or routing protocols within ass), such as RIP and OSPF; external gateway protocols (or routing protocols between ass), such as BGP-4.
  • RIP is a distributed routing protocol based on distance vector and applies only to small Internet. RIP exchanges information with neighboring routers at fixed intervals. The information exchanged is its current routing table, that is, the (shortest) distance to all the networks in the autonomous system, and the next-hop route to each network.
  • OSPF is a distributed link-state protocol applicable to large-scale Internet. OSPF uses flooding to send the link status information of all neighboring routers to all routers in the autonomous system only when the link status changes. Link Status indicates the neighboring routers of the local router and the metric of the link. “Metric” can represent cost, distance, delay, bandwidth, etc., which can be collectively referred to as “cost”. All routers eventually create a topology of the entire network.
  • Bgp-4 is a path vector routing protocol used to exchange routing information between routers of different ass. BCP seeks to find a good route (endless circles) that can reach the destination network (reachable), rather than the best route.
  • ICMP is a Layer I protocol. ICMP packets are sent as IP datagrams, and the header is added to form IP datagrams. ICOMP is used for reliable transmission. ICMP allows hosts or routers to report errors and provide reports about exceptions. There are two types of ICMP packets, namely, ICMP error report packets and ICMP interquery packets.
  • An important application of ICMP is detecting PING between packet networks. PING is used to test connectivity between two hosts. PING uses ICMP echo request and reply packets.
  • The most fundamental solution to the problem of p-address exhaustion is to adopt a new version of the IP protocol with a larger address space, namely IPv6.
  • The main changes brought about by IPv6 are: (1) larger address space (using 128-bit addresses); (2) The header format of linghua; (3) Options for improvement; (4) Support plug and play; (5) Support the pre-allocation of resources; (6) IPv6 header changed to 8-byte alignment.
  • IPv6 datagrams allow zero or more extended headers after the base header, followed by data. All extension headers and data together are called the payload or net load of a datagram.
  • The destination address of an IPv6 datagram can be one of three basic types of addresses: unicast, multicast, or anycast.
  • IPv6 addresses use the colon hexadecimal notation.
  • The transition to IPv6 can only take a gradual evolutionary approach, and the newly installed IPv6 system must be backward compatible. The transition to IPv6 can be done using dual stack or tunneling.
  • Compared with unicast, IP multicast can greatly save network resources in one-to-many communication. IP multicast uses class D IP addresses. IP multicast requires the use of Internet group management protocol IGMP and multicast routing protocol.
  • A VIRTUAL private network (VPN) uses the public Internet as the communication carrier between an organization’s private networks. VPN A dedicated address for internal Internet use. A VPN must have at least one router with a valid global IP address in order to communicate with another VPN in the system over the Internet. All data sent over the Internet must be encrypted.
  • With NETWORK address Translation (NAT), it is possible to use a private IP address within a private network and a global IP address only on a router connected to the Internet. This saves valuable IP addresses.
  • MPLS features: (1) Support connection-oriented quality of service; (2) Support flow engineering to balance network load; (3) Effectively support virtual private network VPN.
  • MPLS marks each IP datagram with a fixed-length “tag” at the entry node, and then forwards the packet with hardware at layer 2 (the link layer) (the tag swap is performed in the marker switch router), thus greatly speeding up the forwarding rate.

After the language

The original intention of the director to write blog is very simple, I hope everyone in the process of learning less detours, learn more things, to their own help to leave your praise 👍 or pay attention to ➕ are the biggest support for me, your attention and praise to the director every day more power.

If you don’t understand one part of the article, you can reply to me in the comment section. Let’s discuss, learn and progress together!

Wechat (Z613500) or QQ (1016942589) for detailed communication.