The HARDWARE 2 course: server, network and communication

Hub, switch, routeur, ...
YBET Hardware Training   Contact

5. Network equipments for Ethernet

1. Hub (repeater) - 2. Ethernet switch - 3. Router - 4. Repeater - 5. Difference between a hub and a switch - 6. Passage of IP addresses to the MAC addresses - 7. Ethernet Connection

The chapter preceding allowed us to study the types of Ethernet networks. This chapter will analyze the operation of Ethernet concentrators in stars topologies (hub, switch, routers,...) in Base 10 T, 100 base T, gigahertz,... (not coaxial wiring that uses a topology online). The choice of the type of hub varies depending on the importance of the network, the location of the hub in the design and the inter-connection of networks. The Ethernet hub's are obsolete.

1. Eternet Hub (no longer available)

Hub are used in Ethernet bases 10 and bases 100. Hub is the simplest concentrator. It is practically only one repeater (it is its French name). It amplifies the signal to be able to transfer it towards all connected PC. All information arriving on the equipment is thus transmitted on all the lines. In the case of important networks by the number of connected PC or the importance of the flow of transferred information, one cannot use HUB. Indeed, as soon as a PC says something, everyone hears it and when each one starts to transmit, speeds decrease directly. The HUB are characterized by a number of connection: 4, 5, 8, 10, 16, 24...

According to the version and the model, they integrate some characteristics of connection specific to the equipment.

Hubs bases 10: numbers of ports RJ45 according to the model, port reverse (this one makes it possible to connect two Hubs between-them, avoiding the use of a cross cable RJ45), a connection coaxial. By connection, one finds a led announcing connection to a chart and a led of collision per channel or for the unit. The latter announces the state of the whole of connections.

Hubs bases 100: numbers of ports RJ45 according to the model, port reverse (this one makes it possible to connect two Hubs between-them), never of connection coaxial. By connection, one finds a LED announcing connection to a NIC (Network Interface Card) and a led of collision per channel or for the unit. The latter announces the state of the whole of connections. Moreover, for versions 10/100, one finds two LED for each channel (bases 10 and bases 100)

A last remark, according to the standard, the maximum number of HUB in cascade (connected port to port, by stackable types) is limited to 4 between 2 stations for the 10 base T and to 2 for the 100 base T. This is related on the maximum travel time of an ETHERNET signal before its disappearance and to the time of detection of the collisions on the cable. It could be that the collision is not detected in time and that the second transmitting station sends the message by thinking that the way is free. This does not exist for the switch "blind and forward" which record the screens before sending them and segment the network according to connections, avoiding these collisions.

2. Network switch.

2.1. Introduction

On receiving information, a switch decodes the header frame for do not send that to the port Ethernet combined, which reduces traffic on all network cabling from a HUB that returns data on all ports, reducing the bandwidth causing more than collisions. Each switch uses a table of correspondence address MAC - connection number and an IP address as you might think. Computers use a table of correspondence ARP, as we saw with the operating systems DOS ARP command which includes the MAC - IP match. Rest to see how it will work in practice.

Complicating... I propose a small vocabulary. An Ethernet port is one of the switch (a connector) communication ports. A TCP or UDP port is a number between 0 and 65535 that is specific depending on the application.

The switches work following models:

... but all use a MAC - Ethernet port match, 3 and 4 give so that opportunities for additional configurations. Moreover, these two types are managed (configurable).

In contrast to the hubs, the majority of the switches can use full duplex. The communication is two-way, doubling the maximum transfer rate. A Switch automatically checks if the connected device is compatible full or half duplex. This function is often included under the term "Auto-negotiation".

Current models are Auto MDI/MDIX. This means that the port will automatically detect the crossing of cables for the Ethernet connection. In the case of the HUB, a port equipped with a push button, takes over the function manually. You can still use crossed cables to connect hubs between them.

The switch used to reduce collisions on the network cabling. When a device wants to communicate, it sends a message on the wire. If another device is communicating already, two messages occur at the same time on the network causing a collision. The first resumed his message at the beginning and the second waiting to retry a few milliseconds later. There (in theory) no limitation of the number of switches cascading over a network.

2.2. Operation of a switch.

