Routers, Hubs, and Switches do pretty much the same thing at first look. Until you understand how they do it. To most people an automobile does pretty much the same thing as well. However how they do it is very different. I am sure most everyone can understand that. You wouldn't try to take a Volkswagon through the Rubicon (touted as one of the roughest 4X4 trails in the world), and you definitely wouldn't try to pick up your date for the Prom in a Military Humvee (well some one might).
So the next question is "How are you going to do it?". To really make that decision you need to make a few decisions about your network. You will also need to understand a few things about protocols and the network traffic they create. Also some protocols are more reliable than others. All protocols are "NOT" created equally. They appear to do the same thing, but they do NOT!
With 2 computers, and only 1 protocol installed (say TCP/IP) there will be generally no traffic on your network. Hence no degradation or network chatter. On the other hand lets say you have 10 computers, multiple protocols (TCP/IP, NetBEUI, IPX, AppleTalk, etc...) there will be constant broadcasts and discoveries being made on your network. This makes for a very busy network, with lots of unusable bandwidth. You might also be concerned about security for some reason. Lets say you have children, and you don't want them to be able to access the internet, but you want to be able to get to that computer all the time without having to go into their room and unplug their computer. The only way that can be done is with a router, and putting you computer in 1 subnet and their computer in another. Configuring the router to not allow pass through for their subnet.
Hubs
A hub is a piece of hardware that will link multiple computers together. Common hubs have 4, 6, 8, 12, and 16 ports. There are larger hubs. Lets say you have three computers, and you want to connect them together using TCP/IP and a Simple Network.
When you send a packet from computer A to Computer B the Hub receives the packet and sends it out all other available ports on the Hub. Both Computers B and C get the packet, C looks at the packet and realized that it is not for itself so it ignores it. Computer B sees and sees that it belongs to itself.
Pro's
- A hub is probably one of the easiest pieces of network hardware to setup. Basically supply it with power and plug in your network cables.
- A hub is a very inexpensive and cost effective method for connecting a few computers.
Con's
- When you use a hub in your network you lose some network bandwidth. In a way all ports are sharing the same wire.
-If you use a broadcasting protocol you will have a lot of collisions on your network.
- Each manufacturer has a different way of dealing with the power of the signal being sent through the wire. I have seen some manufacturers recommend cable lengths of no longer than 50m. Ethernet has the capability of 325m.
Switches
Now lets take a look at switches. A switch keeps what is referred to as a routing table. This allows the switch to keep track of who is attached to it. When a request comes in it takes a look at who it is for and sends it only to the computer that needs to see the packed.
A switch contains a much faster routing capacity than a hub. It can handle many more requests than a hub at one time. You could probable safely double your computer count, and not see a negative impact on our network bandwidth.
A collision is when two computers try to send data at the same time. I.e. when computer a sends data to computer B, and computer C sends data to computer A. Both computers listen to the wire, don't see any traffic on the wire and send. You then get a collision. Because a hub sends all data on all wires you would see a collision with a hub.
When TCP/IP receives a collision response it will resend the data at a random point. This means that all other network requests will be paused until TCP/IP receives a notification that the packet made to its destination OK. Both computers involved in the network collision will use what is known as a back-off algorithm. This way, hopefully they will not both try to resend at the same time. However with many computers, while your computer waits for the back-off algorithm it sends no traffic, other computers will start sending their data. If you were to have a large network 25 or so computers all on hubs, during high network traffic moments you would see a lot of collisions. Which gives the appearance of a slow network. Because TCP/IP will resend the packet over and over until it is successful.
If you were using a switch you would not see a collision, because the switch would route computer A's request to Computer B. And Computer C's request would go directly to computer A. No cross in Ethernet traffic. This means an increase in network bandwidth for you.
Routers
A router on the other hand is not normally used between two computers in the same subnet. It can be used for this, but it is over kill. It would be like buying a Boeing 747 to go to the grocery store. Routers are generally purchased so that you can have many computers on some form of a Private IP network and connect them all to a Public IP network (the internet).
A router is how you get packets between two computers on two different subnets. And if the computer you are requesting is not on your network, the router can forward the request to other networks.
Unlike a hub and a switch, a router will also analyze the packet to see what type of a packet it is. This means that you can have SMTP/POP3 packets sent to a specific port. You can have HTTP packets sent to another port. You can have HTTP packets from a specific computer, or subnet, sent to another port. A router has the ability to filter packets, or read them and then decide what to do. This is called (by some) intelligent routing.
On most routers there is a small operating system that runs, kind of like DOS if any you remember what that was. And with this OS you can configure the router and set up the rules and routing tables.
Describing all of the functionality, and capabilities would be a 200+ page document in itself. But I hope I have given you a much better idea of the difference between the three devices.
When to use a Hub?
When you have a small network, 2 - 8 computers. Recommended with only 1 protocol, i.e. TCP/IP. Where speed is not of prime importance, and all computers are on the same subnet.
When to use a Switch?
When you have a small to medium network, 5 - x computers. Recommended with only 1 protocol. Where speed is of importance, and all computers are on the same subnet.
Where to use a Router?
When you have any number of computers on different subnets. Or when you have many computers you would like to separate from the Public IP network. Using any number of protocols. And security is of potential importance.
Source: http://answers.yahoo.com/question/index?qid=20070926202408AAlPRwY
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment