Summary of "Computer Network-top-down approach and Internet features" (II)

Source: Internet
Author: User
Tags comparison table

Computer network-top-down method and Internet Features Summary Note (bottom) This Part includes the network layer, link layer, physical layer (unfinished) and wireless network. Finally, we provide a general summary and a Chinese-English comparison table. -------------- D. The function of the network layer ------------- is to send a group from one sending host to the receiving host. Three functions are required: Forwarding, selecting, and establishing connections. The services that the network layer should provide include: ensure delivery, that is, data can reach the destination; ensure that delivery has an upper limit of latency, that is, data delivery can ensure that it does not exceed a certain delay value. To transmit packets, the network layer must also have: ordered group delivery, minimum bandwidth, maximum latency jitter, and security services. The Network Layer Protocol IP address of the Internet is a best effort service. Other types of network layer services, such as asynchronous transmission model (ATM), are more important: constant bit rate (CBR) and Available Bit Rate (ABR ). The network layer also provides connection-oriented and connectionless services, and only one type is provided in a single system. The former is called a virtual circuit (VC) network, and the latter is called a datagram network. The Internet network layer is a datagram network. A vc is composed of the path (a series of links and routes) between the source and the target, the number of each link along the path (called the VC number), and the route entry. A group that belongs to the VC will carry a VC number in the first part, and then each time a route is reached, the VC number will be replaced with the index value in the forwarding table, so that the Group will be sent to the next link. The start and end packets sent by the terminal system to the network and the VC established packets transmitted between routes are called Signaling packets, corresponding to the signaling protocol. In a datagram network, a packet only stores the IP address of the destination. When passing through a route, the routing study the range of the destination address in its own grouping table, send the group to the corresponding link. For this reason, the route will store a prefix forwarding table and use the destination address and prefix table for the longest prefix match. For details, see the textbook. In the datagram network, the forwarding table can also be updated in real time. ------------- Routing principle ------------ a route consists of four parts: input port, switching structure, output port, and selector. The input port is first wired and then Data Link processing. These two parts implement the physical layer and data link layer related to each physical link to the route, the later lookup and forwarding queuing module uses the forwarding table to determine the output link to which the group will be sent, queues the group after the query is successful, and then sends the group in the queue to the Routing Switching structure. The switching structure is the core of routing. The three basic switching technologies are memory switching, bus switching, and interconnection network switching. The last one is also a common method. The structure of the output port is the opposite to that of the input end. The switched group enters the cache queue, and then processes it through the data link layer and sends it to the line end. Because the input and output queues occupy the router cache, if the queue is too long, the cache will be exhausted and packet loss occurs. Solve this problem from two aspects: Increase the cache and increase the speed. Define the switching structure rate as the rate at which the switching structure moves the group. For a route with n input and n output, the switching structure rate must be at least n times the input rate to avoid congestion and packet loss. For cache capacity B, the formula is B = RTT * C/root number N, where C is the link capacity, and N is the large TCP flow traffic. Similarly, the grouping scheduling program of the output queue needs to consider the transfer rules of the Group in the queue to provide service quality assurance. This will be discussed in later sections. If the cache is insufficient, You can discard the new group (discard the tail Policy) or Delete the existing group. The practice of providing a congestion signal to the sender before the cache is full is called the active queue management (AQM), and the random early detection (RED) is a common AQM. If it is an input queue congestion, it is called a line Front (HOL) congestion. ------------ Network layer ------------ the network layer group, that is, the packet format includes: version number (4), header length (4), service type (8, TOS for short, specifying different datagram types ), the datagram length (16) is the first 32bit, And the identifier, flag, and slice offset constitute the second 32bit. The lifetime (8, Time-to-live, TTL, the packet is discarded when the value of this route is reduced by 1 and TTL is 0. The Protocol (8, specify the upper-layer protocol of the receiver) and the first checksum form the third 32bit, next is the source and target IP addresses of each 32bit, the option content and data. Because the link layer protocol may not carry Network Layer groups, if the maximum data volume that can be carried by link layer frames is called the maximum transmission unit MTU, IP datagram fragmentation is required to transmit large IP groups. The sender is responsible for marking the datagram. When the router needs to split a big data report, it adds a Piece Offset and a flag to each split piece. If the last piece is 0, otherwise, the value is 1. after receiving a group of slices with the same logo, the receiver assembles them according to the photo offset. ------------ The IPV4--------------IP is a 32-bit binary and every eight bits are written in decimal format. The largest IP address is 255.255.255.255. Each host and route in the Internet must be assigned a unique IP address in the world. In addition, if several hosts are interconnected in a vro-Free Network, a subnet can be formed by adding a link to the vro port. For example, if the three machines in the subnet are 223.1.1.1, 223.1.1.2, 223.1.1.3, and the routing port is 223.1.1.4, the IP address allocated to the subnet is 223.1.1.0/24, the first 24 bytes of the IP address define the subnet address. This/24 notation is called the subnet mask. The Address Allocation Policy of the Internet is called classless Inter-Domain Routing (CIDR). First, the Organization obtains an IP address block from the ISP, and the top IP address distributor is ICANN. Subsequently, the organization generally allocates IP addresses to hosts and routing ports in the organization's network through the Dynamic Host Configuration Protocol DHCP. DHCP is a plug-and-play protocol. The following describes the steps of DHCP protocol. A newly added network host must first discover a DHCP server that interacts with it. By sending a DHCP discovery packet to port 67 in the UDP group, it uses the destination address 255.255.255.255 and source address 0.0.0.0, these two special IP addresses represent the broadcast packets to the whole network and the host address respectively. In this way, the packet is sent to the entire network. When the DHCP server receives a discovery packet, it uses a DHCP server to provide the packet response. The destination address is broadcast across the network, which contains the transaction ID of the discovery packet, recommended IP address, network mask, and IP address lease period. After receiving the packet, the client selects one from the network server and responds to the server with a DHCP request packet. The corresponding server uses the dhcp ack packet to confirm the information, so that the client finally obtains an IP address. NAT technology, that is, network address translation technology, is a simple address allocation method that is widely used. A nat server has a single IP address equivalent to a device on the Internet. It receives all intranet data and sends it with a unique IP address. the received data is sent to a specific Intranet device through the NAT translation table on the route. This can effectively relieve the pressure on Address allocation. However, because NAT does not allow the Internet to directly reach the Intranet device, the UPnP protocol provides NAT traversal. This protocol allows applications to establish mappings between private IP addresses, private ports, public IP addresses, and public ports (that is, the IP addresses and ports of NAT routes, the application can use public IP addresses and public ports for external announcement, and receive external data through NAT. Just like a hole opened on NAT, the information passing through the hole is received by the program, and the outside world thinks the hole is the program. This is the NAT traversal technology. ----------- IPV6 -------------- datagram format: version number (4), traffic type (8), flow tag (24) to form the first 32bit, payload length (16), next part (8 ), the hop limit (8) is the second 32bit, followed by the source address and destination address of 128bit, and finally the data segment. The traffic type is similar to the IPV4 TOS, indicating the stream type. The flow tag is used to identify the stream of a datagram. The payload length indicates the data length after the message. The next header field specifies the transport layer protocol to which the datagram content is delivered. Similar to the protocol field in IPV4, the hop limit is similar to TTL. The difference is that it is not allowed to assemble partitions on the vro first, and the partitioning work is completed in the end system. If the route receives a datagram greater than the link capacity, the system returns an excessively large ICMP packet. In addition, because the transport layer has the first check, IPV6 removes the first check and the options are also moved to the corresponding transport layer protocol. ---------- Routing algorithm ----------- because the host must be directly connected to a vro, which is called the default route, the first hop route, or the default gateway, we always want to obtain a short path between the source route and the destination route. The algorithms include global routing algorithms and distributed routing algorithms. The routing algorithm can be divided into static and dynamic routing algorithms based on the algorithm state. Load-sensitive or load-slow algorithms are divided into Load-sensitive algorithms and slow algorithms. These concepts are described later. In the Link State routing algorithm LS, the network topology and the cost of all links are known. In this way, we can use the Prim and Dijkstra algorithms in graph theory to calculate the Shortest Path Distance Vector routing algorithm DV, which is an iterative asynchronous distributed algorithm. Read the textbook for detailed algorithms. In comparison, the LS algorithm is fast in convergence and robust, but the packet complexity of the DV algorithm is low. In practice, because of the large scale of the routing network and the organizational network manager's expectation of autonomous management, routers are generally organized into autonomous systems (. Routes in an AS system all execute the same routing algorithm, which is called the internal routing protocol of the autonomous system. AS also has several routes responsible for forwarding to the AS external group, called gateway routing. For a gateway route, the external AS route connected to it is also a gateway route. In order to forward data to the correct AS, a gateway route must know the route information that each gateway route can reach, in addition, you need to inform yourself of all the routes in the AS so that they can send information to the corresponding route. These two tasks are completed through the routing protocol between autonomous systems. The following describes the routing rules of the Internet. AS internal routing protocol, also known AS internal gateway protocol, IS commonly used in the routing information protocol RIP and Open Shortest Path First ospf is-IS protocol. The AS protocol is the BGP protocol. This part will be added later. --------- E. Link Layer and LAN -------- the link layer task is to transmit network layer datagram through a single-segment link node in the path to the node. Its services include frame formation (encapsulation of network layer datagram into frames), Link Access, reliable delivery, traffic control, error detection, error correction, half duplex and full duplex. The link layer protocol is based on nodes and adjacent nodes. This function is usually implemented in a network adapter or NIC. The link layer provides bit-level error detection and error correction, including the use of a single parity bit or two-dimensional parity, that is, the data is divided into the j column of the I row to calculate the parity value respectively, two-dimensional parity check can automatically correct one error. Or the checksum method used at the network layer. The receiver's ability to detect and correct errors is called forward correction (FEC). Now the network uses cyclic redundancy detection (CRC) encoding, also known as polynomial encoding. ----------- Broadcast link ---------- there are two types of network links: point-to-point link and broadcast link. The broadcast link requires multi-channel access, that is, to figure and coordinate multiple sending and receiving nodes to access a shared broadcast channel. If two nodes transmit frames at the same time and the frames collide, neither node can receive the frames. The corresponding multi-channel access protocol in the network. The implementation of such protocols can be divided into three types: Channel Division protocol, random access protocol and rotation protocol. Channel Division protocol: time division multiplexing (TDM) and frequency division multiplexing (OFDM) are two channel division protocols. TDM divides the time into time frames, divides the time frames into N slots, allocates the time slots to nodes, and then loops according to the allocated sequence. Generally, one time slot can transmit one group. This effectively avoids collision. But it may also cause waste (for example, if only one node needs to send messages, it will wait for other nodes to consume their time slots each time ). OFDM divides the channel bandwidth into N segments, and each node is allocated to a part of the channel bandwidth. The advantages and disadvantages are the same as those of TDM. The third channel division protocol is CDMA. By cleverly assigning an encoding to each node, different nodes can send messages at the same time without collision. The details will be discussed in later chapters. Random Access Protocol: The Random Access Protocol feels similar to the congestion mechanism. After a node suffers a collision, it selects a random latency and resends the group. Repeat the process until the group is successfully sent. The most common protocol is the ALOHA protocol and the carrier listener protocol for Multi-Channel Access to CSMA. In the Time Slot ALOHA protocol, it is assumed that all frames are L bit long, the time slot length is L/R, and R is the channel rate. That is to say, one time slot is transmitted, and the node only transmits frames at the start of the time slot, node synchronization. The node can know the collision before the time slot ends. In Time Slot ALOHA, if a collision occurs, the node will re-transmit with the p probability in the next gap, and perform a probability operation with the (1-p) probability in the next gap until the transfer is successful. In this simple protocol, the maximum efficiency is only about 37% Pure ALOHA, which is not a time-slot dispersion protocol, and its maximum efficiency is only half of the time-slot ALOHA. In the CSMA protocol, the carrier listener requires the node to listen on the channel before transmission. If any node is found to be transmitted on the channel, wait for the random time to listen on the channel, collision detection requires that the node listen on the channel during transmission. If the other node detects interference frames during transmission. The next attempt time is specified by the Protocol. Because the listening channel may have transmission latency, that is to say, one node is already being transmitted, but the other node is listening to the channel is empty, this will also lead to a collision, collision detection CSMA, after the two nodes detect a collision, the transmission will be abandoned. The polling protocol and Token Transfer Protocol are important in the rotation protocol. In the round-robin protocol, a node is defined as the master node, and it sends packets to each node in turn to specify the transmission rate. In the token transfer protocol, there is a small target town called the token. the token rotates in a fixed order between nodes, and the node holding the token can send some frames at the maximum rate. LAN has two popular technologies: A Random Access-based Ethernet LAN (or 802.3 LAN) and a token transfer-based LAN, this includes a licensing ring (or IEEE 802.5) and an Optical Fiber Distributed Data Interface (FDDI) ---------- link layer address ----------- the LAN address is also called a physical address or a MAC address, and the MAC address is the media access control address. Generally, the MAC address is 6 bytes, And the MAC address of any adapter is unique. So now many registration software have bound the registration code to MAC. The sending adapter inserts the target MAC into the frame. All the adapters in the LAN will receive the frame and compare it with themselves. If they are different, they will discard it. In the same way, they will retrieve the encapsulated datagram and interrupt its parent node. If you want to broadcast a frame, set MAC to full 1. in order to convert network-layer addresses such as IP addresses and link-layer addresses such as MAC addresses, an IP Address Resolution Protocol (ARP) is generated. The ARP module on the node uses any IP address in the LAN as the input and outputs the corresponding MAC address. It is similar to DNS. The ARP module stores an ARP table in RAM, and stores the ing between IP addresses and MAC addresses and a TTL value. The TTL ing between TTL time and MAC address will be deleted. The process of adding a ing is as follows: a node transmits an ARP group to the adapter and requires the adapter to send packets using MAC broadcast. After the adapter is encapsulated, the group is passed into the subnet. Each node checks whether the IP address is the same as the destination IP address in the group. If the IP address is the same, the node sends back the ARP group to respond, in this way, the sending node can update its ARP table. Note that the ARP group is a broadcast frame, but the response ARP is a standard frame. If you want to send data from a sub-network to another subnet across a vro, you must first send the data to the vro and forward it against the internal forwarding table. ------------ Ethernet ------------ previously said that Ethernet is a popular wired LAN technology. Ethernet frames include the pre-sync code (8 bytes), Destination Address (MAC address 6 bytes), source address (6), type (Network Layer Protocol specified, 2 bytes ), data (carrying IP datagram, the maximum transmission unit MTU is 1500 bytes), and finally 4 bytes of Cyclic Redundancy detection. In addition, Ethernet provides non-connection and unreliable services to the network layer. The Multi-Channel Access protocol used by Ethernet is the CSMA/CD protocol. It allows the adapter to start transmission at any time (no time slot), carrier listening, collision detection, waiting for random time before trying to re-transmit. The workflow is that the adapter obtains the datagram from the network layer and prepares a frame. If the adapter listens to the idle channel (no signal energy enters the channel within 96 bit time), it sends the frame, if other signal energy is received, wait until the signal energy disappears and wait for 96 bits to be sent. Listening is also required during sending. If you listen to other signal energy, stop transmission and send a 48-Bit Blocking signal. Then, the adapter enters the exponential backward phase, that is, when the frame is facing the nth collision, the adapter is randomly from 0 ~ 2 (m)-1 select a value K (m = min (10, n), and then the adapter waits for K * 512 bits. Ethernet efficiency = 1/(1 + 5 * d [prop]/d [trans]), where d [prop] is the maximum transmission time of signal energy, d [trans] indicates the maximum frame transmission time. There are many Ethernet standards. The Uniform Naming rule is the transfer rate of numbers + BASE-+ physical media letters. For example, 10GBASE-T represents a 10 Gbps dual-stranded copper Ethernet. ------------ Switch ------------- modern Ethernet is a star topology. Each node is connected to a central switch. The task of a vswitch is to receive and forward the incoming link layer frames to the outbound link. Vswitches are transparent to nodes. That is to say, node addressing does not pass through the switch. The vswitch has the forwarding and filtering functions. The vswitch table contains the MAC address of the node, the interface connecting to the node, and the storage time of the ing. Its working principle is similar to routing, and it is also self-learning and plug-and-play. The primary advantage of a vswitch to connect nodes over Ethernet is that it eliminates collisions. When a node needs to transmit frames, like a route, the vswitch places frames in the output cache queue. The vswitch can also connect to heterogeneous links, so that different links can work together and the vswitch is easy to manage. Compared with a vro, A vswitch can process data at the link layer at the maximum, but a route may process network layer data. However, the protection measures can ensure that the network does not crash. In addition, the switch is self-learned, and the route needs to be configured with an additional IP address and MAC. The switch can communicate directly, but the route needs to be forwarded through the route. ---------- PPP protocol ----------- the broadcast link section begins with that, the link layer protocol is mainly broadcast link protocol and Point-to-Point Protocol. Point-to-Point Protocol (PPP) is also the Protocol selected for host dialing. Its content is read. ----------- F. Wireless Network ----------- a wireless network consists of a wireless host, a wireless route, and a base station. The base station is responsible for data exchange between hosts. The instance has a cell tower and a wireless LAN Access Point in the cellular network. The host associated with the base station is called the Infrastructure mode operation, and the other mode is the self-organizing network mode. We will discuss the former. Wireless links and network features include path loss attenuation, interference from other signal sources, and multi-path propagation. These features make the wireless network more prone to bit errors, measured in the bit error rate (BER ), for wireless hosts, the signal-to-noise ratio is called SNR. In a physical layer modulation scheme, the higher the SNR, the lower the BER. In the broadcast link section, we have talked about three access protocols, including the Code Division Multiple Access (CDMA) protocol. In CDMA, each bit to be sent is multiplied by a signal bit for encoding. This signal changes at a much faster rate than the data. The specific algorithm textbooks are very detailed. ----------- WIFI (802.11 Wireless LAN) ----------- the basic construction module of WIFI is the basic service set (BSS). It usually includes multiple wireless sites and a central base station called the Access Point (AP. An AP-equipped Wireless LAN is called an infrastructure Wireless LAN. Each AP is assigned a Service Set Identifier (SSID) and a channel number. When the device enters the Wi-Fi cluster, You need to select an AP for association. The standard requires the AP to send beacon frames periodically, including the SSID and MAC address of the AP. For the host, the scan channel listener beacon frame is called passive scan, you can also broadcast a probe frame to perform the so-called active scan. Advanced features of Wi-Fi include Rate Adaptation and power management. Other IEEE 802 protocols include Bluetooth and WiMAX. The 802.11 Protocol also has a random access protocol similar to Ethernet, that is, the CSMA with collision avoidance, that is, the CSMA/CA protocol. It features collision avoidance rather than collision detection, and uses the ARQ mechanism. Collision Avoidance is similar to TCP's ACK mechanism. The sender listens to the idle channel and sends the frame after a Distributed inter-frame interval (DIFS). The receiver sends the frame back after the short inter-frame interval (SIFS, if the sender does not receive the confirmation within the specified time, resend the message using the rollback mechanism like Ethernet. After multiple failed attempts, the sender discards the frame. However, there is a major problem with the listener channel. Because the coverage area of wireless devices is limited, if both senders are not covered by each other, but both can send data to one receiver, then they will crash at the receiver without knowing it. To deal with this so-called hidden terminal problem, the Protocol includes RTS and CTS to alleviate this problem. Before sending data, the sender sends a request to send the RTS, and the receiver sends the CTS notification to transmit the data. In addition, other senders are required to delay the access. See the IEEE 802.11 frame specification. Each frame includes (unit: byte) frame control (2), duration (2), address 123 (6 each), serial number control (2), address 4 (6 ), payload (0 ~ 2312), CRC (4 ). The sub-fields of frame control include (unit: bit) Protocol version (2), type (2), subclass (4), ap id, slave ap id, and more IDs, retry, power management, more data, WEP, Rsvd (each 1 ). the first three addresses are respectively the MAC address of the receiver, the MAC address of the sender, And the MAC address of the subnet route. Finally, the cellular network and GSM are omitted. ---------------------------- Let's take a look at the network operation process as a whole. The Internet is a network composed of hosts and links. All terminals on the Internet are assigned an IP address, and all network cards have a unique MAC address. Applications on the terminal system use the application layer protocol to form network requests. The request message includes the domain name of the target server. The domain name is resolved to an IP address through DNS and transmitted to the transport layer of the local machine through sockets, the main transport layer protocols are TCP and UDP, both of which provide logical communication. The difference is that TCP also provides congestion mechanisms and reliable data transmission. The application layer can specify the transport layer protocol as needed. The Transport Layer then delivers the encapsulated packets to the network layer managed by the operating system. The network layer provides forwarding and routing functions. We first discussed how router forwarding and routing, Buffer Queue, and other functions are implemented. Then we specified the datagram structure of the network layer protocols IPV4 and IPV6, and they provided unreliable data transmission services, it also describes the IP Address Allocation, that is, the subnet mask that is invented for subnet management convenience, the DHCP protocol that facilitates temporary access to the host, and the shortage of IP addresses, the NAT technology invented by the simplified network structure and the UPnP protocol used by P2P programs for NAT traversal. DV and LS routing algorithms discussed at the end of the network layer section. Network Layer datagram is finally sent to the link layer for encapsulation into frames. The link layer provides data transmission between nodes. In order to solve the problem of Channel Collision on the broadcast link, we discuss three multi-channel access protocols: Channel Division protocol, random access protocol and rotation protocol, and finally describe the Ethernet protocol used by the LAN. Corresponding to the content of the network layer, we briefly explain that each adapter has a unique MAC address, as well as addressing and switch content. Finally, we discuss another network link: PPP. In addition, a brief introduction is made to the wireless mobile network without changing the changes. --------------------- English and Chinese Comparison table ‑ forwarding route selection routing forwarding table connection establishing connection setup asynchronous transmission model ATM Constant Bit Rate CBR Available Bit Rate Avaiblable Bit Rate ABR virtual Circuit VC datagram network dadgram network signaling message longest Prefix matching principle longest Prefix matching rule discard tail policy drop-tail Random Early Detection RED Active Queue Management maximum Transmission Unit Max Transmission Unit MTU fragment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.