Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9045
  • Last Modified:

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

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
jaisonshereen
Asked:
jaisonshereen
  • 3
  • 3
1 Solution
 
Jan SpringerCommented:
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
 
jaisonshereenAuthor Commented:
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
 
jaisonshereenAuthor Commented:

[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
Improved Protection from Phishing Attacks

WatchGuard DNSWatch reduces malware infections by detecting and blocking malicious DNS requests, improving your ability to protect employees from phishing attacks. Learn more about our newest service included in Total Security Suite today!

 
Jan SpringerCommented:
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
 
jaisonshereenAuthor Commented:
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
 
Jan SpringerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now