To understand the difference between routers and switches, routers, first of all understand what is and what is the switch, which undoubtedly has very important significance.
Router is the Internet's main node device. Router, forwarding data through the routing decision. Forwarding strategy is called routing (routing), which is the origin of the name of the router (router, forwarding those). Interconnection between different networks as a hub, router system configuration based on the TCP / IP, the main body of the international Internet interconnection context, it can be said that constitute the Internet's backbone routers. Its processing speed is one of the main bottlenecks of network communication, it will directly affect the reliability of the quality of interconnection. Therefore, in the park, regional networks, and the whole area of Internet research, always at the core router technology, its historical development and direction, as a microcosm of the entire Internet research. In the current information on our network infrastructure and construction comes to an interconnected network of routers in the role, status and development direction of network technology for domestic research, network building, and clear the market for network routers and network interconnection The concept of a variety of plausible, are of great significance.
The switch is based on MAC address recognition, to complete the package and forward packet network device functions. Switch can "learn" MAC address, and to store it in the internal address table, the data frame through the origin and objectives of the temporary exchange between the receiver path, the data frame directly from the source address to destination address.
So, what routers and switches What has the difference? Specifically, divided into the following four parts:
1, two 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, both based on the object, according to different forwarding
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 switch can split the traditional domain of conflict can not be split broadcast domains; the router can broadcast domain segmentation
Segments connected by a 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 would be assigned to a different broadcast domain, broadcast data does 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, the router provides a firewall service, but there is no switch
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.
In summary, the switch is typically used for LAN-WAN connection, switch attributable 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 good control router functions, it can be widely used.