Networking can seem very confusing at first because it brings with it a new set of terms and concepts. But once you get the facts straight, everything starts to make sense.
PART I HUBS, ROUTERS AND SWITCHES
In order to tell you more about hubs, switches and routers, Im going to introduce some technical concepts. This may seem like more information than you require at first glance, but these are the fundamentals of networking. They will help me give you an accurate definition of hubs, switches and routers. Read the next 3 paragraphs very carefully. If you dont understand everything at first, read them again. Like I said, its a little technical, but all very logical. Once you understand the basics, everything else will seem easy, and the rest of the article will flow smoothly.
A computer that wants to connect to a network needs a network interface card (NIC). You probably already know that. The network card is what converts the data into digital signals that travel across the network cables. You might have figured that out on your own too. But what you probably dont know is that each network card has a certain numerical combination burned into it known as a MAC address. MAC stands for Media Access Control. This MAC address is a unique identifier of that card, and in turn the computer that uses that card. No two network cards in the world have the same MAC address (assuming the manufacturers follow regulations). So the MAC address gives the computer an identity on the network by virtue of the hardware (network card) installed.
There is also another identifier for a computer in a network, that is configured through the computers software. That is the computers IP address. Im sure youve heard that term before. Heres what you need to know about it: IP stands for internet protocol. IP addresses are of the form xxx.xxx.xxx.xxx. A computer on a network may have an IP address of 18.104.22.168. Other computers on the network would have a similar IP address like 22.214.171.124, 126.96.36.199, 188.8.131.52 and 184.108.40.206 and so on. If you notice, all the IP addresses of the computers on this network are of the form 128.0.0.x where x is different for each computer. A different computer network would have a totally different form of IP addresses such as 64.0.0.x or maybe 192.0.0.x. So basically the IP address (a) identifies a network as a unique family and (b) identifies each computer on that network.
Why am I telling you all this? Whats the big idea behind giving these computers unique identifiers? Well think about an everyday situation. When you put a letter in the post box, you dont put it in without writing a destination address on it. The postman wouldnt know where to deliver it. Similarly when a computer wants to send data to another computer on a network, it doesnt just put data on the network. It sends it as a packet consisting of the data, as well as the address of the destination computer the IP address, and the MAC address of the destination computer. So obviously the IP address and the MAC address are very important.
Now that was the hard part. If you didnt understand those last few paragraphs, read them again. Else proceed.
The difference between hubs, switches and routers, lies in how they interpret the address information in each data packet being sent over the network. Each of them helps the package along its way, by performing its own unique function.
Let me refer back to the analogy of the postman. Think of the working of the US Postal System. When you hand a letter to the post office, they first look at the state youre sending it to. If its going to a different state, they dont bother to read the street name and number. They simply send it off to one of the major postal processing centers in that destination state. The people there then look to see which city its destined for. Thats all theyre interested in. They promptly send it off to that city and it becomes the problem of that citys postal service. The employees at that facility read the zip code and send it to the local post office. And the local post office hands it to the postman, who reads the street name and number. So basically they all play their little role in making the letter reach its destination, but each performs a slightly different function.
Hubs, switches and routers are like these different processing centers. Each is only interested in what it needs to know to send the packet along on its way. Their combined contributions help a network run the way it does. Lets talk about each of them in turn.
Hubs are devices with many ports (jacks into which network cables can plug in). Assume 4 computers are plugged into a hub computer A, B, C and D. Lets imagine that computer A wants to send a message to computer C. Computer As network card puts the data onto the network cable along with the IP and MAC address of the destination computer C. This data travels as electrical signals to the hub. Now the hub has to send the data to computer C. However hubs are not very intelligent devices. They dont understand IP addresses and MAC addresses. So the hub repeats the packet it received from computer A out through all its other ports hoping that one of the other computers plugged into it is the destination. That way the same packet gets sent to computer B, computer C and computer D. Of course only computer C will accept the package because it has its address on it, while computer B and D simply discard it.
Thus you see a hub is simply a multi-port repeater. It takes data signals in through one port, and repeats everything out through all the other ports, hoping that one of the computers plugged into it is the destination computer.
The disadvantage of this behavior is that it causes unnecessary traffic. By sending out the same signal to every computer, it clogs up the lines keeping them busy and preventing other data from being sent over them. If youve ever worked in an office with a slow network, you know of the frustration caused and the lost productivity due to the delays.
A switch is as a smart hub. Its a hub that understands MAC addresses (but not IP addresses). Lets look at the same situation computer A, B, C and D, only this time theyre plugged into a switch. Computer A decides to send a packet to computer C. The packet travels from computer A to the switch.
Now this is where things work differently. A switch automatically learns the MAC addresses of all the computers plugged into it by communicating with them. It stores these in a little table. When it receives the packet from computer A, it reads the MAC address of the destination computer off the packet. It then looks up its table and says Ah! I have a computer with this MAC address connected to one of my ports. And it proceeds to send that packet out through that port, and no other. So the packet goes only to computer C and not to computer B and D. This way the only cables being used are the ones that need to be, and the rest of the network is free to transfer other data.
The router, like the switch, is a smart hub. However, while the switch only concerns itself with MAC addresses, the router only concerns itself with IP addresses. And it doesnt concern itself with the individual IP address, but only the form of the IP address.
Remember what wed said about IP addresses before? Not only are they unique to each computer on a network, the entire network takes on the same form of IP address. If you have two networks, one with computers that have IP addresses of the form 128.0.0.x, and the other with computers that have IP addresses of the form 64.0.0.x, you could plug a router in the center between these two networks. If a computer within one network tried to communicate with another computer in its own network, the router would notice that the form of the destination IP address is the same as that of the network from which the message originated. Obviously the message was meant for a computer within this network itself. So the router would not allow this packet to pass through it to the other network. It would make sure that information remained isolated within that network only. But if a computer in one network wanted to communicate with a computer in the other network, the router would allow the package to be sent into the other network. This way it allows two networks to communicate with each other, while at the same time limiting traffic to a bare minimum.
I hope you now see the difference in the working of hubs, switches and routers. Each of them has its own way of doing things, and you need to decide which combination is an optimum solution.
Now you might well wonder, why not just replace switches with routers. That is possible in some situations, but not all. What if you had three computers with IP addresses 220.127.116.11, 18.104.22.168, and 22.214.171.124 connected to a router. All 3 IP addresses are of the form 128.0.0.x. If one computer tried to send a packet to the other, the router would think to itself The IP address of the destination is of the same form as the IP address of the sender. The destination computer must obviously be on the same network. I should not allow this packet through me. And so the packet would be blocked off and communication would be impossible.
It is possible to do away with hubs and just use switches in place of them, but switches are usually more expensive than hubs. So cost is a factor too. (however switch prices are falling so this might no longer be an issue).
PART II - YOUR SETUP
Now Andrew, lets look at your particular situation and find out what YOU need. You have 3 computers. I assume you want all 3 to connect to the internet. Im going to present two solutions depending on whether you use broadband, or dial up.
>>>For a Broadband connection (permanent connection thru ISPs LAN)<<<
You will need 1 hub and 1 router.
All 3 computers will be connected to the hub.
The hub will be connected to the router.
The router will be connected directly to your broadband service provider (broadband socket on wall). It is likely that you will get the router from the service provider itself and they will connect one port to their network. You will only have to plug your 3 computers into the hub using Ethernet cables, and then connect the hub to the router using another Ethernet cable.
(Instead of a hub, you can use a switch. However with 3 computers you dont really need to worry about network traffic and delays, so you might as well go for the cheaper device the hub).
>>>For a Dialup connection<<<
You will need 1 hub.
All 3 computers will be connected to the hub.
One of the computers will connect to the telephone jack using a modem and telephone cable.
In this case you will also have to do a little configuration with Windows XP. Since the other two computers will be connecting via the third one thats hooked up to the phone line, you will need to enable internet sharing on all 3 computers. The computer thats hooked up will connect directly to the internet, while the other two will connect through it.
Setting this up in Windows XP is very easy. Go to Control Panel > Network Connections > Setup home or office network. The wizard will guide you through the rest of the process. Windows has a very good help file for this topic. Look up Start>Help and Support, and type in internet sharing. You will find a result that discusses this topic.
The following webpages have more information on network hardware and configuring internet sharing.
The cables you would use to make the connections are the regular CAT5 (category 5) ethernet/network cables.
PART III SECURITY / FIREWALLS
Now lets move on to your next question. Do hubs, switches and routers have firewalls?
Hubs and switches do not have built in firewalls. Routers do.
If you were to use the setup for a broadband connection, the main point of entry for anything from the internet would be through your router. All routers come with a basic firewall. You can purchase better router firewall software if you choose to. The firewall offers a good level of protection. Besides, even if a hacker does break through that firewall, he wont be breaking into your computer. He will be breaking into the router. Hes not going to find anything of value on your router. So routers are pretty safe. You should reset the routers password for security. I would still recommend installing firewalls on all the computers. If cost is an issue, get a free one like the free version of Zone Alarm.
Switches do not generally come with firewalls although there are a few out there. Hubs do not generally come with firewalls either but once again there are a few that do. In any case, in the hub + router setup you would have the firewall protected router the main gateway so the switch/hub would not need a firewall.
If you were to use the setup for dial up with internet sharing, then you would have to install a firewall on the computer that is directly connected to the internet. This is because the point of entry is the computer itself. Of course if a hacker broke through the firewall then he would gain direct access to your computer and through it the other computers. But most firewalls should prevent this from happening. I would recommend installing firewalls on the other computers as well. The configuration of the firewall may be a little tricky since you will have to permit sharing of the connection but you should be able to work around it. Or if you want to save yourself that trouble, just use the default Windows XP firewall. Enough protection as far as Im concerned. It doesnt matter that the hub in this setup doesnt have a firewall because its not the point of entry anyway.
I think that addresses both situations dialup and broadband.
Let me end with a few links that might come in handy
Link to a list of good routers with firewalls :
Security space network security test: (You can test a routers firewall through their test. You need to pay for this service):
Hope this information helps.
Submitted by: Gary P. of Atlanta, GA