router -->switch work?

Status
Not open for further replies.

IBMan

Daemon Poster
Messages
1,084
hey, if i have lets say a 5 port router, internet comes in, goes out to the other 4 ports, is the router only going to have 4 addresses to assign? or can i put switches or hubs on each port and attatch computers to all available ports and still expect to use the internet all at the same time? and i really dont feel like having to go thru ICS and stuff i'd rather just plug and go...or is none of this possible/.
 
the switch should take the address that the router has givin it an then split it for the ports on the switch allowing more computers to connect
 
bebop said:
the switch should take the address that the router has givin it an then split it for the ports on the switch allowing more computers to connect

A regular Layer-2 switch does no such thing.

Routers work off of Layer-3 of the OSI model, which involves IP addresses. Normal switches run off of Layer 2, which only involves itself with MAC addresses, and doesnt even notice IP addresses.

So, to say that a switch splits up an address given to it by the router is very wrong.


Now, back to the original question. Your Router will lease out IP addresses. It just depends on how many it is configured to lease out. If it is configured to lease out as many IP addresses as it has ports, then there wont be enough IP addresses to go around, if you connect more computers.

If you can get into the routers configuration and increase the amount of Leasable IP addresses, then you should be ok. Any attached switches will simply pass the information to give the IP to the computer from the router.

It may seem like magic, and plug-and-play until you dont have enough IP addresses to go around...
 
It will work. From experience I have found that just sticking everything together properly works. It sorts itself out. You can have loads of hubs and switches connected. You shouldn't run out of IP addresses either unless it's a really huge network, in which case you can increase the DHCP range on the router.
 
IBMan said:
crap...
that really sucks...

I think you mis-understood what Elbatrop1 said. And I think bebop mistook a switch for a router...

Basically switches are invisible and dont have an address. At the moment you have a 4 port router, meaning that it can have 4 computers plugged into it, each of which will be assigned an address by your router, say 192.168.0.2 -> 192.168.0.5

When you plug in your switch you may gain an extra 3 ports. since the switch is invisible your router just assumes that it is now a 7 port router and assignes each of the ports an address, say 192.169.0.2 -> 192.168.0.7

Now your router has a DHCP server which assigns these addresses and can assign probably more than you will ever need. However if you are only ever going to have 4 computers on your network it makes sense to tell your router to only assign 4 addresses. This more usefull with a wireless network than a wired one but comes in useful from a security point of view since it makes it extremely hard for unauthorized users to connect to your network (it does also involves clever use of mac filtering and long lease times etc... so i wont go into it)...

What Elbatrop is saying is that if your router is set up to only assign 4 IP addresses then if you plug in a switch to increase the number of ports it will make no difference since there can still only be 4 computers plugged in because there are only 4 addresses being assigned. In which case you need to go into your router and allow it to assign more addresses. Most likely it will be set to assign the maximum number of addresses anyway, in which case you will have absolutely no problems.

Just like you can use a usb switch to give yourself more USB ports (upto 127) you can use a network switch to give yourself more network ports (up to however many addresses your router can assign - which is more than you will ever need!!)

Basically in answer to your question YES! and also yes it will be plug and go (unless you need to allow your router to assign more addresses as explained above - which is unlikely)
 
alright thanks...will it work with a hub or a switch? i have a 24 port...hub/switch, and yes i know the difference between the 2, as some people i know dont and i didnt really understand it til a few months ago...they are basically the same thing but i know they are different...will they both work?
 
It will work with the hub and the switch and/or both of them together will work. All you have to worry about is the DHCP as explained previously by fitzjii and which port and cable to use (depending on which port you connect the switches together) either by a straightthrough or a crossover cable. IF DHCP is a problem than just disable it and staticly assign each host.
 
Status
Not open for further replies.
Back
Top Bottom