Network equipment network card, repeater, hub, bridge, switch, router working principle

Network equipment network card, repeater, hub, bridge, switch, router working principle


network card
1. Works at the physical layer (for data reception and transmission)


Repeater
1. Works at the physical layer to restore the signal in the network and Re-send to other network segments (receive and re-send data)


hub
1. Working at the physical layer, the hub is essentially a multi-port repeater.
2. Forward information received from one port to all other ports.
3. The network card connected to this port receives the data, and if it is sent to the network card, it is received and submitted to the upper-layer application.

The role of the hub
1. Information forwarding
2. Signal regeneration
3. Reduce network


failures
Bridge 1. Work at the data link layer, used to connect two network buses
2. Only two ports, used to connect to the network bus Divide the area, unlike the hub, all ports share a network bus
3. Use the MAC address mapping table to decide whether to forward the received information. Those on the same network segment (port) do not need to be forwarded, and those on different ports must be forwarded.
4. Bridge is also known as bridge. Similar to repeaters, traditional bridges have only two ports, which are used to connect different network segments. Different from the repeater, the bridge has a certain "intelligence", can "learn" the address of the host on the network, and has the function of signal filtering.
5. As shown in Figure 4, the data packets sent by host A on network segment 1 to host B will not be forwarded to network segment 2 by the bridge. Because, the bridge can recognize that this is the communication data flow inside the network segment 1. Similarly, the data packets sent by host X on network segment 2 to host Y will not be forwarded to network segment 1 by the bridge. It can be seen that the bridge can divide a collision domain into two. Among them, each collision domain shares its own bus channel bandwidth.




Understand the meaning of "bridge"
1. Some people liken "bridge" to a smart repeater (Repeater). Because the repeater only amplifies the received signal, and then directly sends it to the cable connected to another port, it is mainly used to extend the physical connection range of the network; and the bridge can not only extend the physical connection range of the network, but also Partition MAC addresses to isolate collisions between different physical network segments (ie, isolate "collision domains"). Hubs and repeaters are physical layer devices, while bridges are layer 2 devices.
2. The device interconnected at the data link layer is a bridge, which plays the role of data reception, address filtering and data forwarding in the network interconnection, and is used to realize data exchange between multiple network systems.


Switch (Switch)
1. Works at the data link layer
2. When a port receives information, the switch will remember the port's MAC address to the MAC address mapping table to facilitate subsequent data forwarding.
3. When forwarding, check the MAC address mapping table first. If there is, forward it to this port. If not, forward it to all ports (called flooding). When the port replies, it can be updated to the MAC address mapping table.
4. Broadcast frames and multicast frames are forwarded to all ports.


The difference between a bridge and a switch
1. Both use the MAC address mapping table for directional forwarding.
2. The bridge has two ports and the switch has multiple ports.


Router
1. Works at the network layer and forwards information based on the IP address mapping table (routing table).
2. Check the routing table with the target address to get the next hop IP address, and then forward the information to the next route until it reaches the target IP device.


Gateway
1. Sending information from one network to another must also pass through a "gateway", which is the gateway. As the name suggests, a gateway is a "gateway" that connects one network to another.
2. A gateway is essentially an IP address from one network to other networks. For example, there are network A and network B, the IP address range of network A is "192.168.1.1~192.168.1.254", the subnet mask is 255.255.255.0; the IP address range of network B is "192.168.2.1~192.168. 2.254” and the subnet mask is 255.255.255.0. In the absence of a router, TCP/IP communication cannot be performed between two networks. Even if the two networks are connected to the same switch (or hub), the TCP/IP protocol will be based on the subnet mask (255.255 .255.0) determines that the hosts in the two networks are in different networks. To realize the communication between these two networks, it must go through the gateway. If the host in network A finds that the destination host of the data packet is not in the local network, it forwards the data packet to its own gateway, and then the gateway forwards it to the gateway of network B, and the gateway of network B forwards it to a certain gateway of network B. host (as shown in the attached image). The process of forwarding data packets from network B to network A.
3. What is the default gateway of the router 192.168.1.1



reference (on which layer the network card, bridge, and router work): http://blog.csdn.net/firefly_2002/article/details/8187527
Reference (bridge and its working principle ) ): http://book.51cto.com/art/201302/382046.htm
Reference (collision domain, collision, broadcast domain, broadcast): http://wenku.baidu.com/link?url=B4PTgXIpYcpMG2T267kRqf_0wBzPVYc3FvQwzCNXxfH6iq4xfYW6W9Rcvgc-ljsw40G- U58oXydbn9wl2ew0gZ8OVav_HUS4lp76CoThPXK
reference (how the switch works): https://zhidao.baidu.com/question/206227403.html
Reference (the working principle of the bridge): http://book.51cto.com/art/201409/450861.htm
Reference (the working principle of the router): http:/ /www.elecfans.com/article/84/149/2009/2009060967559.html
Reference (Gateway and Gateway Function): http://www.360doc.com/content/14/0630/14/7821691_390973358.shtml
Reference (VMware Network connection mode - detailed introduction and difference between bridge, NAT and host-only mode): http://www.cnblogs.com/xuan52rock/p/5295069.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326868815&siteId=291194637