Solved

What are the difference between gateway, firewall, router,switch and hub?

Posted on 2008-06-22
6
8,254 Views
Last Modified: 2008-09-20
Please explain what are difference between gateway, firewall, router,switch and hub?

Does a gateway can act as a router and vice versa?
Does a firewall  can act as gateway?
I know that we can make a PC as firewall and router. Is this same in the case of gateway. Does gateway use huge mainframe computers ? where it is implemented actually?
Does ISP ip address is gateway ip address?
 
0
Comment
Question by:jaisonshereen
  • 3
  • 3
6 Comments
 
LVL 28

Accepted Solution

by:
Jan Springer earned 500 total points
ID: 21841780
A router is a [layer 3] device that forwards packets based upon decisions in the routing table.

A gateway is an IP address to where packets are forwarded based upon routing rules.

A firewall is an application that protects an inside network from intrusions from the outside.

A switch is a [layer 2] device that switches packets between machines on a local area network. It may have multiple VLANs (virtual local area networks).  A switch allows each port to run at the defined speed independently.

A hub is a [layer 2] device that sends packets between devices on a local area network.  It is not manageable and it may run at the port speed of the lowest defined port.  Collisions are to be expected on a hub and max throughput of a hub if not as high as that of a switch.

Further, a device may act as a router, firewall and a switch.  All devices on an IP network will have an IP address, netmask and gateway.  

The IP address of your ISP should be your gateway [of last resort].
0
 

Author Comment

by:jaisonshereen
ID: 21841926
Thank for all explanations!

A router is a [layer 3] device that forwards packets based upon decisions in the routing table.
Can u explain what will happen to the routing table below?

A gateway is an IP address to where packets are forwarded based upon routing rules.
Is it mandatory to forward packets to gateway?

A switch allows each port to run at the defined speed independently.
What is the advantage in allowing ports to run in defined speed?

Collisions are to be expected on a hub.
You mean collision of packets? what will happen when collision occurs?Why it is happening?

The IP address of your ISP should be your gateway [of last resort].

IP address of ISP is something that happen the flow of packet to and fro. As you said in the second question(above) packets are only forwarded to gateway (not received) . So does it mean packet will pass to and fro through gateway?
0
 

Author Comment

by:jaisonshereen
ID: 21841943

[root@server ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.XX.XX.128    *               255.255.255.192 U     0      0        0 eth0
XX.XX.139.0     *               255.255.255.128 U     0      0        0 eth1
10.XX.XX.0        10.XX.XX.129    255.255.255.0   UG    0      0        0 eth0
XX.254.0.0     *               255.255.0.0     U     0      0        0 eth1
10.0.0.0        10.XX.XX.129    255.0.0.0       UG    0      0        0 eth0
default         XX.XX.139.1-sta 0.0.0.0         UG    0      0        0 eth1
[root@server ~]#

Open in new window

0
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

 
LVL 28

Expert Comment

by:Jan Springer
ID: 21841991
1) Your routing table identifies the networks that it knows about
      a) connected networks (via eth0 and eth1)
      b) static routes (your default gateway/route is out eth1)

2)  You must tell your network to where it should pass packets if it is not aware of where that IP address is located.  The default route says "send the packets out this interface to the other end so that the other end can forward the packets on because I don't know what to do with them."

3)  A typical newer switch port runs at 10M, 100M and 1000M.  If you have a mixed network (some 100M and some 1000M ethernet interfaces) you want to allow each interface to connect and pass traffic at its maximum port speed.

4) Yes, I mean collision of packets.  In a hub environment, particulary a busy one, you can expect to see collisions.  A collision requires the originating device to retransmit the packet.  If you have a busy hub and a lot of collisions, it will feel like you have a slow network because of the retransmissions.

5) Packets that are local to the device (other devices on the same local area network) will be transmitted via the hub or switch directly to each other.  Packets that are destined to other networks leave the interface specified as the default route and through which you will receive the returned responses.
0
 

Author Comment

by:jaisonshereen
ID: 21842322
2)  You must tell your network to where it should pass packets if it is not aware of where that IP address is located.  The default route says "send the packets out this interface to the other end so that the other end can forward the packets on because I don't know what to do with them."

In this case, if we don't know where the packets to be diverted, and it passed to other end so that the other end can forward the packets on because I don't know what to do with them, if this happeneds for entire devices ......and so on... there is a chance of go through wrong route and packet may not reach the destination ..right?
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 21842340
Only if something is not configured or configured incorrectly.

Devices without a routing protocol making a decision on where to pass the packet, send it further upstream via  default route until it hits a device that knows what to do with it.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello , This is a short article on how would you go about enabling traceoptions on a Juniper router . Traceoptions are similar to Cisco debug commands but these traceoptions are implemented in Juniper networks router . The following demonstr…
In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question