Recently seen many people asking switches, hubs, routers, what is the function of how, what difference, I do the simple answer these questions.
First of all, that HUB, is the hub. Its role can be simply understood as the number of machines connected together to form a local area network. The switch (also known as switching hubs) and hubs much the same effect. But the two differ in performance: the hub share the bandwidth used by work type, and bandwidth of the switch is exclusive. So many in the machine or the data is large, the two will be obvious. Er router with more significant differences between the two, its role is to connect different network segment and find the data network, deliver the most appropriate of Lu Jing, Ke Yi, the normal situation is not under the individual user needs. After the switch router is to generate as produced in the hub after the switch, routers and switches, so there is a certain link is not completely independent of the two devices. Routers, switches can not be the main route to overcome the shortage of data packets transmitted.
In general, routers and switches, the main difference in the following areas:
(1) different levels of work
The initial switch is working in OSI / RM open architecture data link layer, which is the second layer, while routers start design work in the OSI model network layer. As the switch work in the second OSI layer (data link layer), so it works is simple, and the router work in the third OSI layer (network layer), can be more protocol information, router can make more intelligent forwarding decisions.
(2) data forwarding is based on different targets
Switch is to use physical address or MAC address to forward the data to determine the destination address. The router is using the ID number of different networks (ie IP address) to determine the data forwarding address. IP addresses are implemented in software, describes where the network equipment, sometimes also known as the address of the third layer protocol address or network address. MAC address is usually the hardware that comes from the card manufacturer to distribution and has been solidified to the card and going, in general, can not be changed. The IP address is usually automatically by the network administrator or system distribution.
(3) the traditional switch can split the domain of conflict can not be split broadcast domains; and routers can broadcast domain segmentation
Segments connected by the switch still belong to the same broadcast domain, broadcast data packets will switch to connect all the segments in the spread, in some cases lead to traffic congestion and security vulnerabilities. Connected to the router on the segment will be assigned to a different broadcast domain, broadcast data will not pass through the router. Although the third floor above the switch with VLAN capabilities can also be split broadcast domains, but the child can not communicate between broadcast domains exchange, the exchange between them still need a router.
(4) router provides a firewall service
Routers only forward packets that a particular address, do not send does not support the routing protocol packets and unknown target network packet transmission, which can prevent broadcast storms.
Switches are generally used for LAN-WAN connection, switch attributed to the bridge, is the data link layer device, and some switches can also be the third-level exchange. Router for the WAN-WAN connection between the opposite sex can be solved forward packets between networks, the role of the network layer. They only accept input from a line group, and then forwarded to another line. These two lines may belong to different networks and different protocols. In comparison, the functions of the router switch to a more powerful, but the speed is also relatively slow, expensive, third layer switch both packet switches, wire-speed forwarding capability, but also a good router control functions, so can be widely used.
At present more personal way to broadband access, ADSL, ADSL access, therefore I will explain to the simple. Now cats are generally purchased ADSL routing functions (many manufacturers in the factory when the routing screen will be, because most of the telecommunications installation, routing functionality is not enabled, enable DHCP. Open ADSL routing functions), if the Internet or a few individuals ADSL itself by a few units can, if you just one more computer to buy more of one or more hubs or switches. Considering now the price difference between hub and switch is very small, not a special reason, please buy a switch. Not to pursue high-value, because the product homogeneity is very serious now, I switch the cheapest there is no problem now. Give you a reference offer, I suggest you buy an 8-port, to meet the expanding needs of the general price 100 yuan. Connected to the switch, all computers and then switch on the line received. The remaining things to do all the machines only to network interface cable into the switch, the cat's network cable into uplink interfaces. Then set the routing function, DHCP, etc., can be shared online.
Readers should read the explanation above on switches, hubs, routers have some understanding of the current use primarily to switches, routers use a combination of mainly concrete composition according to the specific circumstances and needs of the network to determine.