Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

router and hub

Status
Not open for further replies.
Could you please explain what is the difference between 'Router' and 'hub".

My understanding is

Hub - several computers can be connected into a hub in order to share one internet link ( or one modem or high speed link). I belive router also do the same.

Can any one explain me the difference.

many thanks
 
As I understand it, the MAIN difference is as follows:
Hub repeates received data to all ports, whereas a router looks at the message headers and only sends it to the appropriate port(s) based on the address. There may be some others I am not aware of.
In a typical network setup, you would have a multi-port router at the top, which connects to several hubs, which then connect to the various computers on the network. This arrangement helps to keep message traffic in one network segment from blocking another segment, or the entire network. If you just need to set up a small home/office network (4-8 ports) generally a hub will suffice.
Dialtone
 
i think that probably is correct, however, in terms of what you might use in your home, i would like to add this.

a router is usually used to connect the hub to a modem (and the modem connects to the internet). Usually, 'routers' that you can buy from lynksis etc have the router and modem built in. Some even have the hub built in aswell.

i would, while on the subject, like to point out that a switch is the same as a hub, but with a higher throughput - i.e. it can handle a larger ammount of data in total. (I know you didn't mention switches, but just incase it comes up later...)

just a couple of thoughts.

Tim
 
andrew2022 said:
routers are normally used 2 connect a newtork 2 the internet
usually being the important word here.

mahinda jayasinghe, can you tell us in what context you want to know about these things, so we can give you more useful answers.
 
My understanding is that a Hub justs repeats inputs to all the other ports. A switch is smart enough to know which port to send incoming data to which helps avoid collisions. A router in adition to connecting several computers provides extra internal IP addresses. When you sign up for an internet connection you only get one IP address at a time (unless you pay lots of money). For the network to function every computer in your network has to have a unique IP address. The router assigns special internal IP addresses to each computer in your network (they look like 192.168.1.XXX where you replace the XXX by a number). So each computer can send data to each other using this IP address. When data needs to go out to the internet the router translates the internal address into the one IP your service provider gives you. I'm not sure the details of how the translation works but you can probably find more info on google.
 
So if using a router..So If you connect another computer that you have to that router, it will have a slightly diffrent IP address? correct?..Just a guestion?
 
You could think of a router that is doing NAT as the doorman at a private club. Everyone inside the club has an IP address given to them by the doorman. Any requests from outside the club must go through the doorman, who knows who you are, so he gives the message to you, and replies from you go back out, via the doorman. The outside world sees only the doorman, and his address IP, they don't know your "inside address."

So yes, each computer connected to the router gets its own IP address, and the router itself has an IP address. The routers IP address is the one that appears to the internet for example.
 
I have an idea to connect several computers to one high speed modem.

- Cable modem - router - few PCs.

In this sequence can I connect PCs.

All PC s should be able to connect internet independently.

My next question is how do I define IP adress for difference PCs.
I got only one IP for the modem.

I belive Router is is most suitable one. Can I connect Hub too in this way.

What is the best router (or hub ) for this. Any clue,

Many thanks.
 
- Cable modem - router - few PCs.
this will only work if the router has a built in hub. To be honest, most do, so this shouldn't be a problem. If, however, yours doesn't (if you let us know the model you have we'd be able to tell you if it does), then it would simply be a matter of inserting a hub between the router and the PCs

a la:

Cable modem - router - hub - few PCs.

My next question is how do I define IP address for difference PCs.
I got only one IP for the modem.
what operating system are you using? I don't know about others, but with most versions of windows, the IP addresses are defined for you.
In my setup, I can configure the router and hub to force certain computers to take on a specific IP address, although this depends on the model of router/hub, and it isn't actually that useful.


What is the best router (or hub ) for this
What is 'best' will have to be decided by you. However, we can recommend routers for you.
I personally use Netgear routers and hubs. I don't think you can go to far wrong with Netgear, just remember you will need a Modem, Router, and Hub. Sometimes you will be able to get these combined in one product, sometimes you will have to buy these separately - its up to you.
The only other thing I would recommend is get a Router with a built in firewall. Other than that, extra features are up to you really.

Tim
 
Thanks for it,

I have cable modem already connected to my PC. Still I hav not buy router or hub.

Do I need to use same IP addres if I caonnect several PCs with a router. Then how do I identify individual PCs if I use same IP.

Or how do I define IP address for individal PCs i am going to connect.
 
mahinda jayasinghe said:
Do I need to use same IP addres if I caonnect several PCs with a router. Then how do I identify individual PCs if I use same IP.

Or how do I define IP address for individal PCs i am going to connect.
easy answer is, you don't.

bmcculla explained it earlier, but presumably that didn't help, so I'll have a go.

The router will appear to the outside world as a SINGLE PC. As such, it will have a single IP address. This will be assigned by your ISP.

However, internally (i.e. within your home network) the router, all PCs and anything else connected to the network will have an IP address assigned (probably) by your router. Internally, you router will have the address 192.168.0.1, and the PCs will take the addresses 192.168.0.2, 192.168.0.3 etc. This should all be done fairly automatically by windows (assuming that is what you are using).

So, it doesn't matter which PC you are using to browse the internet, to the outside world it will appear as if you are only using one PC (which will infact not be a PC, but your router).

Each PC has its own IP address, but only internally. It does not need an external IP address aswell, as the router already has one.

Then how do I identify individual PCs if I use same IP
again, you don't. Instead of each computer communicating with the internet, it communicates with the router. The router then communicates with the internet, requesting a particular piece of data. When this data comes back to the router, it remembers the internal IP address of the computer that requested it in the first place, and sends that piece of data on to that computer.

Any help?

Tim
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top