Monday, April 2, 2012

Computer Network: Difference between a switch, a hub, and a IP router.


A hub is a device used to connect computers and or printers in a network without any type of decision making process, they simple act as concentrators, they can be passive or active meaning that they will regenerate the signal in order to increase the distance data can travel.  They forward all frames to all the attached devices in the network segment. This increases the ease for network eavesdropping, since all machines are receiving frames.

Switches are devices that work at the link layer level, handling frames within a network segment. They alleviate congestion and reduce collisions. This is accomplished by learning the MAC addresses of those machines in the network segment and the port in the switch. Over time the switch learns all these addresses and is capable of only forwarding frames to the port associated with the destination MAC address and not the other machines in the same network segment. This reduces collisions, increases the effective speed of the network and the effective bandwidth. By forwarding frames only to those machines that are the receivers and not every device in the segment, the chances of eavesdropping are greatly reduce.     

Routers are devices that operate at the network layer connecting two or more networks. Routers store information on the neighboring networks and a default gateway. The information store on the router and the protocols configured in a router allows it to take the appropriate action with the packets it receives: drop, deliver or forward. Based on network information routers can handle packets similar to the mail system using zip codes. Routers are susceptible to attacks so the first thing is to have strong passwords, turn off those services not used and in wireless network have strong security measures. Packet sniffing is almost unavoidable so if confidentiality is essential then it is necessary to implement some type of encryption.  

Thanks to Gustavo Ramirez (my classmate) and the to the book (Introduction to Computer Security) which helped me in composing this post.