Computer Network Exam Review - Chapter 4 4.1 4.2.1 4.2.2

The unit of network layer transmission is IP datagram

4.1 Several important concepts of the network layer

Two services provided by the network layer: What services should the network layer provide to the transport layer? Connection-oriented or connectionless? In computer communications, who is responsible for reliable delivery? Is it the network or the end system?

Reliable delivery for connectivity.

Computer networks mimic telecommunications networks and use connection-oriented communication methods. Before communication, a virtual circuit (VC) is established to ensure all network resources required for communication between the two parties. If a reliable transmission network protocol is used, the packets sent can reach the destination in order without errors, without loss or duplication.

A connectionless, best-effort datagram service with no quality of service commitment.

The design ideas adopted by the Internet: The network layer should be designed as simple as possible, and only simple, flexible, connectionless, and best-effort datagram services should be provided to the upper layers. The network does not need to establish a connection before sending packets. Each packet (i.e., IP datagram) is sent independently, regardless of the packets before and after it (not numbered). The network layer does not provide quality of service commitments. That is, the transmitted packets may be errors, lost, duplicated, and out of sequence (arriving at the end of the sequence out of sequence), and the time limit for packet transmission is not guaranteed. The transport layer in the host is responsible for reliable communication.

Two levels: data level and control level

Communication between two hosts in different networks must be completed by forwarding packets through several routers. The information transmitted between routers falls into the following two categories: Data. Routing information (for data transfer services).

Data level:

The router forwards the received packets out of the found corresponding interface based on the forwarding table generated by this router. Work independently. Hardware is used for forwarding, which is fast.

Control level:

Calculate routes based on the routing algorithm used by the routing protocol and create a routing table for this router. Many routers acting together. Using software to calculate is slow.

Software Defined Network SDN (Software Defined Network)

 Remote controller: Calculate the best route and generate its correct forwarding table in each router.

Router: Find the forwarding table and forward the packet.

4.2 Internet Protocol IP

Three protocols supporting the Internet Protocol IPv4:

1. Address Resolution Protocol ARP 2. Internet Control Message Protocol ICMP 3. Internet Group Management Protocol IGMP 

4.2.1 Virtual interconnection network  : Which method is better for realizing interconnection of heterogeneous networks?

All using the same network? It cannot meet the needs of different users. No single network can fit the needs of all users. Not adaptable to technological development.

Use an intermediate device? Practical to meet different needs

Interconnection using intermediate devices

Repeaters, bridges or switches only expand a network and are still a network and are not called network interconnections.

The transmission of packets in the Internet is direct delivery if it can be reached directly without any router. If the IP datagram does not need to be sent to a router before arriving, it is indirect delivery. Each time a packet is forwarded during transmission, it is called a "hop"

4.2.2 IP address: In the TCP/IP system, IP address is the most basic concept. Without an IP address, you cannot communicate with other devices on the Internet. 

IP address and its representation:

Each interface of every host (or router) on the Internet is assigned a globally unique IP address. Assigned by ICANN, the Internet Corporation for Assigned Names and Numbers. 

The IP address adopts a 2-level structure: network number and host number: 2 fields: network number and host number

Classification of IP addresses: divided into five categories: A, B, C, D, and E. Among them, categories D and E are not commonly used. Here we mainly consider categories A, B, and C.

The first bit of a Class A address must be 0, then the network number occupies 8 bits, and the host number occupies 24 bits. The first digit of dotted decimal: 0~127

The first two digits of a Class B address must be 10, then the network number occupies 16 bits, and the host number occupies 16 bits. Dotted decimal first digit: 128~191

The first three digits of a Class C address must be 110, then the network number occupies 24 bits and the host number occupies 8 bits. The first digit of dotted decimal: 192~223

All 0s and all 1s in the host number cannot be assigned because they have special meanings. 

Advantages and disadvantages of classified IP addresses : simple management; easy to use; fast forwarding of packets; divided into subnets for flexible use. Unreasonable design: Large address block wastes address resources; Even if subnets are divided, the problem of IP address exhaustion cannot be solved.

Classless addressing CIDR: CIDR (Classless Inter-Domain Routing): Classless inter-domain routing. Eliminating the traditional concepts of Class A, Class B, and Class C addresses and subnet division can allocate IPv4 address space more effectively, but it cannot solve the problem of IP address exhaustion. Key points: (1) Network prefix (2) Address block (3) Address mask

It also uses the same coding idea as the five classification methods of A, B, C, D, and E. But the network prefix at this time is no longer limited to 8 bits, 16 bits or 24 bits. The number of digits in the prefix is ​​not fixed and can be any value between 0 and 32.

CIDR notation: slash notation abcd / n: The first n bits of the binary IP address are the network prefix. For example: 128.14.35.7/20: The first 20 digits are the network prefix.

Address block: CIDR combines all consecutive IP addresses with the same network prefix into a CIDR address block. The number of IP addresses contained in a CIDR address block depends on the number of network prefixes. For example, if the number of digits in the network prefix is ​​20, then the number of hosts that can be assigned is 2 to the 12th power. However, all 0s and all 1s are not available, so it should be 2 to the 12th power - 2 hosts.

This is something that needs to be thought about again. Somewhat intriguing.

Address mask is also called subnet mask. Number of bits: 32 bits. Purpose: Let the machine quickly calculate the network address from the IP address. It consists of a series of 1's followed by a series of 0's, and the number of 1's is the length of the network prefix.

Address mask for /20 address block: 11111111 11111111 11110000 00000000

Dotted decimal notation: 255.255.240.0 CIDR notation: 255.255.240.0/20.

Default address mask:

Network address = (binary IP address) AND (address mask)  The number of addresses in each CIDR address block must be an integer power of 2. Except for the last few lines, the CIDR address block contains multiple Class C addresses (2n times a Class C address, where n is an integer).

Therefore CIDR addressing is sometimes referred to in the literature as "constructed supernets".

Three special CIDR address blocks 

Characteristics of IP addresses

(1) Each IP address consists of two parts: network prefix and host number. IP address is a hierarchical address structure. Facilitates the allocation and management of IP addresses. Implementing route aggregation reduces the storage space occupied by the forwarding table and the time required to search for the forwarding table.

(2) An IP address identifies a host (or router) and the interface of a link. When a host is connected to two networks at the same time, the host must have two corresponding IP addresses at the same time, and its network numbers must be different. This type of host is called a multi-homed host. A router should be connected to at least two networks, so a router should have at least two different IP addresses.

(3) Several LANs connected by repeaters or switches are still one network. From an Internet perspective, a network (or subnet) is a collection of hosts with the same network prefix. Several LANs connected by repeaters or switches all have the same network number, and they are still one network. LANs with different network numbers must be interconnected using routers.

(4) In IP addresses, all networks assigned to a network prefix are equal. The Internet treats every IP address equally, whether it is a small local area network or a wide area network that may cover a large geographical area

Guess you like

Origin blog.csdn.net/m0_53345417/article/details/130217606