hub vs. router
What is the main difference between hub and router?
|
Hi
Hub is used in your LAN connectivity with same network IP Class without a gateway. Router Is used to connect your LAN WAN with different IP Classes and can be used as Gateway for WAN and LAN |
routers send packets around the same network
hubs / switches send packets around the same network |
A hub is just an electronic junction box. No brains, just for connecting PCs together on the same network.
A simple definition for a router is that it is an intelligent device for bridging two or more networks together. |
Another explanation is.
Hubs and switches are used to connect computers on the same network. Routers are used to connect different networks together. |
Its a definision war
A hub transmits everything it receives out every port. you dont what your broadband router doing this or the whole world will hear all your secrets. Fine for small networks. |
yet another bit of Truth : hubs and switches operate on the ethernet layer, routers on the IP layer. Google OSI network model to understand the layer-to-layer concept, then downsize the model to fit with TCP/IP (which implements only four layers while the theoretical OSI model has seven. Oh my !)
|
A hub is a device that simply sends every bit it receives out of all it's ports (except the one on which it received the signal).
A switch creates a table of which MAC address is on which port. It then uses this to send a frame directly to the correct recipient. If it received a frame destined for a MAC address about which it doesn't know, it'll push it out the "uplink" port (if available), and it not, it'll discard it. A router is a device that works with whole packets. Packets have source and destination IP addresses (or IPX, Appletalk, etc), so routers can use this information to determine where to send the packets. Routers are used to separate two networks, for example your LAN and the Internet. A typical example of the route information will take when accessing this site, for example, goes like this:
Basically packets remain the same from source to destination, regardless of distance. Frames, however, change at every stop that involves a router. Switches and hubs do not interfer with either frames or packets, but a switch will interrogate a frame to find out where it came from (for when it is building it's tables) and where it's going (so it knows which port to use). If you need any further clarification, don't hesitate to drop me a line... if you choose to do so, please do not ask really awkward questions - I am not prepared to relay the whole CCNA syllabus to you over email! |
Quote:
Code:
----------------------------- |
That was a very intresting read Thymox : ) Did you realy type all that out, or did you have it stashed somewhere?
Is it the frame that is Ethernet? |
Err... sort of. There are Ethernet frames, and if you're running an Ethernet LAN, then yes. If you're using PPPoE (Point to Point Protocol over Ethernet) for an ADSL connection, then yes for that too. However, if you're running any other type of network (ISDN, serial connection (including 56k dialup), FrameRelay, etc), then the frames will be different. Don't forget, though, that frames are only a consideration between to connecting devices. If you connect to a router, and your router connects to the Outside World, then there may well be two different types of frames being produced - Ethernet frames for your LAN, and Other frames for your Router-->Internet connection. However, the principle of a frame remains the same.
To add a little to my above diagram (only considering OSI model, on the left): Code:
Layer 7: Application - Data Layer 2, the Data Link layer, is where frames are considered. If you're using Ethernet, then the frame is an Ethernet frame. If you've got an ISDN connection to the outside world, then you may find that your router will repackage your packets into HDLC (or a variant of HDLC) frames. At this layer, we can talk of MAC addresses if we're using Ethernet. MAC addresses are used to identify the hardware - the MAC address of the NIC in your computer is (or should be) unique to your NIC. My NIC's MAC address is 00:30:BD:1F:96:60. The MAC address is divided into two main parts, the first part (00:30:BD)is used to designate the manufacturer, and the second part (1F:96:60) is used by the manufacturer to designate an individual NIC. Other technologies use different hardware numbering systems. Hope this helps. |
Thank you very much, that cleared up the understanding : )
|
Well, Thymox. Finally I found some information that was simple enough to understand but deep enough to be interesting and learning. I still have two questions about this structure of connections. How is the actual Internet structured with all ISP's, backbones and root-servers. All people just uses the word Internet between the first box and the final box, they way through here are poorly described, sadly enough.
Also I can't wonder how the command "traceroute" operates. Does it collect packages from every router on the way or is there footprints in some packages... or frames? :) |
yes, how the *ell does traceroute work : P
To give thymox a rest, I found this link http://www.samspade.org/d/traceroute.html |
Unfortunately I have only just started reading the CCNP (Cisco Certified Networking Professional - next step up from CCNA)... I am a long way of teaching it!
Basically, all routers along the line between your machine and the destination need to either be able to understand IP, or be able to re-encapsulate data from one frame type to another without considering the layer 3 information held within them - if they do the latter, then they are effectively acting as a multiprotocol bridge (a bit like a really fancy switch, but bigger and more complex) rather than performing any routing functions. All layer 3 protocols (IP, IPX, AppleTalk, etc) are called routed protocols. Routers use something called routing protocols (RIP, RIPv2, OSPF, IGRP, EIGRP, etc) to exchange information about the best path to a given point. Routers may also be configured with something that you may be familiar with: a default route (or "default gateway" as it tends to be called in PCs). This is a special entry in their routing tables that says "if you don't know where you should send this packet, then send it there and let them deal with it". Basically, people use the term "the Internet" because it is really very complex and quite difficult to explain. A network of networks, all joined together by various links to eachother. Lots and lots and lots of routers, all of differing capabilities, most of which will be frighteningly expensive, all performing similar tasks: taking packets from one interface, deciding what to do with them and what's the best route to their destinations, and then passing them on through another interface - possibly of a different nature! As for traceroute... what happens (simplified version) is that your computer sends a special kind of ping packet (well, usually it sends 3, but that's not important here) that tells a router "hey, I want this ping packet to go here, but I want you to tell me that you received this packet and you are sending it on." When the packet reaches its destination, that machine sends a reply saying "Yeah, I'm here!" You end up with a whole list of "hops" that the packet took in order to reach the destination. Here's my traceroute to LQ: Code:
gsewell@grants:~$ traceroute www.linuxquestions.org |
All times are GMT -5. The time now is 09:00 AM. |