What is a different between switch and Hub?


Although hubs and switches both glue the PCs in a network together, a switch is more expensive and a network built with switches is generally considered faster than one built with hubs. When a hub receives a packet (chunk) of data (a frame in Ethernet lingo) at one of its ports from a PC on the network, it transmits (repeats) the packet to all of its ports and, thus, to all of the other PCs on the network. If two or more PCs on the network try to send packets at the same time a collision is said to occur. When that happens all of the PCs have to go though a routine to resolve the conflict. The process is prescribed in the Ethernet Carrier Sense Multiple Access with Collision Detection (CSMA/CD) protocol. Each Ethernet Adapter has both a receiver and a transmitter. If the adapters didn’t have to listen with their receivers for collisions they would be able to send data at the same time they are receiving it (full duplex). Because they have to operate at half duplex (data flows one way at a time) and a hub retransmits data from one PC to all of the PCs, the maximum bandwidth is 100 Mhz and that bandwidth is shared by all of the PC’s connected to the hub. The result is when a person using a computer on a hub downloads a large file or group of files from another computer the network becomes congested. In a 10 Mhz 10Base-T network the affect is to slow the network to nearly a crawl. The affect on a small, 100 Mbps (million bits per scond), 5-port network is not as significant.
An Ethernet switch automatically divides the network into multiple segments, acts as a high-speed, selective bridge between the segments, and supports simultaneous connections of multiple pairs of computers which don’t compete with other pairs of computers for network bandwidth. It accomplishes this by maintaining a table of each destination address and its port. When the switch receives a packet, it reads the destination address from the header information in the packet, establishes a temporary connection between the source and destination ports, sends the packet on its way, and then terminates the connection. Picture a switch as making multiple temporary crossover cable connections between pairs of computers (the cables are actually straight-thru cables; the crossover function is done inside the switch). High-speed electronics in the switch automatically connect the end of one cable (source port) from a sending computer to the end of another cable (destination port) going to the receiving computer on a per packet basis. Multiple connections like this can occur simultaneously. It’s as simple as that. And like a crossover cable between two PCs, PC’s on an Ethernet switch do not share the transmission media, do not experience collisions or have to listen for them, can operate in a full-duplex mode, have bandwidth as high as 200 Mbps, 100 Mbps each way, and do not share this bandwidth with other PCs on the switch. In short, a switch is “more better.”



Explore posts in the same categories: Computer Networks Interview Questions, Networking Interview Questions


BOOKMARK THIS : del.icio.us | Digg it | Furl | reddit |


Related Questions :

  • What’s different about switch statements in C#?
  • No fall-throughs allowed. Unlike the C++ switch statement, C# does not support an explicit fall through from one case label...
  • What is Log Switch ?
  • The point at which ORACLE ends writing to one online redo log file and begins writing to another is called...
  • What is Log Switch ?
  • The point at which ORACLE ends writing to one online redo log file and begins writing to another is called...
  • What is Context Switch?
  • Switching the CPU to another process requires saving the state of the old process and loading the saved state for...
  • What restrictions are placed on the values of each case of a switch statement?
  • During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted...
  • Describe the actions taken by thread library to context switch between user level threads?
  • The thread library function performs the following actions to context switch between user level threads Copy all live registers to...
  • How do you generate documentation from the C# file commented properly with a command-line compiler ?
  • Compile it with a /doc switch....
  • What is Data-Link Switching ?
  • Data-link switching (DLSw) provides a means of transporting IBM Systems Network Architecture (SNA) and network basic input/output system (NetBIOS) traffic...
  • How do you switch from an init.ora file to a spfile?
  • Issue the create spfile from pfile command....
  • What does ‘managed’ mean in the .NET context?
  • The term 'managed' is the cause of much confusion. It is used in various places within .NET, meaning slightly different...

    Comment:

    You must be logged in to post a comment.