The difference between routers and switches

Source: Internet
Author: User
Tags error handling switches
Computer networks are often connected by a number of different types of network interconnections. If several computer networks are physically connected and cannot communicate with each other, then this "interconnection" has little practical meaning. As a result, when it comes to "interconnection", it has been suggested that these interconnected computers are capable of communicating, that is to say, functionally and logically, these computer networks have already formed a large computer network, or Internet, or, for the short term, a network, an interconnection.

Connecting networks to each other uses intermediate devices (or intermediate systems), and ISO terminology is called a relay (relay) system. Depending on the level of the relay system, you can have the following five relay systems:

1. The physical layer (i.e. the first layer, the L1) relay system, i.e. the transponder (repeater).

2. Data link layer (i.e. second layer, layer L2), namely bridge or bridge.

3. Network layer (third layer, layer L3) relay system, that is, router (router).

4. Network bridge and Router mixture Bridge (brouter) has the function of Network bridge and router.

5. In the network layer above the relay system, that is, gateways (Gateway).

When a relay system is a forwarder, it is generally not called a network interconnect, because it is simply a network extension, and this is still a network. High-level gateways are less used because they are more complex. Therefore, the general discussion of network interconnection refers to the use of switches and routers to interconnect the network. This paper mainly expounds the switches and routers and their differences.

2 Switches and routers

"Exchange" is the most frequent word in the network today, from bridging to ATM to the telephone system, no matter what the situation can be applied, do not know exactly what is the real exchange. In fact, the exchange of the word first appeared in the telephone system, in particular, to achieve two different telephones between the voice signal exchange, the completion of the work of the equipment is the telephone exchange. So from the original point of view, Exchange is only a technical concept, that is, to complete the signal from the entrance to the export of equipment forwarding. As a result, all devices that are compatible with that definition can be referred to as switching devices. Thus, "Exchange" is a word with a wide meaning, when it is used to describe the device in the second layer of the data network, it actually refers to a bridging device, and when it is used to describe the device on the third layer of the data network, it refers to a routing device.

The Ethernet switch that we often talk about is actually a multi port second layer network device based on the bridge technology, which provides a low delay and low overhead channel for the forwarding of data frames from one port to another.

Thus, there should be an exchange matrix within the core of the switch, providing a path for communication between any two ends of the port, or a fast switching bus so that data frames received by any port are sent from other ports. In the actual equipment, the function of the Exchange matrix is usually done by a special chip (ASIC). In addition, Ethernet switches have an important assumption in the design mindset that the switching core is so fast that the usual large flow data does not cause congestion, in other words, the ability to exchange is infinitely larger than the amount of information being transmitted (in contrast, the ATM switch is designed with the idea that The ability to exchange is considered to be limited relative to the amount of information transmitted.

While the second tier Ethernet switch is based on a multiport bridge, Exchange has a richer feature that makes it not the best way to get more bandwidth but also makes the network more manageable.
The router is a packet switching device (or network layer relay device) in the network layer of the OSI protocol model, and the basic function of the router is to transfer the data (IP packets) to the correct network, including:

1.IP datagram forwarding, including the search and transmission of the datagram;

2. Subnet isolation, suppression of broadcast storms;

3. Maintenance of the road by the table, and with other routers to exchange routing information, which is the basis of IP message forwarding.

Error handling of 4.IP datagram and simple congestion control;

5. The implementation of the IP datagram filtering and accounting.

For different scale networks, the role of routers is different.

In the backbone network, the main role of routers is routing. Routers on the backbone network must know the path to all the underlying networks. This requires maintaining a large routing table and responding as quickly as possible to changes in the state of the connection. The failure of a router can cause serious information transfer problems.

In the regional network, the main function of the router is network connection and routing, that is to connect the lower level of the basic network units-Park network, while responsible for the data forwarding between the lower network.

Within the campus network, the main role of routers is to separate subnets. The early interconnection grassroots unit is the local area network (LAN) where all the hosts are in the same logical network. With the expansion of the network scale, the LAN evolved into a network of multiple subnets connected by high-speed backbone and router. In this, the subnets are logically independent, and routers are the only devices that can separate them, which are responsible for message forwarding and broadcast isolation between subnets, and routers on the border are responsible for connecting to the upper network.

3 The difference between the second layer switch and the router

The traditional switch is developed from the Network Bridge, which belongs to the OSI second layer, the data link layer equipment. It is based on the MAC address, select routing through the station table, the establishment and maintenance of the station table is automatically carried out by the switch. The router belongs to the OSI third layer, the network layer device, which is addressed according to the IP address and is generated by routing protocol. The biggest advantage of the switch is fast, because the switch only needs to identify the MAC address in the frame, directly based on the MAC address to generate a selection of the algorithm is simple, easy ASIC implementation, so the forwarding speed is very high. But the working mechanism of the switch also poses some problems.

1. Loop: According to the switch address learning and station table building algorithm, the switch does not allow the existence of circuit. Once the loop is present, a spanning tree algorithm must be started to block out the ports that generate the loop. Router routing protocol does not have this problem, routers can have more than one path to balance the load, improve reliability.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.