Results 1 to 12 of 12
  1. #1
    Join Date
    Jun 2003
    Posts
    352

    router and switch

    Alright I have always wanted to know the diffrence so I will ask. It may be a stupid question, but this is something I need to know. anyhow


    what is the diffrence between a router and a switch? does a switch limit bandwidth per system? If you guys explain this to me it would be alot of help. thanks

  2. #2
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    HEres something I have been doing for my self, a little like guide to networking and what not, I have copied and pasted the hub, bridge, switch and router stuff out, it will give you a nice little understanding of them (an overall understanding)

    Please note: I have added info about a repeater, hub and bridge as it helps understand about a switch and semi router

    Regards

    DislexiK
    Last edited by Unknown_User; 03-01-2004 at 07:40 PM.
    "You don’t learn to hack, you hack to learn"

  3. #3
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Repeater:

    A repeater is a device used to extend a cable runs length, by this I mean, Category 5 cable maximum cable run is 100m, in order for this to be longer (from one node to another) the signals need to be retimed and regenerated, so attenuation does not occur (loss in signal strength). This is what a repeater does.

    However this is only what a repeater does, they do not increase collision domains (segment a network), and they do not filter traffic nor learn anything regarding traffic. It is almost known as a “dumb” device.

    There is a rule which must be followed however with repeaters: the 5-4-3 rule and it goes like this:
    • Only 5 network segments can be connected end to end
    • Using 4 repeaters
    • And only 3 of those segments can have hosts (nodes) on them

    The following image may make the above statement more clear:

    (Look At Attached File)

    Repeaters operate at level 1 of the OSI, this means that they only deal with “bits” regarding data, they have nothing to do with packets or frames, MAC addresses or IP addresses – like previously said, they do not filter traffic, to filter traffic you would need to know a few of the previously discussed information.

    Repeaters have 2 ports, in and out, the first port will be the data that is being sent to the repeater to be retimed and regenerated, the second port being the port which the retimed and regenerated signals are sent out of.
    Last edited by Unknown_User; 03-01-2004 at 07:42 PM.
    "You don’t learn to hack, you hack to learn"

  4. #4
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Hub:


    A hub is generally a multi port repeater. They are often used as the central node in a star or extended star topology; this is because each host on the network has a separate cable to the hub, if one cable fails each all other hosts are still able to communicate with one another.

    There are two types of hubs, active and passive, an active hub is one you supply power to and it like a repeater regenerates and retimes signals.
    A passive hub however does not have power, it does not regenerate nor retime signals but is does allow for a central point for a star or extended star topology.

    The next differences between hubs is whether or not they are intelligent, or dumb, dumb hubs do what I have basically described above, retime and regenerate signals, however intelligent hubs allow you to “configure” the them to “filter” traffic, however at this state a switch would be preferable.

    Hubs “broadcast” data to all ports; this can be a security hazard as unauthorised users may “listen” on the network for significant data. On top of this, they share there bandwidth between ports, for example if a hub is 10/100Mbps, it allows for 100Mbps bandwidth. If there are 10 ports, and each port is sending the same rate of data through it, they will only have 10Mbps throughput each.

    Due to the “not so complex” architecture of a hub, they are not greatly expensive, which makes them good for a central point of a star network if the developer cannot afford a switch, or if they just need to extend cables, such a device is perfect.

    Overall hubs are cheap, extend cable runs and allow for a central node in a star topology network. However they only regenerate and retime signals, they do not create a network segment or increase collision/broadcast domains nor filter traffic.
    "You don’t learn to hack, you hack to learn"

  5. #5
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Bridge:


    A bridge is where intelligence starts appearing in devices, the idea of a bridge is to connect two networks/segments together or to actually segment a network.

    Unlike a bridge they work at layer 2 of the OSI, so they deal with “frames” not “bits”, this allows for “filtering” of traffic.

    Basically a bridge keeps local traffic local, and sends other data out, and prevents data that is not needed from entering a segment, it does this by learning what is at each port of the bridge. Following is a scenario that allows for easy understanding:

    Learning:

    Take a look at: http://www.scit.wlv.ac.uk/~jphb/comms/bridges.html for diagram, did my own bug buggers up in here

    The above diagram represents 3 bridges, as you can see, data can be sent from one LAN/segment to another and the bridge can deal with the frame while the bridge deals with traffic travelling in its own LAN/Segment.

    For example:
    B1 can sent a frame down port 2 to B2’s port 1, while B2 checks the frame to see if it relates to any host MAC addresses on its on LAN/segment H1 can send data to H2 or 3, or in any matter.

    Bridges “learn” where hosts are on the network by using a not so complex system. Let’s say host (X) wishes to send data to host (Y), Host (Y) sends a frame to the bridge, the bridge notes down hosts (X) details in its MAC address table noting that it is at port 1, however the bridge that the frame is to go through (B1) is not sure what LAN/segment that host (X) is on. If this is the case bridge B1 sends the frame down all its ports except port 1 as this is where the packet originated from.
    The packet is transmitted through ports 2, 3 and 4 of bridge B1. Bridge B2 receives the frame from (X) through port 1, B2 writes in its table the location of host (X), which is through its own port one. B2 does not know the location of host (Y) so it broadcasts the frame through ports 2, 3 and 4 (not port 1 as this is where the frame come from). Host (Y) receives the frame. When host (Y) sends a response to host (X) the frame will go through Bridge B2, so Bridge B2 learns where host (Y) is, then as bridge B2 already knows which port host (X) is it sends it through port 1 to Bridge B2, Bridge B2 learns where host (Y) is (Through port 2) because this is where the frame come from. B1 already knows where host (X) is so sends the frame down port 1

    Ports that frames are sent out of to another segment are known as a remote port, other ports used are local.

    As described above, bridges “learn” about nodes at each port through MAC addresses (Media Access Control), also known as physical address, this is because a MAC address cannot change and is “burnt” into the NIC of a host.

    Due to what a bridge does, effectively segments are more secure as unauthorised hosts on other segments will not be able to see the frames unless the frame is sent out from being local.

    Bridges lower collisions; this is because unnecessary traffic is not going through segments, so less traffic is passing through segments meaning less chance of data colliding.

    Bridges are effectively slower than switches

    Bridges like hubs share there bandwidth between ports, on top of this, until a bridge knows what is at each port, it broadcasts frames and also if it does not know where a specific “host” is it will again broadcast the frame until it knows where that “host” is, from then on when a frame is sent through the bridge to that host, it will only be sent to that host and not broadcast.

    Overall bridges are a good method of creating segments; effectively they are cheaper than switches (as a switch contains a bridge) however they do not lower broadcasts
    "You don’t learn to hack, you hack to learn"

  6. #6
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Switch:


    Switches are very much like multi-port bridges with a hub however with some significant differences.

    Firstly switches are relatively faster than bridges, and they do not broadcast frames to all ports. They are able to handle heavier loads than that of a bridge, meaning more traffic can be sent to them and dealt with quicker and more effectively than a bridge can without falling over.

    Secondly unlike a hub and a bridge, switches do not share the bandwidth between ports; each port has the same potential bandwidth that every other port does, for example if the switch has 8 ports, and is 10/100Mbps each port is viable to transfer data at 100Mbps.

    Switches allow for data to be sent back and forth between hosts and switch simultaneously. However without a switch, data can only be sent one way at a time. This is called full duplex, hubs are only half duplex.

    Switches lower collision domains, however hubs increase them, this is because a hub only retimes and regenerates signals. Switches break networks into segments, keeping local traffic local. They tend to lower the amount of nodes on a single segment.

    Overall the idea of a switch is to act like a bridge and hub, while switching frames from incoming ports, to outgoing ports. Nowadays they are not much more expensive than a hub, and many prefer switches over hubs for the information outlined above regarding switches and bridges.
    "You don’t learn to hack, you hack to learn"

  7. #7
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Router:


    Routers compared to hubs, bridges and switches are very intelligent devices, like switches and bridges they route information based on addresses, however not MAC but IP (Internet Protocol, or logical addresses). They are widely used as WAN devices due to the intelligence.

    Because routers route packets (not frames) based on IP addresses, they are able to interconnect different LAN technologies (Ethernet, Token ring, FDDI etc), this is because packets are as standard, however frames change depending upon the protocol used. Due to routing packets based on IP addressing routers can/are used for connection to the World Wide Web.
    Also due to the routing of based on IP Addresses, routers are able to determine where to send packets cased on network addresses, so if there are 3 connections to the router, all separate networks, 192.168.0.0, 192.168.1.0, 192.168.2.0 and a packet is sent from another networking to the IP address: 192.168.1.5 then its obvious that the packet is to be sent down the port representing 192.168.1.0. However the routing of data is by far more complex than this, however this is to explain the advantages, and disadvantages to devices.

    Like switches and bridges routers lower collisions, however they also lower broadcasts, they are able to do this

    Routers, unlike switches have a “best path” selection method of transferring packets, this means that routers not only send packets to the correct location but actually find the best path through the network; this can make transferring of data quicker through a network.

    Routers often have build in firewalls, also know as hardware firewalls, these stop unwanted traffic, unwanted pinging and reduce the rate of Denial Of Service attacks (these are where multiple people access computers (intestinally) at a high rate to crash the server or use its bandwidth allowance. (Usually within the tens/hundreds of thousands of hits a second). So firewalls allow for an extra line of security, making this device a good asset to networks.

    Routers increase broadcast domain/lower broadcasts, they do this because when a packet is sent to them and they do not know where it needs to go, they discard it.

    Overall routers are very intelligent devices and used in Wide Area Networks more than LAN, however they are often used in LAN due to the fact some have hardware firewalls. Routers however are by far more expensive than switches (predicting you would buy a router with 4 ports and a switch with 4 ports etc), hence the reason in a situation such as a star topology, switches or hubs are used (mainly switches)
    "You don’t learn to hack, you hack to learn"

  8. #8
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Ok guys, its not the greatest data in the world, however it helps me understand things, therefore should help others. It is copyrighted:

    Copy right: 2004 Dislexik.com



    And lastly, regarding routers and switches, there is lots more to them, however this should give a nice little base ground to what they are and there differences - but honestly Routers are fasinating however complex and not the easiest things to learn about...

    Let me know what you think of the info I gave and whether it helped or not

    Regards

    DislexiK
    "You don’t learn to hack, you hack to learn"

  9. #9
    Join Date
    Jun 2003
    Posts
    352
    Thanks alot, I am trying to setup a couple servers just for testing (I am young and trying to learn.) right now I have my servers hooked up to a router, but was thinking of using a switch.

  10. #10
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Router effectivley is the way to go if you are connectong the servers to the Internet, it will filter/route the packets for you, and they general have a hard ware firewall built in, therefore more security for you.

    I am also young and learning, however I tend to write all the stuff I learn down, hence the reason it would take you 1 week to learn something it would take me 4 weeks - and of course my difficiencies in learning etc but we do not like to talk about that do we my precious

    Regards

    DislexiK
    "You don’t learn to hack, you hack to learn"

  11. #11
    Join Date
    Jun 2003
    Posts
    352
    I will be colocating a box soon, I should use a switch then correct?

  12. #12
    Join Date
    Jan 2004
    Location
    /home/dislexik
    Posts
    820
    Wel lyeah if your planning on having more than one and it will allow you to "group yours together" and segment yours, keeping local traffic local and what not, however a router would do a greater job, and as your colocating, think about getting a hardware firewall - that will be a hell of a line of security for you

    Regards

    DislexiL
    "You don’t learn to hack, you hack to learn"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •