Connection and difference between routers, hubs, gateways, and bridges

Source: Internet
Author: User

Router: devices connected to different IP address subnets are responsible for routing and forwarding, and work at the OSI network layer.

Bridge: connects different subnets for transparent communication, works at the data link layer, and parses data frames. The disadvantage is that the "broadcast storm" cannot be avoided ".

Gateway: A translator that works at the application layer and works between different subnets to repackage the received information.

========================================================== ==================================

Hub:
The basic function of a hub is information distribution, which distributes all signals received by a port to all ports. Some hubs regenerate weak signals before distribution, and some hubs sort the signal timing to provide synchronous data communication between all ports.

Vro:
As the name suggests, a router is a router device. Routing refers to the activity of moving information from the source location to the target location through a interconnected network. The router determines data forwarding through routing. The forwarding policy is called routing. This is also the origin of the router name (router, forwarder ).

Bridge:
1. A bridge, also known as a bridge, is a storage and forwarding device that connects two local networks. It can be used to connect a network system with the same or similar architecture.

2. Functions of the bridge: 1) the bridge only packs a small amount of received information frames without any modification.
2) The bridge can use another protocol to forward information.
3) The bridge has enough buffer space to meet the requirements during peak periods.
4) bridges must have addressing and Path Selection capabilities. 4. vro1 1. vrouters are connected at the network layer, that is, different networks

The connection to the network.
2. path selection is the main task of a vro. Path selection includes two basic activities: first, determining the optimal path, and second, transferring information packets between networks.

 

Differences between routers and bridges:

1) The vroNetwork LayerProvides connection services. vro-connected networks can use completely different protocols on the data link layer and the physical layer. A Router service is usually explicitly requested by the end user device. It only processes packets that are requested by other end user devices.
2) Another important difference between a router and a bridge is that the router understands the entire network, maintains the topology of the interconnected network, and understands the network status. Therefore, the most effective path can be used to send packets.

Gateway: 1. The Gateway (Protocol converter) operates in the interconnected networkOSI network layerThe Gateway has a protocol conversion facility. Therefore, it is called a facility because the gateway is not necessarily a device and may implement the gateway function in a host.
Gateways are used for heterogeneous network interconnection in the following scenarios:
1). LAN with different configurations, such as interconnected private exchange network PBX and lan that complies with the IEEE802 standard.
2) interconnection between LAN and WAN.
3) interconnection between Wan and wan.
4). Lan and host Interconnection (when the host's operating system is incompatible with the network operating system, you can connect through the gateway ).

3. Gateway Classification

1) Protocol Gateway: Protocol Gateway generally performs protocol conversion between network regions using different protocols.
2) Application Gateway: application gateway is a system that translates data between different data formats.
3) Security Gateway: Security Gateway integrates various technologies and plays an important and unique protection role. Its scope ranges from protocol-level filtering to extremely complex application-level filtering.

Supplement:

HubNo storage forwarding function, yesPhysical LayerDevice,
VswitchStorage and forwardingLink LayerDevice and layer-3 Switch with routing function
Vrouters connect networks of different network segments or different media, such as Ethernet, optical fiber network, and dial-up network. A computer can be configured with several NICs as vrowinwin2000.
GatewayIs the egress address of a LAN. The gateway address is usually the address configured on the router,
BridgeIt is a special usage. It can be used to separate large networks as if they are used to isolate broadcast or something.

A computer network is often composed of many different types of network connections. If the networks of several computers are physically connected together and cannot communicate with each other, there is no actual connection.
Meaning. Therefore, when talking about "interconnection", it is suggested that these computers can communicate with each other. That is to say, in terms of functions and logic, these computer networks have formed a large
Computer Networks, or interconnected networks, can also be referred to as the Internet or Internet.
Some intermediate devices (or intermediate systems) are used to connect networks. ISO is calledRelay system. Based on the level of the relay system, there can be the following five relay systems:

1. Physical Layer (that is, the first layer and layer L1) relay system, that isForwarder(Repeater ).

2. data link layer (Layer 2, layer l2), that isBridge or bridge(BRIDGE ).

3. The network layer (Layer 3, layer l3) relay system, that isVro(Router ).

4. A mixture of bridges and routers. brouter has the functions of bridges and routers.

5. A relay system above the network layer, that isGateway(GATEWAY ).

When the relay system is a forwarder, it is generally not called network interconnection, because it only expands a network, and it is still a network. High-level gateways are rarely used due to their complexity. Therefore, we generally discussNetwork InterconnectionIt refers to the network in which vswitches and vrouters are interconnected.. This article describes the differences between vswitches and vrouters.

Ii. vswitches and vrouters


