"Computer Network: Top-Down Network" Chapter 4 Notes Arrangement (Update)

"Computer Network: Top-Down Network" Chapter 4 Notes Sorting (Updating...)

4.1 Introduction

Network layer service

1. Transfer segments between the sending host and the receiving host.
2. Encapsulate the segment into a datagram at the sending end, and hand over the segment to the transport layer entity at the receiving end.
3. The network layer protocol exists in every host and router.
4. The router checks the header of each IP datagram that passes through it.

Key functions of the network layer

1. Forwarding: Forward the packet from the input interface of the router to the appropriate output interface.
2. Routing: Use routing algorithms to determine the path of the packet from the sending host to the target receiving host.

Data plane and control plane

Data plane

1. Locally, each router function
2. Decide how to forward packets arriving from the input port of the router to the output port
3. Forwarding function: the traditional method is based on the destination address and forwarding table; the SDN method is based on multiple fields and forwarding tables

Control plane

1. Network-wide logic
2. Determine how datagrams are routed between routers, and determine the end-to-end path of datagrams from source to destination.
3. Two control plane methods: traditional routing algorithms are used in routers Implementation; SDN is implemented in a remote server

Traditional way

1. A separate router algorithm element in each router interacts on the control plane.
2. The interaction of routing and forwarding:
Control plane: The routing algorithm determines the end-to-end path.
Data plane: The IP protocol determines the IP datagram based on the forwarding table. Local forwarding on this router

SDN method: logically centralized control plane

1. A different (usually remote) controller interacts with local control agents (CAs)

Network service model

The channel
for transmitting datagrams from the sender host to the receiver host. For a single datagram service: reliable transmission; delay guarantee
for datagram flow services: order datagram transmission; guaranteed minimum bandwidth of the flow; delay between packets difference

Connection established

Before packet transmission, a network layer connection is established between two hosts on the path formed by some routers (involving routers)

4.2 Router composition

Router structure overview

High-level general router architecture
1. Routing: run routing algorithms/protocols (RIP, OSPF, BGP)-generate routing table
2. Forwarding: exchange datagrams from input to output links-forward packets according to the routing table
Insert picture description here

Input port function

1. Physical layer: Bit-level reception
2. Data link layer: Link layer protocol action, decapsulation
3. Network layer: Distributed switching
(1) According to the information in the header of the datagram, such as the destination address, in the input port Find the appropriate output port in the forwarding table in the memory
(2) Target-based forwarding: only depends on the target IP address of the IP datagram (the longest prefix match)
(3) Universal forwarding: forwarding based on any set of header fields

Input port buffer

1. When the rate of the switching mechanism is less than the convergence rate of the input port, it may be queued at the input port (queuing delay and loss due to input buffer overflow)
2. HOL blocking: the datagram at the head of the queue prevents other data in the queue Move forward
Insert picture description here

Exchange structure

1. Transmit the packet from the input buffer to the appropriate output port
2. Exchange rate: the packet can be transmitted from input to output at this rate
3. Three typical switching mechanisms

Swap through memory

1. Switching under the direct control of the CPU, using a traditional computer
2. The packet is copied to the system memory, the CPU extracts the target address from the packet header, searches the forwarding table, finds the corresponding output port, and copies it to the output port
3. Forwarding The rate is limited by the bandwidth of the memory (datagram passes through the BUS twice)
4. Only one packet can be forwarded at a time
Insert picture description here

Exchange via bus

1. The datagram is forwarded from the input port to the output port through the shared bus.
2. Bus competition: the exchange speed is limited by the bus bandwidth
. 3. One packet at a time.
Insert picture description here

Exchange through the Internet (crossbar, etc.)

1. Simultaneously forward multiple packets at the same time to overcome the bus bandwidth limitation
. 2. Banyan network, crossbar network and other interconnected networks were developed to connect multiple processors into multi-processors
3. Advanced design: Fragment datagrams into fixed Cells of length, exchanged through the exchange network
Insert picture description here

Output port

1. When the datagram arrives from the switching organization faster than the transmission rate, it needs output port buffering (datagrams may be discarded, due to congestion, the buffer has no space)
2. The queued datagrams are selected for transmission by the scheduling rules ( Not necessarily first-come, first-served)

