• jcnetworking
  • LONDON
OTHERS
What is Switch ? Router? Why we need Default Gateway?

What is Switch ? Router? Why we need Default Gateway?

WHAT IS SWITCH

Start from Small size company, 3 peoples ( HR, Accounting, Sales ) + yourself

  • You just want to share your resources with different department
  • In this case, you can use SWITCH to connect each computers.
  • Statically given IP address to PC

By Default , all port is VLAN 1 on the switch. No configuration is required on Layer 2 switch. Once you have given ip address to your computer, each computer can ping each other as figure 1.2.

Figure 1.1
Figure 1.2

WHAT IS ROUTER

After few months, company business is getting well

Hiring more employees, adding 2 more switch, Share file Storage Server

  • A DHCP Server , File Server, additional switch and few computers has been added to 1/F
  • Now we can setup DHCP Server, Dynamically assign IP address to Clients

Now boss doesn’t want anyone can access HR & Accounting department resource. But only himself to reach to all resource.

With VLAN we can achieve, but the problem is DHCP Server sitting at 1 Network. It is unable to talk to other network.

Figure 2.1

ROUTER

In this case, We need to add 1 Router in the infrastructure and create different VLAN which belong to different department.

  • on Router enable inner VLAN & also enable DHCP for different VLAN
  • Switch to router / Switch to switch, ensure switchport is Trunk port

on Figure 2.4, we can see that different network PC which is able to speak with others. Also they can obtain IP address by DHCP through the Router.

Router is playing a role here, it can route different network to the destination.

Figure 2.4
Figure 2.2
Figure 2.3

WHY WE NEED DEFAULT GATEWAY

On Figure 2.4 above, when HR PC ping to Accounting PC. It is required Default gateway, as it is a different network. The PC doesn’t know where it is.

When we setup DHCP Server and its network, We will input default gateway & DNS as well. So when the PC doesn’t know about that network, the traffic will go to the Router. The router will sort it out.

IF we go to google 8.8.8.8 on Figure 3.2. It is unable to reach, “request time out”. on Figure 3.4, It is shown as unrouteable. Google network doesn’t know how to go 192.168.40.0/24 network.

After we added a IP route on the router. on Figure 3.5, Now we can reach out google.

Figure 3.1
Figure 3.2
Figure 3.3
Figure 3.4
FIgure 3.5

Leave a Reply

Your email address will not be published. Required fields are marked *