Question : Difference between Router,Hub,Gateway,Subnet,<wbr />AP

Can anyone tell me the difference between the following and what it does and in which situation it is useful in brief.

1)Router
2)Hub
3)Gateway
4)Subnet
5)AP

please tell me in a network we will use all of these.

please make me clear about these topics.


thanks in advance.

Answer : Difference between Router,Hub,Gateway,Subnet,<wbr />AP

Hi dinesh,

I will try and answer this in a way that helped me make my concepts clearer. Also I will reorder the way in which i answer the points coz a understanding of subnet will definitely help clear up what a hub/switch/repeater does.

SUBNET
---------

Basically when IP addressing was created (back in the days of ARPANET), the inventors quickly found out that centrally controlling the division of IP addresses would make the situation very unmaintanable. So they decided to given the different organizations (govt, private, mil, or whatever) the ability to lay out their network the way they wanted.

So basically they allocated a Class B or Class A or Class C IP netblock to a organization and what the org does with the allocated IP addresses is their concern. So a company like AOL would be allocated a IP block like 152.168.0.0 (class B) and then AOL would be able to deciede how to further subdivide the block.

So a SUBNET would be just one network block of IP addresses who share a common "NETWORK ID"

For example, for a class B address of 152.168.44.45, the network ID is 152.168.0.0 and thus would identify the subnet.

Also it is a common feature of subnet that all the IP addresses (remember differing Host ID but same Network ID) would be able to reach any other node in the same "subnet" simply by using a procedure called ARP (Address Resolution Protocol.) For a detailed discussion see this: http://www.experts-exchange.com/Networking/Q_21182517.html

What ARP basically does is map IP addresses to MAC (Hardware) addresses that NIC (LAN cards) understand and thus can be physically reached. Physically reached means that they are on the same physical network segment interconnected by:

- cross over cables,
- hubs
- switched
- repeaters
- FDDI ring,
- frame relay, etc.

So if a computer on a subnet wanted to reach another computer on the same "subnet", it would invoke ARP to map the destination IP address to the actual MAC address and the ask its NIC to send the frame to the NIC with the specified MAC address (the NIC acts like a mail man, the dest MAC address like the apartment number and the frame as the 'snail mail') The salient point is that for ARP to work the dest IP address must be in the same subnet otherwise it would not get the request for the MAC address.

So if communication across subnets is required, then we use a --->

ROUTER (or interchangibily used GATEWAY)
----------

A router has the ability to route packets across different subnets. For example lets connect two "made-up" subnets to our router (R):

N1: 10.200.0.0/16 (/16 speifies that the network mask is 255.255.0.0 which andded with the IP address gives the net id)
N2: 10.201.0.0/16

So intra-subnet communication takes place using ARP and the router is not involved in any way. However for inter-subnet communication we need that all the nodes in the src subnet use the router as there default gateway. So if they see that they have to send a packet to another subnet, they will instead direct the packet to the router (gateway.)

A very subtle point is that the router (gateway) must be present in the same subnet as the src subnet because otherwise the src node would not be able to send the packet to the router.

Ex: Let the router R have IP address 10.200.0.1 for network N1. A host H1 (10.200.0.2) wanting to send data to H2 (10.201.0.2) would need to go via a router (R) and thus would need to have direct access (i.e. using ARP) to the R in the first place.

Usually the router is placed in the multi-homed configuration. That means the router has a IP address in more than one subnet. THis is the general scenrio. Obviously exotic situation are possible. Therefore in our example above, the router R would have two ip addresses in the two subnets (N1 and N2) it connects like so: 10.200.0.1 for N1 and 10.201.0.1 for N2. The nodes in N1 and N2 would specify the appropiate address as the default gateway to able to communicate across subnets.

Also there is nothing preventing routers from doing packet filtering. Infact, this is almost a essential feature of even the lowest end routers. Usually the routers performs NAT, FIREWALLING (i.e. packet filtering.) and loads of other features.

Hope this clears up the router part. But the router only help in inter-subnet communication, but how to achieve proper intra-subnet networking. For that we use:

HUB AND SWITCH
---------------------

Basically the HUB and SWITCH perform the same operation. But i will beg to disagree with the posts above mine as they give a wrong idea of what they do.

Basically the HUB has many ports and the only job it performs is that it replicated what it gets on one port on all other ports. So the collision domain is "single" meaning that if H1 wanted to communicate to H2 and H3 ---> H4 and all four were connected to the same hub a collision would occur. So basically we are sharing the bandwidht (10 Mbps or 100 Mbps) with all the connected nodes as simultaneous transmission via 2 streams is made impossible.

Smart engineers decieded to allevate the problem and made the hub smarter and introduced the concept of multiple-collision domains. Basically what it means is that the above scenario H1 --- > H2 and H3 ----> H4 is made possible as the data H1 sends to H2 will only appear at the port H2 is connected to and same for H4. Thus full utilization of the bandwidth can be made. Typical highend switched are complete systems in themshelves utilizing Microprocessors and Operating Systems (like Cisco Catalyst or IOS.)

So although they perform the same function, SWITCH does a much better job at it. Also, they didnt stop at that. They made the switches capable of much more and introduced features like VLANs (ability to host multiple separate subnets in the same switch.)

BUT BUT BUT, if we wanted to increase the geographical area covered by LAN then we would use a:

REPEATOR
------------

Basically the repeator is like a HUB but it is used to signal recreation. It is a active HUB. It collects all the bits together and then regenerates them before transmitting so signal quality is not lost. A typical CAT 5 cable has the physical limitation of being able to maximum go to 100 m length. This is because as the length decreases signal is lost due to resistance. So by introducing a repeater we would be able to extend the LAN segment ever further. Remember that REPEATORS connect the same SUBNET together, where as ROUTERs connect different subnets.

Salient point: We can use a maximum of 4 repeators in a particular LAN sengent. After all this is called a Local AN. If you want to go beyond that then use MAN or the Internet (a WAN.)

ACCESS POINT
-----------------

THis word has multiple meanings in multiple contexts. THe most basic meaning would be a physical connected (MIC) which allows you to tap into the network segment. Also Access Points are referred in relation to Wireless LANS where access points refer to the hubs which are radio capable.

A quick search of google will reveal many answers.

Hope this helps.

Do post back for any clarifications.

Cheers,

Karan
Random Solutions  
 
programming4us programming4us