At starting, a switch will build a table of correspondence between addresses MAC and port connection number. This table is an internal memory storage of the switch. For example for D-link DSS-16+ (16 ports), it is of 8000 entries (stations). By against, for a model of lower range (D-Link OF the -1024D of 24 ports) it is also of 8000 entries, for the majority of the switches 5 ports, it varies from 512 to 1000 entries. This does not pose problems for a small network but well for large networks. In any event, the maximum number of connected PC is limited by the class of address IP used. When a new chart will be connected on one of its ports, it will adapt its table. The performances of the switch are thus tributary of the importance of this table.

Operation of a switchLet us see now what occurs when a PC (PC1) communicates towards another PC (PC2) connected on same the switch. The starting message including the TO address, the switch will find directly in its table the address of the PC2 and will redirect the message on the adequate port. Only the wiring of 2 ports (PC1 and PC2) will be to use. Other PC will be able to communicate at the same time on the other ports.

Now let us see the case or the network uses 2 switch. The PC1 sends the message with the TO address on the switch1 on which it is connected. The switch will check in its table if the TO address is physically connected on one of its ports in its table. In our case it is not the case. The switch thus will send a special message (an address MAC FF.FF.FF.FF.FF.FF, called broadcast) on all its ports to determine on which port the peripheral of destination is. This broadcast generally passes on all the network. While receiving the broadcast, the switch 2 will check in its table if the TO address is in its table. In our case, it is present. It thus will return a message to the switch 1 meaning that the message is for him. The switch 1 thus will direct the message towards the port connected to the switch 2. The switch 1 will memorize in its table the address of the PC2 and the associated port (in our case that of the switch 2). This does not pose too many problems as long as the capacity of the table of the switch 1 is sufficient.

Let us see some more complex cases now. When a MAC address off-line on line is placed in the table, the switch will keep it during a certain time. If a new request towards this address is received, the wearing of destination is found in the table. On the other hand, if the time between the requests is too long (generally 300 seconds), the entry of the table is erased and the process of broadcast is again activated. Inevitably, if the table is too small (case of Switch with a low number of ports on a very important network), the MAC entry in the perhaps prematurely unobtrusive table.

These characteristics of tables reduced in the switch of bottom-of-the-range installation of big problems in the networks. Moreover, less the switch comprises of entry, plus the table is small. This implies that for the use of small switches (4-8 ports), the number of switch connected between-them for a connection between 2 PC is limited. I have already had the problem in a network of 30 PC. As soon as the factory started, the communications networks broke down.

2.3. Types of switch

The technology of a switch is closely related on the type of data, the topology of the network and the desired performances.

The first process of operation and more running, called Store and Forward, store all the trames before sending them on the adequate port. Before storing information, the switch carries out various operations, energy of the detection of error (RUNT) or construction of the table of addresses until the functions applicable to level 3 of OSI model, such as filtering within a protocol. This mode is appropriate well for the client/server mode because it does not propagate an error and accepts the mixture of various media of connection. This explains why one uses them in the mixed environments coppers/fiber or in the mixture of flows. The storage capacity plug varies from 256 KB to more than 8 MB for the largest models. Small the switch of this type often shares the storage capacity by groups of ports (for example by 8 ports). On the other hand, the models of high range use a memory dedicated by wearing of entry. The latency between the reception and the sending of a message depends on the size of the data. This slows down the transfer of the large files.

The mode Cut Through analyzes only the Mac address of destination (placed in heading of each trame, coded on 48 bits and specific to each chart network) then redirects the flood of data without any checking. This type of switch does not make any checking on the message itself. In the principle, the destination address must be stored beforehand in the table, if not a mechanism of broadcast is found. These switch is only used in environments made up of point-to-point connections (customers - server). One exclude all mixed applications from type peer to peer.

The Cut Through Runt Free mode (also called Fragment Free at CISCO) is derived from the Cut Through. When a collision occurs on the network, an incomplete trame (less than 64 bytes) called Runt is received by the switch. In this mode, the switch parses the first 64 bytes of frame before sending it to the recipient. If the frame is long enough, it is sent. Otherwise, it is ignored. Latencies are very low... 

