The reason why the source Mac address of the Mac frame changes during the forwarding process

  This involves the self-learning function of the switch. The switch gradually builds the forwarding table and ARP cache table for self-learning by forwarding the Mac frames to him. The switch needs to establish an ARP cache table, and its self-learning process can only learn the source MAC and port mapping of the frame sent to it, so the router needs to change the source MAC in the frame to its own MAC, so that the intermediate Layer 2 switch can learn arrive.
  The following is the specific forwarding process: the
  switch has a MAC address table. When the switch receives any data frame, it will first record the mapping between the source port and the source MAC address of the data frame. If there is no mapping item, the lifetime of the mapping is updated, and if there is no mapping item, the mapping item is saved in the MAC address table. Then judge whether the data frame belongs to a broadcast frame or a unicast frame. If it is a broadcast frame, forward the data frame to all ports (except the port receiving the data frame). If it is a unicast frame, look up the existing MAC address table, according to If there is a corresponding mapping in the MAC address table, the data will be forwarded according to the mapping item; if there is no mapping, the switch will broadcast the frame, and when there is a corresponding message from the receiver, it will remember the corresponding MAC address and port mapping, For the next forwarding, the initial learning is also obtained from this

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325617737&siteId=291194637