Repeater and Switch - Communication and Distributed Systems
Repeater and Switch
Adrian Lienhard, Lukas Renggli, Stefan Reichhart
1 / 11
Table of Contents
2 / 11
The following paragraphs of this document should give an impression of what repeaters, hubs and switches are, explain their functionality and features as well as show differences and things in common. Beside that, advantages and disadvantages of the certain technologies are shown and how, why and where you should use these technologies in practice. Aspects like the
OSI/ISO-Reference-model, TCP/IP, international standard and physical hardware are broached.
First of all this document should give you an overview about packets and MAC addresses, followed by extensive descriptions and examples about repeaters and switches. At the end there is a short summary and a sheet of questions to test yourself if you have understood everything.
Structure of packets and MAC Address
A Packet consists of five basic parts beginning with a leading 8 byte preamble as a start delimiter: The first three parts are reserved for the “MAC information” which is linked to the
Datalink-Layer of the OSI/ISO-Model. The forth part is interpreted by the Network-layer and consists of “IP information”. At the end, there is a CRC that belongs to the “MAC information” to ensure the correctness of a packet.
Packet Data CRC
Frame Header / SDU
Frame Data / PDU
The “MAC information” itself consists of four parts. The first one has a size of 6 bytes and is called “MAC Destination-address”. It can be of type unicast, multicast or broadcast. The second one is the “MAC Source-address” and consists of 6 bytes. The third part decides of which
“Length” (IEEE 802.3) or “Type” (Ethernet) the containing packet (Packet Data) is. This part is also called SAP (Service Access Point) and needs 2 bytes. The last part, the CRC, encapsulates the “IP Information” and provides a checksum of the frame.
A repeater is a signal generator, regenerator (digital or analogue) and amplifier that provides two ports which can be connected with standard BNC technology (means: coaxial cabling). It realizes (broadcasted) forwarding of data respectively packets from one port to another and regenerates or amplifies them if they're faded. While analogue repeaters can almost only amplify signals, digital repeaters can also reconstruct the signal to near its original quality.
Simultaneously they are filtering electrically invalid signals to guarantee the security and stability of the net and to avoid unnecessary stress.
3 / 11
Nevertheless, repeaters do forward invalid or damaged data as they do not have any capability to ensure their correctness. It is the same with packet collisions. These have to be solved by the end-user systems. So, repeaters act as an only-forwarding medium for data. As a result of this, it has a very short latency time.
Repeaters divide the network in two parts or segments. Each segment can be a computer or a network of computers. The topology of the entire network is a bus topology which always addresses to the “weakest” participant. Important is that both segments do have identical qualities or characteristics (as a result of a bus topology). They have both the same bandwidth, security level, topology, etc.
Example: segment A has a maximum bandwidth of 100Mbit/s, segment B only 10Mbit/s. The resulting maximum bandwidth of the network is 10Mbit/s. Both segments have the same characteristics. So, using a repeater does not increase the network's bandwidth or capacity.
As both segments have the same characteristics, it is not possible to connect different or incompatible networks. To realize this it is necessary to plug in a media-converter.
An important characteristic that has to be mentioned explicitly is that a repeater forward any incoming packets to all ports respectively segments. This results of the bus topology that repeaters cause. The whole network consisting of subnets act in the same way and can actually be seen as just one big segment.
Repeaters are assigned to the first layer of the OSI/ISO-Model. It is totally “invisible” for the user. As it is on the bottom of the layer model, it is only seen as a primitive physical transport medium. Extended versions provide further functionalities like multiple ports (e.g. hubs, see section below), multiple protocols and standards and higher layer interpretation (e.g. bridges and switches, switches are explained in a later section of this document).
Standards and common implementations
The general functionality of repeaters are quite restricted and depend mostly on international standards like “Ethernet IEEE802.3”. It defines all the variations of Ethernet and their characteristics. Therefore, there are fixed rules that describe the maximum size of a segment and the whole network, the maximum amount of repeaters within a network, distance between repeaters (inter-repeater-link), bandwidth, etc. When building up a network it is important to know which standards a repeater supports as repeaters do not automatically cope with other standards.
Actually there are three main branches of repeaters. The first one belongs to the rather old “Ethernet” standard (10Mbit/s), the second one is called “Fast-Ethernet” (100-200Mbit/s) which is itself branched into Class I (max. 1 repeater/net) and Class II (more than 1 repeater, but max. amount is restricted depending on network topology) and the last one is the “Gigabit
Ethernet” (1000Mbit/s). Main differences between these branches are bandwidth, maximum
To read more about these standards and their characteristics contact the "IEEE802.3 Reference Guide" that can be found on the Internet.
4 / 11
A special kind of a repeater is the “Multiport-Repeater”. Colloquially, it is almost always described as hub or common hub. However the term “hub” is in literature also used for other network devices or objects such as switches, routers, bridges, airport-hubs and so on. In the following sections we use the term “hub” or common hub instead of “Multiport-Repeater” but meaning “Multiport-Repeater”.
Hubs do have a lot in common with repeaters. They have the same characteristics and functionalities, but hubs do normally have more than just two ports. Normally they have multiple ports (this is why it was originally called “Multiport-Repeater”) and are able to connect to other hubs (using an uplink-port) and to a number of hosts (using a downlink-port). So it is still a broadcast device sharing the same network topology and performance in any segment and sub-segment.
The only difference of a repeater and a hub is that a hub is normally connected with
Twisted-Pair which increases bandwidth, guarantees security of disturbance and allows a more reliable topology (broadcast star). Moreover, primitive collision domains are integrated to handle collisions to relieve the network of useless packets. All that makes this extended technology more reliable, faster but also more expensive.
However, as a repeater does divide the network only in two parts, both having the same characteristics, it is quite the same with hubs. All its ports act like one segment, called “Shared
Segment”. Therefore, it is neither possible to increase the network's performance with a hub.
On the other hand it is possible to enlarge the network by connecting a hub to another one.
more common “Micro Hub”.
Today it is common to enhance the standard functionalities of hubs to make them more powerful. Hardware producer provide them with additional features to fit today's needs. Thus it is not rarely seen that hubs already have functionalities of bridges and other devices. Such creations are known as “hermaphrodites”. The following section describes some commonly and widely used ones
Common Multiport-Repeater implementations
Bridging Hub: This is a hub with the functionality of a bridge. It makes the hub possible to connect segments of different types of cabling (BNC and TP) as well as some other features that bridges provide, e.g.: full-duplex traffic, data transfer within independent segments without stressing the rest of the network, Osi/ISO Layer two protocol interpretation, etc.
The „x“ reflects the amount of stacked/used repeaters respect. hubs
5 / 11
Switching Hub: This kind of reads the destination address of a packet and forwards it to the correct port. This is very similar to switches (see next section), but the packet itself is
(theoretically) still transmitted in broadcast-mode, but only within the right subnet/segment
(not over the whole network). Normally hardware producer implement a non-broadcast solution supporting Fast-Ethernet which results finally in a switch.
Backbone-Hub: All hubs are connected with a very fast 10base2 connection that can span long distances. This connection acts as a “Repeater-Interlink”. Hubs are separated, spread over a large area. Each Hub acts as a standard repeater.
Cascaded-Hub: The opposite of the backbone version. These hubs are concentrated in a very small area, stacked together to a tower of hubs. As a result of very short and therefore very fast Repeater-Interlinks it is necessary to provide long-distance cabling to host machines.
This variant could be a cheaper solution as Hub-Host connections are normally cheaper as Hub-
Hub connections (more expensive hardware).
A switch is a kind of a hub but belongs to the second respectively third layer of the
OSI/ISO-Model, depending on its functionality. As it is not only restricted on the physical layer, it can connect networks of different topologies (bus, star, token-ring, ...) and physical characteristics (cabling). So it can connect networks with a different physical or datalink protocol (e.g. different bandwidths). This makes it “protocol-transparent”. Nevertheless the protocols above its own have to be identical. That means that a switch does not support connections of basically incompatible networks or networks with different higher layer protocols
(network, transport, session, presentation, application).
A switch – like a normal hub - does have multiple ports. But differently from a hub, a switch initializes peer-to-peer connections between segments. Beside that it is able to hold multiple connections between several segments at the same time. Depending on the hardware and its quality it can hold parallel and/or crossed connections.
Example: engaging connections between segment A and B, C and D,
A and D, etc.
Circuit Switches & CPU
This leads to a multitude of independent network segments, each segment represented by a port and having its own characteristic (e.g. bandwidth, topology). As a result, each network segment is able to use its own full network-bandwidth, but also the full bandwidth of the entire network. Therefore it is possible to increase the performance of the network-segments, but also of the entire network. This makes a switch very powerful and ideal to increase network performance.
Example: a packet within network segment A (10Mbit/s) is sent to segment B (100Mbit/s). Within the segment A the packet is transmit-
6 / 11
ted with the maximum bandwidth of 10Mbit/s, but as soon as it is switched to segment B it will be transmitted with 100mbit/s.
As switches initializes peer-to-peer connections to forward packages it is not anymore necessary to divide the network into several domains of collisions. Nevertheless, switches do provide them. Each port represents one domain and is responsible for its own segment. Therefore, a switch does prevent collisions within its segments, but also in the entire network as it does not forward them. That increases the network performance and ensures an intelligent data traffic.
The most important quality of a switched network is that a switch does inspect and validate each packet for its MAC address (Medium Access Control) and forwards the packet to the right destination. Should it happen that the destination address within the MAC information is missing, or the switch does not already know the receiver, it will forward it as a standard broadcast packet (like hubs). This situation is rather an exception because switches do scan the entire network and store any node's address as soon as they are connected to a network. This process normally takes only a few seconds, but depends on the size of the network.
In general, switches are a very common instrument to increase performance. As a switch
in the right place of the network and build up a switch-adapted network-topology. So, it is important to guarantee evenly distributed data to each switch within the network, but also to any ports (reducing latency-time). That should prevent “bottle-necks” within the entire network.
Differently from a hub, switches have a much more complex hardware. Holding multiple peer-to-peer connections and validating MAC-addresses does need a lot of hardware effort to prevent slow network performance. Therefore switches almost always provide their own CPU, memory and sometimes caches for each port.
Depending on the hardware producer switches do also have some more or different features than the ones explained here. The following variants of switches are commonly used.
Common switch implementations
Cut-Through/On-the-Fly/Fast-Forward: A switch of this type has a very short latency time. This is possible because this kind of switch does only check the first 6 bytes of a packet and forwards data even before the whole packed arrived. Therefore, it can happen that an invalid and/or damaged packet is sent through the network. It could also happen that a packet is sent into a wrong network segment. This kind of switch is only used in small networks
(only a few nodes) having heavy traffic.
Store-and-Forward: This category of switches stores the entire packet into its cache.
Then it validates the whole MAC information and tests if the data is correct and valid. If the packet passes the tests it is forwarded, otherwise it will be deleted and eventually requested again. Although all this produces high latency time, network performance can still be increased, as there are only valid packets within the network which reduces the amount of open connections and data transfer and makes it possible to hold only “valid” connections. Collision-domains are therefore not necessary. Still, switches of this type need very powerful hardware. This type is today the most commonly used variant for big networks with many nodes.
Intelligent: This is a mixture of Cut-Through and Store-and-Forward, but the switch is monitoring the amount of error traffic and changing the current forwarding technique when necessary.
Switches are often called "Multiple-Port-Bridge" as hardware producer provide them with the same characteristics. But actually they're not the same kind of device. Bridges are normally more complex devices (internal statistics, able to "learn", ...) and fulfil many extra tasks…
7 / 11
Cascaded-Switch: Switches can be cascaded as well as repeaters and hubs. The only difference is that links between switches are faster totally free of collisions and often provide full-duplex mode.
L3-Switch: In contrast to normal switches this one is interpreting protocols in layer 3.
So it combines switching and scalable routing. Concerning the actually needed performance and quality it can switch the interpretation-mode (Layer 2 or 3).
Mixture: There is also a mixture of the switches above. Modern devices are able to handle various operation modes and can be configured to use a certain mode or they are provided with the capability to switch the modes automatically to guarantee the optimal network performance at any time.
Nowadays it is quite complicated to keep an overall view over network devices. Hardware producer supply their devices with all kind of extras, special features or customer-specific functionality so that it is not really possible to assign them either to the family of repeaters, switches or other kinds of devices not explained in this document. Moreover, most of the definitions or terms are synonymously used (e.g. hub, switch, repeater, bridge). Therefore, it happens quite often that devices are marked as a Fast-Ethernet hub although it has all characteristics of a switch and so on. Constant technology evolution makes it contribution, too – the worldwide need of simple, fast end efficient network structures (having and managing one device is easier than having a couple of cascaded ones) let technologies/devices merge into each other so that a strict separation is not easy to accomplish or not even possible.
8 / 11
Question 1: Network configuration: Network
N consists of two repeaters. They support a maximum bandwidth of 10Mbit/s. A Switch
S having 4 ports is operating with 100Mbit/s and full-duplex and is connecting the repeaters. What kind of topology does
None of the given suggestions
Question 2: Same network
N of the question above. What is the theoretical maximum bandwidth that can be realized?
None of the given bandwidths can be reached
Question 3: Imagine that network
N of the questions above would have switches instead of repeaters. All of them would have the same characteristics from the one existing.
Which statements are valid?
This configuration can never reach the performance than the configuration of question one
The bandwidth in any segment and connection is 200Mbit/s
10 end-user systems can be connected to this network
Maximum bandwidth between two end-users is not determined as it also depends of the end-user's NIC
The maximum amount of concurrent open connections is: 2·4!+2
Question 4: Network devices support one or more standards of the IEEE802.3. Which of the following combinations are possible?
Repeater with Ethernet, Fast Ethernet and Gigabit Ethernet
Switch with Ethernet, Fast Ethernet, but no Gigabit Ethernet
There are no restrictions on combinations as long as the standard is implemented correctly
All possible combination are listed in the “IEEE802.3 Technical Guide”. Other combinations are not possible due technical reasons.
9 / 11
Question 5: Repeaters or hubs support layer one interpretation of packets. Are there repeaters that support higher layer interpretation?
No as only switches or higher devices support that
Yes, this could be realized by a switch or bridging hub as they both belong to the family of repeaters.
Each hardware producer can provide its devices functionalities it wants.
Yes, but normally, you wouldn't call such a device a repeater any more.
Question 6: How many ports can a Switch of n ports connect to each other? n!
2 n even: n/2; n odd: (n-1)/2
This depends of the hardware implementation.
Question 7: Have a look at the following statements and check the one that are correct:
Imagine a net consisting of n repeaters. You can always enlarge the net by adding another repeater n+1.
The size of a switched net is not restricted.
A switch is a hub.
A hub is a switch.
10 / 11
Answers to the Multiple-Choice Questions
Answer 1: Star/Bus; The switch creates a star topology while the two repeaters that are connected to the switch do induce a bus on their sub-segment.
Answer 2: 200Mbit/s; In the sub-segments of the two repeaters there is each a maximum of 10Mbit/s possible. But as the switch provides 4 ports it is theoretically possible that two end-user systems connected to these ports and supporting full-duplex mode can use a bandwidth of 200Mbit/s, but only under each other. Connections to or from one of the repeater-subsegments is restricted to 10Mbit/s. A switch is a network device that negotiates the maximum bandwidth with its connected devices.
Answer 3: Question three is correct; Although a 100Mbit/s full-duplex switched net supports 200Mbit/s, any connections always orient by the “weakest” network device. In this example this could be an end-users NIC that supports a maximum of 10Mbit/s. NICs that support
200Mbit/s can theoretically engage connection on 200Mbit/s to each other.
Answer 4: Question three is correct; There is no restriction on implementations except that they should be correct and work fine with devices of the same standards.
Answer 5: 2, 3, 4 are correct; Any hub in general, means multiport repeater, switches, bridges, routers have the functionality of repeaters – they forward data. Besides, they have a lot of additional features implemented. But most of these are interpreted on higher layers, e.g. routing on layer 3 or switching on layer 2. Therefore it is possible to realize such devices, but you wouldn’t call them repeaters as their functionality is beyond the common definition.
Answer 6: Question 5 is correct: This depends on the complexity of the hardware or software implementation. Note that more than comb( n, 2) connections by full-duplex mode are useless as you cannot hold more than one connection to the same device to the same direction.
Answer 7: Question 3 is correct: A switch is a hub as a “hub” is not a special kind of network device and doesn’t even need to have something to do with networks. Bridges, routers and repeaters are also hubs. Wise versa is therefore incorrect as not every hub is a switch, e.g. airport hub. The size of a repeater network and the amount of used repeaters within such a network depends of the implemented standard and is physically restricted. The same for switches, but these nets can already be quite large.
11 / 11
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project