Neighbor subsystem analysis

Source: Internet
Author: User


Neighbor: If a host is connected to your computer on the same LAN (that is, you and the host are connected through a shared media or point-to-point direct connection), then it is your neighbor, they also have the same L3 network configuration. Another way to define a neighbor is that a host must have only one L3 hop point to its neighbor, and its L3 route table must provide a path that can communicate directly with its neighbor. A host that is not a neighbor must communicate with each other through a gateway or router. Shared media: in shared media, any frame sent by any host is directly connected to all hosts on the media. For this reason, the link layer protocol used in the shared media needs to define an addressing mechanism so that the sender can specify the receiver of each frame, and the receiver can also identify the sender. Generally, this addressing address also defines some special addresses through which one frame can be sent to multiple hosts or to all hosts: multicast addresses and broadcast addresses. When multiple hosts using shared media need to transmit data at the same time, the link layer protocol must provide a method, to ensure that all hosts connected to the shared media can detect this situation (conflict), conflicts may cause frame errors. The conflict detection mechanism used by Ethernet is called (CSMA/CD ). www.2cto.com solicitation request and response: When the static translation mentioned above cannot be used to complete the address ing between L3 and l2, the neighbor Protocol is required to complete the ing. Solicitation request. This term indicates sending a packet in the network and asking all hosts if they know the L2 address corresponding to this L3 address. Based on different protocols and actual conditions, the request can be sent in Unicast, multicast, or broadcast mode. Solicitation response. In general, this term refers to sending a packet to respond to solicitation. However, this packet can also be generated independently. Under normal conditions, the host associated with the destination L3 address will generate this response, but another host may also generate a response for it. This packet is usually sent in Unicast mode. In special cases, broadcast can also be used. In Linux, when a packet is transmitted, perform the following steps: select the L3 Destination Address for the routing subsystem of the local host according to the route table, if the next hop is in the same network (that is, the next hop is a neighbor), the neighbor layer resolves the target L3 address as the L2 address of the hop. This association is cached for future use. In this case, if an application sends multiple packets to another application within a short period of time, the neighbor protocol is used only once when the first packet is sent. Finally, a function, such as dev_queue_xmit, is responsible for sending the packet to the traffic control or QoS layer.


Some services provided by Linux general infrastructure: provides a cache for each protocol to store the L3 to L2 conversion structure. It provides functions to add, delete, change, and find a specific ing in the cache. The search function must be fast because it affects the performance of the entire system. Provides an aging mechanism for data items cached by each protocol. When the cache is full and a new ing item needs to be created, an alternative policy is provided to provide a request queue for each neighbor. When you want to send a packet whose L2 address is not in the address cache, you must put the packet in the buffer until you send a solicitation request and receive a response. To adapt each protocol to the behavior of the neighbor subsystem, a group of placeholders or virtual functions are defined in Linux, so that each protocol can insert the desired function in it. The neighbor layer also provides a set of parameters for configuration. Configuration parameters can be configured through user space commands,/proc file systems, or Protocols themselves. Www.2cto.com neighbor protocol Proxy: If a host intercepts the traffic sent to another host and processes the traffic in place of the latter, the host is a proxy. If the host and application do not need to be precisely configured as the service provided by the proxy, this proxy is called a transparent proxy. Proxy condition: the requested address and the address configured on the Interface on which the proxy server receives the request do not belong to the same subnet. The proxy function must be enabled. The forwarding function has been enabled on the proxy server that receives the request. I am * Li Shimin *

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.