Sunday, 5 October 2014

Router Vs Switch

In the previous class on 1st October 2014, Mr. Azrul give us a change to explore two type of networking devices which is switch and router. Some of us confusing the exactly function of the two devices and how its work as well as the differences between them.

So, in this post I'll explain a little bit about the router and switch. Here we go with the Switch first:

Switch:
A switch can identify the intended destination of the information that they receive, so it send that information to only the computers that are supposed to receive it. Switch can send and receive information at the same time, so it can send information faster than hubs can. By paying attention to the traffic that comes across it, it can “learn” where particular addresses are.Initially, a switch knows nothing and simply sends on incoming messages to all ports:
Even accepting that first message, however, the switch has learned something – it knows on which connection the sender of the message is located. Thus, when machine “A” responds to the message, the switches only need to send that message out to the one connection.
In addition to sending the response through to the originator, the switch has now learned something else – it now knows on which connection machine “A” is located.That means that subsequent messages destined for machine “A” need only be sent to that one port.

Switches learn the location of the devices that they are connected to almost instantaneously. The net result is that most network traffic only goes where it needs to rather than to every port. On busy networks, this can make the network significantly faster.
Oleh itu, dalam bahasa mudahnya, switch mampu mengenali dimana destinasi sesebuah komputer setelah menghantar broadcast message kepada semua komputer yang berada dalam lingkungan rangkaiannya selepas mendapat maklum balas daripada komputer berkenaan. Ini membuktikan bahawa switch adalah lebih effisyen berbanding hub. (Correct me)


Router:
Routers is smarter than switch that enable computers to communicate and it can pass information between two networks such as between your home network and the Internet. A simple way to think of a router is as a computer that can be programmed to understand, possibly manipulate, and route the data that it’s being asked to handle. Many routers today are, in fact, little computers dedicated to the task of routing network traffic.As far as simple traffic routing is concerned, a router operates exactly as a switch, learning the location of the computers on its connections and routing traffic only to those computers.Consumer grade routers perform at minimum two additional and important tasks which is DHCP and NAT.
DHCP – Dynamic Host Configuration Protocol – is the way dynamic IP addresses are assigned. A device asks for an IP address to be assigned to it from “upstream” and a DHCP server responds with an IP address assignment. A router connected to your ISP-provided internet connection will typically ask your ISP’s server for an IP address; this will be your IP address on the internet. Your local computers, on the other hand, will ask the router for an IP address and these addresses are local to your network.

NAT – Network Address Translation – is the way that the router translates the IP addresses of packets that cross the internet/local network boundary. When computer “A” sends a packet out, the IP address that it’s “from” is that of computer “A” – 192.168.1.2 in the example above. When the router passes that on to the internet, it replaces the local IP address with the internet IP address assigned by the ISP. It also keeps track, so that if a response comes back from somewhere on the internet, the router knows to do the translation in reverse – replace the internet IP address with the local IP address for machine “A” and then send that response packet on to machine “A”.
Kesimpulanya, router adalah lebih pintar berbanding switch. Router membenarkan dua atau lebih komputer berkomunikasi dalam rangkaian yang sama mahupun berbeza. Router juga mempunya dua komponen penting iaitu DHCP yang berfungsi sebagai Fungsi dari DHCP adalah memudahkan peruntukan alamat IP dalam suatu rangkaian dan memberikan IP address secara berpusat pada suatu subnet atau lebih. Manakala NAT pula berkerja untuk menukarkan private IP address kepada public IP address apabila keluar ke internet. (Correct me)

Source:
http://askleo.com/whats_the_difference_between_a_hub_a_switch_and_a_router/
http://windows.microsoft.com/en-my/windows/hubs-switches-routers-access-points-differ#1TC=windows-7

No comments:

Post a Comment