Scheduling mechanism

1. Scheduling: select the next packet to be transmitted over the link
2. FIFO scheduling: send in the order of packet arrival
3. Discard strategy: discard the newly arrived packet, lose/remove packets according to priority, and randomly discard/shift Divide
4. Scheduling strategy

Scheduling strategy: priority

Send the highest priority packet

4.3 IP: Internet Protocol

The network layer of the Internet

Insert picture description here

IP datagram format

Insert picture description here

IP fragmentation and reorganization

1. The network link has MTU (Maximum Transmission Unit)-the maximum data length carried by the link layer frame (different link types have different MTUs)
2. Large IP datagrams are fragmented on the network
(1 ) A datagram is divided into several small datagrams (with the same ID, different offsets, the last fragment is marked as 0)
(2) Regroup fragments are only performed on the final target host
(3) IP The information in the header is used to identify and sort related fragments
3. Example
Insert picture description here

IP addressing

Introduction

1. IP address: 32-bit label, addressing the interface of the host or router
2. Interface: the connection between the host/router and the physical link
(1) The router usually has multiple interfaces
(2) The host may also have multiple interfaces
(3) The IP address is associated with each interface
3. An IP address is associated with an interface

Subnets

1. IP address:
(1) Subnet part (high bits)
(2) Host part (low bits)
2. Nodes (hosts or routers) in a subnet have the same high part of their IP addresses, and these nodes constitute Part of the network is called the subnet
. 3. Without the intervention of the router, the hosts in the subnet can reach each other directly
. 4. The method of judging the subnet (separate each interface from the host or router)

IP address classification

Insert picture description here
1. Special IP address:
(1) Subnet part is all 0, this network
(2) Host part is all 0, this host
(3) Host part is all 1, broadcast address, all hosts in this network
2. Intranet (Private) IP address
(1) Private address: A part of the address space is used for private addresses
(2) It will never be assigned as a public address, and will not be duplicated with a public address (meaning only in a local network, distinguishing different devices) )
(3) The router does not forward packets whose destination address is a private address

CIDR classless inter-domain routing

1. The subnet part can be in any position
2. Address format: abcd/x, where x is the length of the subnet number in the address, for example, 200.23.16.0/23

Subnet mask

1.32bits, 1 represents the subnet part, 0 represents the host part

Forwarding table and forwarding algorithm

Get the destination address of the IP datagram. For each entry in the forwarding table, if (IP Des addr) & (mask)==destination, then forward the datagram according to the interface corresponding to the entry; if none is found, Then use the default entry to forward the datagram

The process of obtaining an IP address

1. The host obtains an IP address
(1) The system administrator configures the address in a file
(2) DHCP : dynamically obtains an IP address from the server (plug and play)
A. Allows the host to dynamically Obtain an IP address from the server
B. Overview of
DHCP work: 1) The host broadcasts a "DHCP discover" message
2) The DHCP server responds with a "DHCP offer" message
3) The host requests an IP address: sends a "DHCP request" message
4 ) The DHCP server sends the address: "DHCP ack" message
2. Obtain the subnet part of a network
(11) Obtain a small address block from the address block obtained from the ISP
(2) Hierarchical addressing
Insert picture description here

NAT: Network address translation

1. All datagrams leaving the local network have the same source address NAT IP address, but have different port numbers
2. The local network has only one valid IP address
(1) There is no need to allocate an address from the ISP, and one IP address can be used For all (LAN) devices
(2) can change the device address in the local area network without notifying the outside world
(3) can change the ISP (address change) without changing the internal device address
(4) the device inside the LAN is not clear The address is invisible to the outside
3. Realization
(1) Outgoing data packet: Replace the source address and port number with the NAT IP address and the new port number, the destination IP and port remain unchanged
(2) Remember each conversion replacement pair (In the NAT conversion table)
(3) Incoming data packet: replace the destination IP address and port number, and use the mapping table entry stored in the NAT table

IPv6

1. Fixed 40-byte header, fragmentation is not allowed during datagram transmission
2. IPv4 to IPv6 translation

Guess you like

Origin blog.csdn.net/rainy_universe/article/details/115326222