The mode Adaptive Cut Through is distinguished especially on the level from the correction from the errors. These switches keep the trace of the screens comprising of the errors. When the error count exceeds a certain threshold, the switch passes automatically in mode Store and Forward. This mechanism avoids the propagation of the errors on the network by isolating certain segments from the network. When the error rate becomes again normal, the switch returns to the mode Cut Through.

2.4. Additional characteristics

A Switch can be stackable: a special connector allows you to connect several same brand switch between - them. The number of stacked switches (of the same model) is limited. The group is seen as a single unit with a single common table, this is what is called the Meshing. This allows to increase the number of ports and resume a largest common table.

Some switch are manageable (more information). By an interface of the WEB type connected to address IP of the switch or by RS232 and the use of telnet, you can block certain lines, preventing for example, a part of PC to connect itself towards another block of PC or to determine physically which computer has access to which server. This also makes it possible to determine beaches of addresses on ports (case where several switch - Hub are chained) and thus to increase speed. A small remark nevertheless, management is generally done according to the MAC addresses (single and given with the manufacture of the chart network or the peripheral). The use of these characteristics must be considered with precaution since if you change a chart network, the switch will have to be reconfigured. Certain models make it possible nevertheless to create user groups by using protocol IGMP. They are known as of level 2 (to level 2 of OSI model) if they make it possible to determine the addresses and of level 3 (to level 3 of OSI model) if they allow in more of blocking by ports (TCP or UDP).

Via interface IP or telnet, a switch manageable also makes it possible to remotely check connections on the switch (posting of the front face), to safeguard or restore the configuration, update of the firmware, to parameterize the lifespan of the MAC addresses in the table...

Some switch of the type Cut Through integrate additional functions as Meshing which makes it possible to create a table on several switch (and not to more send information on all the ports when the apparatus of destination is not directly connected) on the switch. The Trunking Port makes it possible to reserve a certain number of ports for connections between 2 switches.

3. Routers.

The hub and switch make it possible to connect equipment forming part of the same class of address in IP or of the same sub-network (other protocols). For recall, an address IP of an apparatus connected to a network is single. It is of type X.X.X.X, for example Values X can vary from 0 to 255. Address IP consists of 32 bits and a mask also coded on 32 bits.

One determined hierarchies in the addresses, called classes of address.

Classify A Network Machine Machine Machine
Addresses from to Beach to is private.

128 fields (network) and 16.777.216 machines of class A by field 

1.X.X.X.X, 2.X.X.X.X...

Classify B Network Network Machine Machine to Beach to is private

16.000 fields and 65.536 Machines of class B by field

127.0.X.X., 127.1.X.X....

Classify C Network Network Network Machine to Beach to is private

2.000.000 fields and 254 machines of class C by field

192.0.0.X, 192.0.1.X, 192.0.2.X...

Classify D


Classify E


For example:

