|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
stupid question needs stupid answer
Ok what is the point of a switch? Added secuirty?
On a network can you just set it up as this: Internet | Switch / | \ PC 1 PC 2 PC 3 or do you need it to be like this? Internet | Switch | Router / | \ PC 1 PC2 PC 3 ...or what? I'm a bit confused as to whats the point of a switch...and how to use it? I've read the definition of a switch from here ( http://www.fact-index.com/n/ne/network_switch.html ) But still a bit confused.. I guess the main thing confusing me is why would you want a 24 port switch like this ( http://www.linksys.com/products/product.asp?grid=35&scid=42&prid=569 ) if its just connecting into a router..... I feel sooo stupid right now... |
|
#2
|
||||
|
||||
|
Dude.... that's not a stupid question... Put a proper title next time though.
You don't need a switch, just get the router. Code:
Internet
|
Router
/ | \
PC 1 PC 2 PC3
You needed a switch if you needed more than one router. (More than one little network...) PS: I had no clue what a switch was for before this... did you even read the link you posted up? |
|
#3
|
|||
|
|||
|
a switch is a smart data forwarder. a router translates between ip subnets. Switches can't supply ip addresses. Routers can do dhcp.
since a switch can't do dhcp and most ISPs only give you one ip address putting a switch on the internet is like a tit on a boar - pretty useless. but since a router can take the one public ip address and translate it to a multitude of private ip addresses, this is what you want to do. |
|
#4
|
|||
|
|||
|
yes i did read it. just did not fully understand it, hince the post.
So switches are used to connect routers togeather....I thought you could connect 1 router to another router just with a cable? or is it some you can and some you cant? |
|
#5
|
|||
|
|||
|
You stumped me bud. I can't figure a way to tell you the information you are asking without writing a book. And there are already too many of those on the subject.
Home routing is elemental compared to business/internet routing. Yes you can connect a router to a router. That is what the internet is all about. But you can't do that with two home routers. How are you going to provide the adsl/cable/isdn/whatever signalling between the two routers wan interfaces? So the simplist explaination is yes you connect them together with a cable. This is not something you can do without considerable education and expense. This is not to be confused with connecting switches together which is usually done with a uplink port in each. You can connect the routers switch port to another switch to accomodate more access ports for you lan side. Do you get the difference between the two as I outlined and especially how it applies to your situation? Do you understand why you can't use a switch like a router? Or why it would be pointless to put a switch between a router and the internet connection? Perhaps you need to separate what hardware does from IP addressing. This is one of the main differences between a switch and a router. Router deals with Ip and a switch does not. |
|
#6
|
|||
|
|||
|
Quote:
I know routers give ip's to the connected pc's to ROUTE the incoming internet connection... and I think I know switches dont route ip's for an incoming internet connection... I know if you connect the two routers togeather by that cable, with windows configured properly (gateway ip's etc set correctly) that should work too.... but if you put a switch after a router to add more people to a network, the people behind the switch wont have internet access will they (at least not at the same time like people behind the router would)? Asking these questions is slowly helping me better understand these differences, thanks guys... |
|
#7
|
|||
|
|||
|
ok these are some of the most interesting explanations of a switch it actualy made me giggle hehe ( I meen no offense, seriously!).
anyway we will start with the NIC or network card it is a layer 2 device ( of the osi layer model ), the NIC does not understand TCP/IP and uses a hardware address ( MAC address ) that is burned into it that it uses to identify itself on the local network, to connect two computers you can use what is known as a cross-over cable this is a cable that has the transmit and recieve crossed so when device "A" sends data to device "B" the transmitted data will arive on device "B"'s recieve port and vise versa. ( straight through cable is 568B to 568B and cross-over is 568B to 568A standards using cat 5 or bettter cable ie.. enhanced cat5, cat6, cat7 ( cat3 is common phone cable just fyi )) anyway if you wanted to connect 3 computers together or more you cannot just cross wires so you use what is known as a hub ( this is used in star topology ethernet networks ) The NIC's on each computer will talk to the HUB using straight through cables ( known as patch cables, patch cables use stranded copper which are flexible for long runs or backbone runs you would use solid copper wire instead of stranded ), How the HUB works is basicly all computer connected to it are on the same collision domain ( think of them as on the same cable trying to take turns using it ) on ethernet networks you have what is known as CSMA/CD or carrier sense muti access / collision detection this will detect when two devices do talk at the same time which causes a packet collision ( the packets get scrambled making it unusable ) when it detects the collision of packets it will send a timeout to all computers on the network each computer will wait a random amount of time before it will retransmit its packets when it is the computers time to send data it will use a preamble which will look and see if the network is in use if it is not then it will send its data packets to the HUB the HUB will broadcast/send the packets out all of its interfaces all the computers that do not have the MAC address of the intended recipient will discard the packets the one that is the recipient will except it.( this is a waiste of bandwidth and if allot of computers are on a hub like say 100 of them you have a good chance of collisions causing a heavy slow down of the network) This brings us to a switch this is basicly a intelegent HUB that breaks up collision domains by knowing which port to send data to. How does it do this? good question, hehe. The sending computer "A" is on port 1 of the switch it sends data to recipient "B" that is on port 10 of the switch, when "A" goes to send its data to host "B" it will get its MAC address ( by ARP, WINS or other means) and then in the packet header it will place the recipients MAC address and send it to the switch, the switch seen the ARP reply from computer "B" and put its MAC address in its ARP table along with the port it heard the reply from which is port 10 now the switch will just send the packets out only port 10, while it is doing this it can still recieve packets from other computers if ports are busy or the switch is very busy it will buffer the other computers data packets. The point is there are no more collisions between the computers. However, the switch will still broadcast out all its ports any "broadcast" packets as the ports are all on the same LAN. This brings us to routers (used to be called gateways which are layer 3 devices of the OSI model). Routers connect LANs and seperate "broadcast domains" so lets say device "A" has IP address 10.0.0.1 whith a mask of 255.0.0.0 and it wants to see the web page at IP address 64.1.1.1 it will look at the address and mask and know it is not on the same LAN and not use MAC address but rather IP to send the packets it will send to its default gateway ( remember I said routers used to be called gateways ) it will get the MAC of the gateway/router send the packet to the switch the switch will look at its ARP table send the packet out the port the router is on "only" the router will get the packet see the recipients IP address ( remember routers are layer 3 and understand IP ) and forward it to the next router determined by its routing table ( routers have IP routing tables like switches have ARP tables ), the address 64.1.1.1 is on the internet which is nothing more then a bunch on LANs and WANs connected together ( when you do a trace you will see an AS# this is the BGP identifier that determines who owns which network ( you can do a whois to see who it is ), BGP is the routing protocol that ISPs and others use to tell other networks which networks they have and how to get to them. anyway when the packet reaches the 64.x.x.x router it will now use MAC address to get to the host 64.1.1.1 (just the reverse of how it got there. try and clear some things up here.. DHCP has nothing to do with routers, switches can do DHCP if the application is added. the router stated by GT3_DK is a router with a built in switch ( such as a linksys or d-link or various "home" model routers well the cisco 2520 has a built in HUB but o'well hehe), routers can be connected directly together or through switches this is why layer 2 protocols exist for routers such as PPP and HDLC and why modems exist. SIDE NOTE: I did this really quick and in the simplest form so dont you high end peeps try and flaim me here I do realize that routers can use switching technology, lets say MPLS or CEF and that switches can use upto layer 4 or higher technology and are used alot on the internet, ATM is switching technology for example, as well there are reasons for the 4000 and bigger catalyst switches that you can get routing engines for and the 3550 can do inter VLAN routing right out of the box hehe. Last edited by juniperr : August 4th, 2004 at 08:31 PM. |
|
#8
|
|||||
|
|||||
|
just realized you guys are posting while i was proof reading my last post hehe so changes where made LOL any way NICE to see you again wanderer2! I think I wrote that book for you LOL!
![]() Quote:
PCs dont route, the router does routing, the IP address and other info was given to the PC from a DHCP server which is an application running on your router/switch this could run on a PC, server, firewall, whatever you just happen to be using the one built into the router. Quote:
you can connect switches together no problem at all and all devices connected to them would have internet as if they where connected directly to the router. If you are asking if you connect a switch to a router lan interface then the router to a switch on its WAN interface well you wouldnt be adding more people to your network you would have two seperate networks. Quote:
The point of this switch is if you have a dedicated router ( a device that is just a router, what you have at home is a multi function device that is a router/switch/dhcp server/maybe a firewall/ web server all in one ) you would connect the router ethernet interface to the switch to give the additional 23 ports internet access, you can then connect one port on this to another one of these to give an additional 23 more hosts internet access and the ability to talk to all hosts on both switches. does a switch add security? well kinda, a HUB sends the data out all its ports so any PC connected through HUBS can see everything that all other PCs are sending so a sniffer could capture other peoples transmissions, remember when I said a switch only sends data out the one port to the revieving host? well now to capture other peoples transmissions you have to use either port mirroring (also called spanning) which will duplicate all packets from one switch port to your switch port with the sniffer or use ARP poisoning which poisons other computers ARP tables putting the sniffer hosts MAC address in all the other PCs ARP tables making them think it is all the other computers so they will send all data to the sniffer host that catures the data then forwards the data to the correct recipient. Mostly switches are used to break up collision domains to speed up networks though. Last edited by juniperr : August 4th, 2004 at 10:21 PM. |
|
#9
|
|||
|
|||
|
Whew after reading that I am tired. I think I will retire on this subject since Juniperr is SO verbose.
Except for one thing elementalwindx, not sure where you got the "I know if you connect the two routers togeather by that cable, with windows configured properly (gateway ip's etc set correctly) that should work too" but it doesn't work like that. If you had two routers [talking home stuff now] you COULD NOT connect the two. The best you could do is have one acting as a router and the other as a glorified switch. This is due to only one being able to have the wan interface plugged into the ISP. You can't plug the wan interface of one router into the switch of another. different signalling. If you have two isp physical connections you can have the two routers go into a single switch. One router would be one gateway address and the other router a second gateway address for the common lan. Oh and since the router can supply dhcp ip addresses the statement "but if you put a switch after a router to add more people to a network, the people behind the switch wont have internet access " is incorrect since since the router will supply them with ip addresses. Usually there is only one connection from the router to the switch when using a switch in the configuration. But Juniperr can take it from here! Go for it buddy! |
|
#10
|
|||
|
|||
|
I only write this much when Ive been drinking heavily I cant take it from here any further cause Im going to go pass out now :P .
wanderer2 I cant believe you actualy read that probably doesnt make any sense Ill double check tomarrow. |
|
#11
|
||||
|
||||
|
Quote:
lol... I didn't read it ![]() |
|
#12
|
|||
|
|||
|
damn this actually makes me want to take some advanced networking classes lol.
I do alot of home networking installs. more than I do business networking unfortunately, and the bigger networking structures is what I prefer to get into. Thanks guys. This weekend I have been learning how to use Kerio WinRoute Firewall 6 DHCP server to ICS computers off of either a hub or dlink cable/dsl router (not at the same time). I havn't noticed any diff of course between the two except the dlink is 100mbps and the hub is 10mpbs heh... oh and of course the people behind the firewall cant use services like AIM or Yahoo.. Still trying to figure out how to make that work and its not quite working. I can't find a way to make the program route the incoming responses back to the senders ip. even though theres an option under the source NAT that says "Translate to IP Address of outgoing interface" that does not work. ![]() well im dead tired, good night guys.. |
|
#13
|
|
|
|