"Exchange" is the most frequently used word on the network today. It can be applied on any occasions from the bridge to the ATM to the telephone system. It is hard to figure out what is the real exchange. In fact, Exchange 1
The term first appeared in the telephone system, specifically to achieve the exchange of voice signals between two different telephones. The device that completes the work is the telephone switch. So in terms of intention,Exchange is just a technical concept.
Number is forwarded from the device entry to the exit.Therefore, any device that complies with this definition can be called an exchange device. As you can see,"Exchange" is a widely used word. When it is used to describe the data network
A layer 2 device actually refers toBridging DeviceWhen it is used to describe the third-layer device of the data network, it refers toRouting device.
What we often talk aboutEthernet SwitchA bridge-based multi-port L2 network device provides low-latency, low-Overhead Communication for data frame forwarding from one port to another.
Path.

It can be seen that the switch should have a coreSwitching MatrixTo provide a path for communication between any two ports, or a fast exchange bus, so that any port can receive
Data frames are sent from other ports. In actual devices, the function of the switching matrix is usually completed by a dedicated chip (ASIC. In addition, there is an important assumption in the design philosophy of the Ethernet switch, that is, the switch Core
The speed is very fast, so that normal large-volume data will not cause congestion. In other words, the exchange capability is infinitely larger than the transmitted information (on the contrary, the design of the ATM switch is, think
The ability to change is limited compared to the amount of information transmitted ).
Although the second layer Ethernet switch is developed based on a multi-port bridge, after all, the switch has more features, making it the best way to get more bandwidth, it also makes the network easier to manage.

The router is based on the OSI protocol model.Network LayerThe basic function of a vro is to transmit data (IP packets) to the correct network, including:

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

2. subnet isolation to prevent broadcast storms;

3. Maintain the route table and exchange route information with other routers. This is the basis for IP packet forwarding.

4. IP datagram error handling and simple congestion control;

5. Filtering and accounting of IP datagram.

Vrouters of different scales have different roles.

InBackbone NetworkThe main role of a router is routing. The router on the backbone network must know the path to all the lower-Layer Networks. This requires maintaining a large route table and responding to connection status changes as quickly as possible. A Router failure may cause serious information transmission problems.


InRegional NetworkThe main role of a vro is network connection and route selection, that is, to connect the Grass-roots network units in the lower layer-the campus network, and to forward data between the lower-Layer Networks.
Inside the campus network, the main role of a router isSeparate subnets. In the early days, the basic unit of the Internet connection was lan, where all hosts were in the same logical network. As the network scale continues to expand
The Area Network evolved into a campus network composed of multiple subnets connected to the high-speed trunk and router. The subnet is logically independent, and the router is the only device that can separate them. It is responsible for packet forwarding between subnets.
Communication and broadcasting are isolated. vrouters on the border are responsible for connecting to the upper-layer network.

Iii. Differences Between Layer 2 vswitches and vrouters

Traditional switches develop from bridges
The second layer of OSIData Link LayerDevice. It is addressing according to the MAC address, throughSite tableSelect a route. The vswitch automatically establishes and maintains the site table. The router belongs to the Layer 3 of OSI.Network Layer
Device, which is generated through the route table routing protocol based on the IP address. The biggest advantage of a vswitch is that it is fast. Because the vswitch only needs to identify the MAC address in the frame, it directly selects the forwarding end based on the MAC address.
PortAlgorithmIt is simple and easy to implement ASIC, so the forwarding speed is extremely high. However, the working mechanism of vswitches also brings about some problems.
1. Loop: Based on the vswitch address learning algorithm and the station table, no loop is allowed between vswitches. Once a loop exists, the Spanning Tree Algorithm must be enabled to block the ports that generate the loop. Router routing
The Protocol does not have this problem. There are multiple channels between routers to balance the load and improve reliability.
2. Load aggregation: only one channel is available between switches, so that information is concentrated on one communication link and cannot be dynamically allocated to balance the load. The router routing protocol algorithm can avoid this problem.
The OSPF routing protocol algorithm can not only generate multiple routes, but also select different optimal routes for different network applications.

3.Broadcast Control: The vswitch can only narrow down the conflicted domain, but not the broadcast domain. The entire exchange network is a large broadcast domain, where broadcast packets are scattered across the entire exchange network. Vrouters can isolate broadcast domains, and broadcast packets cannot be broadcast through vrouters.


4. subnet division: The switch can only recognize MAC addresses. The MAC address is a physical address and uses a flat address structure. Therefore, you cannot divide subnets Based on the MAC address. Vro identifies IP addresses
The IP address is assigned by the network administrator. It is a logical IP address with a hierarchical structure and is divided into network and host numbers. It can be conveniently used to divide subnets. The main function of a router is to connect
Different networks.
5. Confidentiality: although the vswitch can filter Frames Based on the source MAC address, destination MAC address, and other frames, the vro filters the source IP address, destination IP address,
The TCP port address and other content are used to filter packets, making it more intuitive and convenient.

6. media-related: the switch can also be used as a bridge device to convert between the link layer and the physical layer,
This type of conversion process is complicated and is not suitable for ASIC implementation. It is bound to reduce the forwarding speed of the switch. Therefore, currently, vswitches primarily Interconnect Networks with the same or similar physical media and link protocols, instead
Connect networks with very different link layer protocols. Different routers are used for interconnection between different networks, so they can connect networks with different physical media, link layer protocols, and network layer protocols.
Although a vro has a functional advantage, it is expensive and has a low packet forwarding speed. In recent years, vswitches have made many improvements to improve performance. The most prominent improvement isVirtual NetworkAndLayer-3 Switching.


Dividing subnets can narrow the broadcast domain and reduce the impact of broadcast storms on the network. Each vro interface is connected to a subnet. broadcast packets cannot be broadcast by the vro. subnets connected to different vro interfaces are not
Same as subnet, subnet ranges are physically divided by vrouters. For a vswitch, each port corresponds to a CIDR block. Because the subnet consists of several CIDR blocks, you can logically divide subnets by combining vswitch ports. Broadcast
You can only broadcast in the subnet and cannot spread to another subnet. You can control the broadcast by rationally dividing the logical subnet. Because the logical subnet is composed of any vswitch port and has no physical correlation, it is called
IsVirtual subnet, or virtual network. The virtual network technology eliminates the need for routers to isolate broadcast packets, and the virtual network INTRANET segment has nothing to do with its physical location. That is, the adjacent network segments can belong to different virtual networks, but are far apart.
The two CIDR blocks may belong to different virtual networks, while the two CIDR blocks that are far from each other may belong to the same virtual network. Terminals in different virtual networks cannot communicate with each other, enhancing access control over network data.
Vswitches and vrouters are the contradiction between performance and functions. The switch exchange speed is fast, but the control function is weak, the vro control performance is strong, but the packet forwarding speed is slow. The latest technology to resolve this conflict isLayer-3 Switching
It has the ability to forward packets at the vswitch line speed and has good control functions on the vro.

Iv. Differences between layer-3 vswitches and vrouters

Before the emergence of layer-3 switching technology, there was almost no need to distinguish routing devices from routers. They were exactly the same: Providing routing functions is working on routers. However, currently, layer-3 vswitches can fully perform most of the functions of traditional routers. As a device for network interconnection, layer-3 switches have the following features:

1. forward business flows based on layer-3 addresses;

2. full exchange of functions;

3. Special services such as packet filtering or authentication can be completed;

4. perform or not perform route processing.

Layer-3 vswitches have the following advantages over traditional vrouters:


1. transmission bandwidth between subnets can be arbitrarily allocated: each interface of a traditional router connects to a subnet, and the transmission rate of the subnet through the router is limited by the bandwidth of the interface. However, a layer-3 switch can have multiple
A port is defined as a virtual network. A virtual network composed of multiple ports is used as a virtual network interface. The information in the virtual network can be sent to a layer-3 Switch through a port that forms a virtual network. The number of ports can be specified arbitrarily, inter-subnet Transmission
There is no bandwidth limit.
2. reasonable configuration of Information Resources: As there is no difference between the resource rate in the access subnet and the resource rate in the access global network, it is of little significance to set the server group in the subnet.
Cost, more reasonable configuration of information resources.

3. Reduce costs:Generally, vswitches are used to form subnets and vrouters are used to interconnect subnets.Currently, a three-tier switch is used for network design. It can be divided into any virtual subnet, and inter-subnet communication can be completed through the three-tier routing function of the switch, which saves the cost of a router.

4. Flexible Connections between vswitches: As vswitches, no loops are allowed between them. As vrouters, there are multiple channels to improve reliability and balance load. Layer-3 SwitchSpanning Tree AlgorithmThe port that causes the loop to be blocked. However, when selecting a route, the blocked path is still used as an optional path for route selection.

V. Conclusion


To sum up,VswitchGenerally used for the LAN-WAN connection, the switch belongs to the bridge, is the data link layer equipment, some switches can also realize the third layer of the exchange.VroUsed between Wan-wan
It can resolve the forwarding group between different networks and act on the network layer. They only accept the input group from one line and then forward it to another line. These two lines may belong to different networks and
Use different protocols. In comparison, vro features more powerful than vswitches, but the speed is relatively slow and expensive. layer-3 vswitches have both the ability to forward packets at the wire speed of vswitches and the good control function of vrouters,
Therefore, it can be broadcast applications.

Add the upstairs

1. the hub works on the first layer and only supports signal regeneration.

2. Bridges and switches work on the second layer and work on physical addresses to solve CSMA/CD conflicts. bridges are based on software and currently are not used much. They only have one concept, A switch is a hardware-based bridge (ASIC ).

3. vrouters work on Layer 3 and rely on logical addresses to provide logical addressing to solve broadcast problems.

4. A gateway is a concept of Layer 3 or above. It is a general concept. For example, a router or a firewall can all be called a gateway. It is the egress of a network.

5,
According to your teacher's statement, he is too ignorant. His idea is still 20 years ago, and now lan has gradually broken through the regional restrictions, a lan with hundreds of thousands of machines is no longer fresh.
In a large LAN, if you use flat address management, no one will be willing to do network management. Therefore, you need to divide the management into small subnets, so what is the use of routing in connection between subnets? Not only
Routing is considered in the LAN, and a LAN switch with the routing function is available, which has practical application. Ask your teacher how to manage a LAN with 1000 machines ?!

Transferred from:

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.