[Network layer] network layer Overview

Source: Internet
Author: User

[Network layer] network layer Overview 1. What are the differences between the two service virtual circuits and the datagram service provided by the network layer? Virtual circuit datagram connection must be established. Do not use the destination site address. It is only used during connection establishment, each group uses a short virtual circuit number. Each group has a full-address route of the target station. The selection time is used when the virtual circuit connection is established, all groups use the same route. Each group selects a route independently. When a router fails, all virtual circuits of the router that have passed the failed router cannot work. The router may lose the group, some routes may change. The Group order always arrives at the destination site in the sending order, and may not handle end-to-end errors in the sending order. The Communication Subnet is responsible for end-to-end traffic control by the host. the Communication Subnet is responsible for the host. 2, internet protocol IP is one of the most important protocols in the TCP/IP system. It is used with four Protocols: 1) address resolution protocol ARP (address resolution protocol) 2) reverse address resolution protocol (RARP) (reverse address resolution protocol) 3) Internet Control Packet ICMP (Internet contro L message protocol) 4) devices used for Internet group Management protocol IGMP (Internet group message protocol) network interconnection 1) physical layer: repeater, repeater 2) Link Layer: bridge, Switch 3) Network Layer: router 4) Gateway: Device 3 at or above the network layer, category ip address network category maximum number of networks can be assigned first number of networks can be assigned the last number can be assigned network number of each network maximum number of A 126 (2 ^ 7-2) 1 126 2 ^ 24-2B (2 ^ 14-1) 128.1 191.255 2 ^ 16-2C (2 ^ 21-1) 192.1 223.255.255 2 ^ 8-2 private IP Address: 10.0.0.0-10.255.255.255 172.16.0.0-172.31.255.255 192.168.1.0-192.168.1.255 special address: host number all 1: All host numbers on the network are 0: Indicates the entire network connected to the host. Step 4: Address Resolution Protocol and Reverse Address Resolution Protocol 1. How does host A send messages to B in the local area network? 1) check whether there are IP addresses of B in the ARP high-speed cache. If yes, write the corresponding MAC address to the MAC frame and send the frame to the machine with the corresponding MAC address through the LAN. 2) if no IP address of B exists in the cache, perform the following steps to use ARP to send an ARP request to the local area network, all hosts in the mac lan corresponding to the IP address of B receive the request. Only after B responds to the request and sends its MAC address to A and receives the MAC address of B, write the ing between the IP address of host B and the MAC address in the ARP cache, and send a message to host B. Note: ARP sets a survival time for the ing in the cache, all mappings that exceed the survival time will be deleted. 2. Four typical cases of ARP use 1) from the local network host to the host 2) from host A to another network host B: First parse the route from this network to the destination network (in this network) (3) router to the host on this network (4) router to another network host: Resolve the network route MAC and then give it to five, IP datagram 1) in the fixed part of the IP datagram header, field ① occupies 4 digits and the IP protocol version is 4 (IPv4 ). IPv6 is still in its infancy. ② Header Length: 4 characters. The unit of the number indicated by the field is 32 characters (the length of one 32-bit character is 4 bytes), and the header length is up to 60 bytes. The length of the IP Group header is always an integer multiple of 4 bytes. If it is not an integer multiple of 4 bytes, you must use the last filling Field to fill the service. ③: takes 8 bits, to get better services. ④ Total length: the length of the sum of capital and data, in bytes. Because the total length field is 16 bits, the maximum length of the datagram is 216-1 = 65 535 bytes. The Maximum length of the data field in the frame format, that is, the Maximum transmission Unit MTU (Maximum Transfer Unit ). When a datagram is encapsulated as a link layer frame, the total length (that is, the header plus the data part) must not exceed the MTU value of the link layer. ⑤ Identification: 16 digits. Receive the Flag in sequence (Flag): takes three places, but currently there are only two meaningful signs. The watermark bit in the flag field is marked as MF (More Fragment ). MF = 1 indicates the datagram with "sharding. MF = 0 indicates that this is the last of several datagram slices. The one in the middle of the sign field is marked as DF (Don't Fragment), meaning "Fragment is not allowed ". Fragment is allowed only when DF = 0. 7. offset: 13 digits. After a long group is split, a part is located in the relative position of the original group. That is to say, where the starting point of the user data field starts from. The part offset is in 8 bytes. This means that the length of each part must be an integer multiple of 8 bytes (64-bit. Token survival Time: 8 bits, TTL (Time To Live), and Protocol: 8 bits. The protocol field specifies the protocol used by the data carried by the datagram, so that the IP layer of the target host can know which processing process the data part should be handed over. Token header test: 16 digits. This field only checks the header of the datagram, but does not include the data part. 2) The variable part of the IP datagram header is an optional field. The option field is used to support troubleshooting, measurement, and security measures. The length of this field is variable, ranging from 1 byte to 40 byte, depending on the selected item. Some options only require one byte. It only includes one byte of Option Code. However, there are still some options that require multiple bytes. These options are spliced one by one, without a separator in the middle. Finally, fill the fields with all 0 to become an integer multiple of 4 bytes. The variable part of the added capital is to increase the IP datagram function, but it also makes the length of the IP datagram header variable. This increases the overhead for each vro to process data packets. In fact, these options are rarely used. The new IPv6 will fix the length of the IP datagram header. 6. Grouping forwarding algorithm 1) extract the network address D of the target host from the datagram header and obtain the network number N 2) N is a network connected to the current route, then it is directly delivered to the target host. 3) Otherwise, if the route table contains a specific host route with the destination address D, it will be delivered. 4) Otherwise, if there is a route to the network N in the route table, it will be delivered. 5) otherwise, deliver to default route 6) Otherwise, report forwarding failure

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.