Solved

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

Posted on 2008-06-22
6
7,984 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

There are two basic ways to configure a static route for Cisco IOS devices. I've written this article to highlight a case study comparing the configuration of a static route using the next-hop IP and the configuration of a static route using an outg…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
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…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now