Bridges, Hubs, switches, routers and others

1: What is the difference between a bridge, hub, router, and switch?
The first layer of switching: the lowest switching device in the network is the repeater repeater, which works at the physical layer. Its function is to send large signals in both directions. The usual function is to ensure that the model is not too attenuated and deformed when the line is relatively long, except Apart from some delay, there is no difference from direct cable connection.
Layer 2 switching: The bridge and hub and the switcher work at the data link layer, but the mechanisms of the two are different. Strictly speaking, although the hub is connected to multiple hosts, it is not a switching device. It is facing Ethernet frames. Its job is to broadcast Ethernet frames received on one port to broadcast to all other ports (also there are Possible link layer error correction). In this way, the working mechanism of its repeater is the same, but the working level is different. In this way, only the connection of the hub can be a LAN segment. And there is no difference between the import and export of hub. The switcher is also connected to multiple computers, but it will record the MAC address of the host corresponding to each port, so that its forwarding is not a broadcast form, but a choice. Only the connection of the switch can only be a LAN segment. And the import and export of switcher is different. For the entrance, each port corresponds to only one MAC address, and the MAC address in other cases corresponds to the exit.
The bridge also works at the data link layer. Its role is to connect two network segments to forward Ethernet frames, but its forwarding mechanism is not broadcast. Similar to switches, there is a table inside for selective forwarding. The difference is that bridge does not distinguish between entrance and exit. It can be understood that the two are basically the same in hardware, the difference is that each entry of the bridge can correspond to multiple MAC addresses.
Layer 3 switching: This is the router. It operates on IP addresses, and everyone is familiar with it. I think the point to note is that the high-level switching equipment can be used as the bottom-level switching equipment. For example, you can use the hub to connect two machines that are far away, and only use the electrical signal amplification function. You can also use a router as a hub or switch, just connect some hosts as a LAN.

Q2: If the destination MAC address of an ether network frame is not the local machine, should the network card driver still collect the driver buffer, and then discard it by the hardware? ? If the network port is set to promiscuous mode, is it that the network card is received and handed over to the link layer? ? Set to promiscuous mode and normal mode, what is the difference in working mode?
Network card processing can be optimized so that not all Ethernet frames are processed. This function is called Onboard Address ReconiTIon (Onboard Address Recognition), and only the MAC address is local to the upper layer for processing. The so-called promiscuous mode is to turn off this optimization function, as long as all received packets are processed by the upper layer.

Q3: How does it work to modify the MAC address? This question has not been studied, but there are two possibilities for speculation.
a. It is true that the MAC address of the network card has been modified. For example, the MAC address is written in the EPROM on the network card, which provides an interface for the driver to modify using IOCTRL. If this is the case, after changing the MAC address on a machine, if you change the machine, the MAC address is still modified. Some network cards running under DOS do support this modification.
b. The MAC address in Windows is actually a logical address, for example, written in the content of the IO address mapping space (the address allocated by the network card is E800-E8FF, a total of 256 bytes, enough). The hardware of the network card works at the physical layer and is responsible for electrical signal processing. The driver should be working at the data link layer and is responsible for forming the code stream into a frame for TCP / IP processing. The work of the data link layer should be realized by the network card driver). The driver will not read the register of the network card every time to obtain the MAC address of the machine. It should be read when the device is started and placed in the address space (hehe, according to the PCI bus configuration space conjecture). If you modify the MAC data in this IO address space, the driver will use the new MAC address you set when assembling the Ethernet frame.
I guess it should be the latter way. For the specific process, please refer to the section about Ethernet network card driver in Linux.

Classical Crystal Floor Light is a kind of floor lamp with Metal and crystal for main material. Floor lamps are generally placed in the rest area of the living room, and sofa, coffee table with, on the one hand to meet the needs of the region lighting, on the one hand the formation of a specific atmosphere. Usually, the floor lamp should not be placed in the area of tall furniture or hinder the activities of the area. These type light used E14/E27/E12/B22 lamp holder. There are many different patterns and designs for customer to choose. We can make light according to customers' requirments.

hanging light

led chandelier

Classical Crystal Floor Light

Classical Crystal Floor Light,Crystal Floor Light,Design Classics Floor Lighting,Home Goods Floor Lamps

Zhongshan Laidi Lighting Co.,LTD ,