On the other hand, the connection of a PC with address (class C) will have to pass through a router to communicate with an installation located into (class A). This is the case for a PC which is connected to an Internet site (using addresses of classes A or B). In the same way, in an internal network, the connection of two stations in networks of different classes C (for example 192.168.223 and must pass through a router. A network without router is thus limited to 254 stations (0 and 255 are not used).

In the same way, as the addresses of Internet sites can practically be in all the beaches of addresses A and class B, the connection of an internal network with Internet passes obligatorily through a router which serve of gateway

Nothing obliges to use the addresses of classes C for an internal network, but it is preferable.

Notice, the class of address 169.254.XXX.XXX is not usable in an internal network for a division Internet, this beach of particular address does not accept it even if it is often given by defect by DHCP of Windows (APIPA).

The router is practically a computer with him all alone. This one decodes trames and recognizes parts information of the headings and can thus transmit information on other routers who renew information towards the recipients.

A router connect together networks on the level of the layer network (layer 3), it allows to connect 2 networks with a "barrier" between the two. Indeed, it filters information to send only what is indeed to intend for the following network. The most current use is the connection of multiple stations towards Internet. The data forwarding on the local area network (not intended for Internet) are not transmitted outside. Moreover, the routers partly allow to hide the network. Indeed, in a connection Internet for example, the supplier of access gives an address TCP/IP which is assigned to the router. This one, by the means of a technology NAT / STALEMATE (Network address translation/port address translation) goes redirect the data towards the private address which is assigned to the PC.

The routers are skeletal and in particular allow to block certain connections. Nevertheless, it do not ensure of safety the level of ports TCP or UDP. They are used to interface various groups of PC (for example departments) by ensuring a pretence of safety. Some switch of manageable can partly be to use for this function as long as the network remains in the same class of addresses. The principal use in sharing a connection Internet.

The routers are not useful that to connect networks to Internet, they also make it possible to be used as bridge (English Bridge) to connect itself to a corporate network. The future connections for this protected kind of application go rather for the VPN via Internet. We will see this in chapter 10: Distant connections

It is not possible to connect 2 networks directly by connecting 2 charts networks in a central PC, except by using a software of connection proxy of the Wingate type.

A DHCP server (Dynamic Host Protocol Configuration) can be established in manner software (Windows 2000 for example) or in a router. This possibility makes it possible automatically to allot IP addresses to each station in a beach of given address (in the same class of address).

4. Repeaters

The repeater is equipment which makes it possible to exceed the maximum length imposed by the standard of a network. To be done it amplifies and regenerates the electric signal. It is also able to insulate a failing section (open Cable for example) and to adapt two different Ethernet media. (For example 10base2 towards 10BaseT). This last use which is currently the principal one.

For the connections monomode 1000Base LX, there is allowing apparatus of the connections of more than 100 kilometers.

5. Difference between HUB and Switch

Operation of Hub Operation of a switch

The information sent of a PC towards another (or a printer) is sent to all the PC which decode information to know if they are intended. The information sent of a PC towards another forwards only towards the recipient. If another PC sends information towards the printer, the two communications can thus be done simultaneously.
The total band-width is limited at the speed of the hub. A hub 100 bases-T 100Mbps offer of band-width divided between all the PC, some is the number of ports The total band-width is determined by the number of ports on Switch. i.e. Switch 100 Mbps 8 ports can manage until 800Mbps of band-width.
Support only the transfers in "half-duplex" what limits the connections has the speed of the port. A port 10Mbps offers a connection has 10Mbps. Switch which manages the transfers in mode "full-duplex" gives the possibility of doubling the speed of each bond, of 100Mbps with 200Mbps for example.
Cheaper by port but obsolescent The performances/prix report/ratio increased, is worth the additional charge.

6. Passage of IP addresses to the MAC addresses

We know already that the communications are done by the MAC addresses and not directly by IP addresses.

For a communication, the transmitting PC checks if the PC is in the same class of address IP. If it is the case, it will send a ARP command to determine the MAC address of destination and directly sends the packet data and the headings on the network. The HUBS leave the packet just as it is since they are simple amplifiers. On the other hand, if the network is connected by switches, each switch will check the MAC address in its table, if required to send a broadcast.

On the other hand, if the PC of destination is not in the same class of address, it sends the packet to the router (of which the address MAC is known) with address IP of destination. The router will check if he is connected to the sub-network (class IP) of destination. If it is directly connected, it sends information to the recipient via a ARP. In the contrary case, it will send the packet to the following router, and so on.

7. Connection of an Ethernet network.

By the part Ethernet connection, we know already that:

  1. To connect 2 hubs (switch) between-them, we must use a cross cable. Nevertheless, a small push rod switch is often present on one of the ports which makes it possible to use a normal cable. The new models detect the crossing also automatically.
  2. In Ethernet 10, 4 Hubs present a blocking at the level speeds of connection.
  3. In Ethernet 100, 2 HUBS in series start to cause "stoppers" in the data flows.
  4. The maximum distances must be respected (100 meters maximum for the cable).
  5. The rules of wiring must be strict: connectors, proximities of the electric cables, networks.

What choices for Ethernet local network? The departments between - them shall be connected by switches, if possible managed to block some connections. Any external (Internet connection and connection inter-network) requires a router. Windows Internet sharing is to be avoided for businesses (security) and replaced by a router including the NAT that allows hide the different addresses of the internal network and often include a hardware firewall even if standard equipment are rather amateur.

In relation:

Next of Hardware 2 course - > Chapter 6: DSL and Internet connections

The "Hardware 2" course: Network, servers and communication. For the whole of the hardware training.

© YBET IT 2007 - 2017