The Bridge is a network device with intelligent connection service, which is applied to the LAN.
1. Bridge working level and function
The bridge works on the data link layer of the OSI reference model.The network bridge generally has two ports, each port has its own MAC address, bridging two network segments respectively.
Network bridge function: First, the network bridge has data filtering, storage and forwarding functions.Secondly, from the perspective of network size, the bridge can connect two small network segments to expand the network distance and application range;In terms of network performance, the bridge can divide a large LAN into two small network segments, so that the network originally located in a conflict domain is divided into two conflict domainsWebsite constructionCommunication capability.
2. Operating principle of the bridge
As shown in Figure 3-8, bridge two network segments through two ports of the bridge.There is a built-in bridge table in the bridge, which records the mapping relationship between the MAC address of the node machine connected to the bridge and the bridge port (see the table on the right). If host A sends a data frame to host B, the bridge port B1 will receive the data frame sent by A at the same time. The bridge queries the bridge table and learns that A and B are both bridged on the same port BI, and the bridge will discard the data frame (filtering function).When host A sends a data frame to host X, and the bridge queries the bridge table to learn that the destination MAC is bridged on port B2 or cannot determine the port of the destination MAC, the bridge will store the data frame (storage function) and forward it to network segment 2 (forwarding function) through port B2.
The filtering function of the bridge plays the role of dividing the conflict domain.The forwarding function of the bridge cannot block the broadcast, which means that the two network segments connected by the bridge are still in the same broadcast domain;The storage function of the bridge indicates that data forwarding will be delayed.
3. Generation of bridge table
The bridge table of the bridge is empty at first, and its intellectualization is based on its "self-learning" function. Every time the bridge port receives a data frame, it will automatically record the mapping of the source MAC address of the data frame and the corresponding bridge port one by one;The destination MAC of the data frame cannot be determined, that is, when the destination MAC is not known which port it is connected to, the flooding method is used to broadcast to other ports other than the port receiving the data frame, so that a complete bridge table is gradually generated.
In addition, extended by the storage and forwarding functions of the bridge, the network segments connected at both ends of the bridge can use different media access protocols, such as Ethernet, token bus, token ring, etc., to form a mixed network environment in which different LANs are mixed together. However, this bridge is complex and requires frame format conversion.The store and forward of the general network bridge increases the network delay, which is not suitable for real-time applications.