Link to home
Start Free TrialLog in
Avatar of jaisonshereen
jaisonshereen

asked on

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?
 
ASKER CERTIFIED SOLUTION
Avatar of Jan Bacher
Jan Bacher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jaisonshereen
jaisonshereen

ASKER

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?

[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

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.
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?
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.