Activity 2 Ece 583l

Embed Size (px)

Citation preview

  • 7/30/2019 Activity 2 Ece 583l

    1/4

    Functions of Routers, Switches, Hub and Bridge

    Hubs, Bridges, Switches and Routers are used to build networks. If you are trying to design yourown LAN (Local Area Network) at home, then you probably need to know what they do and the maindifferences between them. I will try to cover all that in addition to some networking details to cultivatethe article and provide better understanding of how the internet works. After all, always remember thatthe internet as you know it is nothing more than a network of networks. In an ethernet network there

    are 4 devices that from the the outside look very similar. In this article we will look at the differencebetween hubs, switches, bridges, and routers.

    HUBS

    Hubs are used to build a LAN by connecting different computers ina star/hierarchal network topology, the most commontype on LANs now a day. A hub is a very simple (ordumb) device, once it gets bits of data sent fromcomputer A to B, it does not check the destination,instead, it forwards that signal to all other computers

    (B, C, D) within the network. B will then pick it upwhile other nodes discard it. This amplifies that thetraffic is shared.

    There are mainly two types of hubs:

    1. Passive: The signal is forwarded as it is (so it doesnt need power supply)2. Active: The signal is amplified, so they work as repeaters. In fact they have been called multiportrepeaters. (use power supply)

    Hubs can be connected to other hubs using an uplink port to extend the network.

    OSI Model: Hubs work on the physical layer (lowest layer). Thats the reason they cant deal withaddressing or data filtering.

    A hub is the simplest of these devices. Any data packet coming from one port is sent to all other ports.It is then up to the receiving computer to decide if the packet is for it. Imagine packets going througha hub as messages going into a mailing list. The mail is sent out to everyone and it is up to thereceiving party to decide if it is of interest. The biggest problem with hubs is their simplicity. Sinceevery packet is sent out to every computer on the network, there is a lot of wasted transmission. Thismeans that the network can easily become bogged down. Hubs are typically used on small networkswhere the amount of data going across the network is never very high.

    SWITCHES

    Switches on the other hand are moreadvanced. Instead of broadcasting theframes everywhere, a switch actuallychecks for the destination MAC addressand forward it to the relevant port to reachthat computer only. This way, switchesreduce traffic and divide the collisiondomain into segments, this is very sufficient for busy LANs and italso protects frames from being sniffed by other computers sharing the same segment.

  • 7/30/2019 Activity 2 Ece 583l

    2/4

    They build a table of which MAC address belongs to which segment. If a destination MAC address isnot in the table it forwards to all segments except the source segment. If the destination is same asthe source, frame is discarded.

    Switches have built-in hardware chips solely designed to perform switching capabilities, therefore theyare fast and come with many ports. Sometimes they are referred to as intelligent bridges or multiportbridges. Different speed levels are supported. They can be 10 Mb/s, 100 Mb/s, 1 Gb/s or more.

    Most common switching methods are:

    1. Cut-through: Directly forward what the switch gets.2. Store and forward: receive the full frame before retransmitting it.

    OSI: Switches are on the data link layer (just above physical layer) thats why they deal with framesinstead of bits and filter them based on MAC addresses. Switches are known to be used for theirfiltering capabilities.

    VLANs (Virtual LANs) and broadcast domains: Switches do not control broadcast domains by default,however, if a VLAN is configured in a switch it will has its own broadcast domain.

    *VLAN is a logical group of network devices located on different LAN physical segments. However theyare logically treated as if they were located on a single segment.

    A switch steps up on a bridge in that it has multiple ports. When a packet comes through a switch it isread to determine which computer to send the data to. This leads to increased efficiency in thatpackets are not going to computers that do not require them. Now the email analogy has multiplepeople able to send email to multiple users. The switch can decide where to send the mail based onthe address. Most large networks use switches rather than hubs to connect computers within the samesubnet.

    BRIDGES

    Bridges are used to extend networks bymaintaining signals and traffic. A bridgegoes one step up on a hub in that it looksat the destination of the packet beforesending. If the destination address is noton the other side of the bridge it will nottransmit the data.

    A bridge only has one incoming and oneoutgoing port. To build on the email analogy above, the bridge is allowed to decide if the messageshould continue on. It reads the address [email protected] and decides if there is a [email protected] onthe other side. If there isnt, the message will not be transmitted. Bridges are typically used to separate

    parts of a network that do not need to communicate regularly, but still need to be connected.

    OSI: Bridges are on the data link layer so in principle they are capable to do what switches do like datafiltering and separating the collision domain, but they are less advanced. They are known to be used toextend distance capabilities of networks.

    In a comparison with switches, they are slower because they use software to perform switching. Theydo not control broadcast domains and usually come with less number of ports.

  • 7/30/2019 Activity 2 Ece 583l

    3/4

    ROUTERS

    Routers are used to connect differentLANs or a LAN with a WAN (e.g. theinternet). Routers control bothcollision domains and broadcastdomains. If the packets destination is

    on a different network, a router isused to pass it the right way, sowithout routers the internet could notfunctions.

    Routers use NAT (Network Address Translation) in conjunction with IP Masquerading to provide theinternet to multiple nodes in the LAN under a single IP address. Now a day, routers come with hub orswitch technology to connect computers directly.

    OSI: Routers work on the network layer so they can filter data based on IP addresses. They have routetables to store network addresses and forward packets to the right port.

    A router is similar in a switch in that it forwards packets based on address. But, instead of the MACaddress that a switch uses, a router can use the IP address. This allows the network to go acrossdifferent protocols. The most common home use for routers is to share a broadband internetconnection. The router has a public IP address and that address is shared with the network. When datacomes through the router it is forwarded to the correct computer.

    This comparison to email gets a little off base, this would be similar to the router being able to receivea packet as email and sending it to the user as a fax.

    Others:

    Gateways are very intelligent devices or else can be a computer running the appropriate software to

    connect and translate data between networks with different protocols or architecture, so their work ismuch more complex than a normal router. For instance, allowing communication between TCP/IPclients and IPX/SPX or AppleTalk.

    OSI: Gateways operate at the network layer and above, but most of them at the application layer.

    P.S. The term Gateway is used to refer to routers in some articles so beware. In this case, the routerhas gateway software. And Default Gateway is used to refer to the node (e.g. router) connecting theLAN to the outside (e.g. internet).

    Repeaters are simple devices that work at the physical layer of the OSI. They regenerate signals (an

    active hub does that too).There is an important rule to obey while using repeaters/hubs to extend a local network and is calledthe 5-4-3 rule or the IEEE way. The rule forces that in a single collisi on domain there shouldnt be morethan 5 segments, 4 repeaters between any two hosts in the network and only 3 of the segments canbe populated (contain user connections).This rule ensures that a signal sent over the network will reach every part of it within an acceptablelength of time.If the network is bigger, the collision domain can be divided into two parts or more using a switch or abridge.

  • 7/30/2019 Activity 2 Ece 583l

    4/4

    A = HUB

    B = BRIDGE

    C = ROUTER

    D = SWITCH

    Typical Connection of a Hub, a Bridge, a Switch and a Router

    Bridge, Hub, Switch and Router in a Network

    Conclusion

    What have been introduced so far are the main traditional devices used to build networks,understanding how they work helps to understand the logic behind networks designing, however, nowthat technology advance quickly, it is possible to find new products in the market combining two ormore of these devices into one.

    Examples are:

    - Brouter: Works as a Bridge and as a Router.- IP Switch or MultiLayer Switch (MLS): New switches with routing capabilities, they forward data basedon IP addresses, workat the network layer too.