I don't know anything about networking. So here's my first question, how would you define the difference between a hub, a switch and a router.

From what I got so far, a switch is an intelligent hub that transmits data only to desired computer (unlike the hub who relays the information to everyone). The switch determines the target computers based on their MAC addresses. MAC/IP conversion is done with ARP, a table that holds the equivalence between the two addresses on the network.

Now what about routers ?

I have a big job interview coming up next week so your help would be very much appreciated. Thanks everyone :D
I remember having studied something related to network topologies , a friend still has the PowerPoint presentation that should answer all your questions , he is sending it me . PM me an email to send it to :)

switches are also known as bridges

a bridge can connect 2 networks of the same type to one another like two *bus networks connected by a bridge become a big *bus network .

a router can connect 2 networks of different type to make an internet ( with a small i ) which means an intranet if you wish . for example a *star network and a *bus network connected together create an intranet .


*bus network : a group of computers connected to each other directly with no one single computer being the server .

*star network : a single computer being the server that controls the direction of packets in between , all computers are connected to it .
Well I'm also ignorant when it comes to networking so this should be interesting for me as well.
rahmu wroteI have a big job interview coming up next week
Aren't you already working at some company in France?
True or False :

* A router is a computer, as in running as operating system. A switch doesn't run an OS.

* A router could (and generally does) contain a switch.

" Routers include routing tables. They are the preferred means of connecting different types of networks. Switches are used inside the same subnet.

* Switches are often used as the center of a star topology.

I think this true/false format is the easiest for me to ask my questions.
* A router is a computer, as in running as operating system. A switch doesn't run an OS.
False
it does have a microprocessor and runs a firmware but is not necessarily a computer . a switch has a firmware as well but not a user interface because there is nothing you need to edit .
* A router could (and generally does) contain a switch.
True
" Routers include routing tables. They are the preferred means of connecting different types of networks.
True
Switches are used inside the same subnet.
True , but not only there , they can be used to connect two networks of the same type .
* Switches are often used as the center of a star topology.
True in small networks , servers are used in larger ones .
switches can run an OS, notably in the case of a managed switch.
Basically, hubs are old, dumb technology. When they receive a packet, they forward it to all other ports, so that everyone connected to the hub gets it. Only the target computer will read the packet though, the other computers will discard it.
A switch "switches" the packet. It has a lookup table and can read the header of the packet, and will normally forward a received packet only to the right port, so that only the target computer gets it.
I dont know why people still talk about hubs, they are not sold anymore for a while now, and nobody ever considers using them over a switch.
Switches are dirt cheap and have some obvious advantages:
- Since packets go only to the target, other computers on the network cannot capture data that is not destined to them => higher security
- It reduces congestion on the network by not pointlessly forwarding packets, therefore increasing performance too.
- It sounds cooler :-)

You should also probably know that there have been exploits that caused switches to be overwhelmed and fallback to "hub mode", the aim being for the attacker to read packets that are not destined to him.

For learning more about networking, I recommend "Teach yourself TCP/IP in 24 hours" (although you surely wont read it in 24 hours). It's a damn old book, but it's concise and the stuff is covers is still the basis of the internet.

BTW, routers also forward packets, so you might ask me, what's the difference? Switches forward Ethernet packets. They are not aware of IP packets. Routers forward IP packets. IP packets are made of several Ethernet packets (or other kind of packets too, in other environments). There are a buch of other differences. Networking protocol work in a stacked model, a bit in the same way then programming - You have machine language, then Assembly - then C - the high level languages...
In networking you have Ethernet (or others) - IP - TCP - THen higher level protocols like HTTP.
a router IS running an OS, and usually a flavor of linux. anyone can compile a program to run under any router to do good/evil tasks :)