Create a Network Topology using Routing Table Rules

In this article I am going to Create a network Topology Setup in such a way so that System A can ping to two Systems System B and System C but both these systems should not be pinging each other without using any security rule e.g firewall etc
Step to follow:
This is System A in which the default IP address is 192.168.1.8

Now I will change the IP Address to 192.168.1.1 with Netmask of 255.255.255.0 using command:
ifconfig enp0s3 192.168.1.1/24

Now you can see the IP is changed from 192.168.1.8 to 192.168.1.1

Now we will add a rule inside routing table that will help us to get the connectivity to System B and System C. so that we can ping them.
We will see the result at last by pinging EACH system.
Using the below command:
route add -net 192.168.1.0 netmask 255.255.255.252 gw 0.0.0.0 enp0s3

As you can see in the above picture our routing rule is added successfully
System B:
This is System B in which the default IP address is 192.168.1.5

Now I will change the IP Address to 192.168.1.2 with Netmask of 255.255.255.0 using command:
ifconfig enp0s3 192.168.1.2/24

Now you can see the IP is changed from 192.168.1.5 to 192.168.1.2

Same as i did inside the system A I have added rule inside routing table that will help us to get the connectivity to System A but we cannot ping to system C.
route add -net 192.168.1.0 netmask 255.255.255.254 enp0s3
We will see the result at last by pinging EACH system.
System C:
Now comes the system C , we have to follow the same procedure as we did on the above systems A and B.
Change the Default IP with netmask 255.255.255.0:
ifconfig enp0s3 192.168.1.3/24

Now it’s time to add the rule inside routing table:
route add -net 192.168.1.0 netmask 255.255.255.254 enp0s3
Testing TIME:
we will test the connectivity of each system by pinging:
The blue color terminal is the system A that we have setup in such a way that it can ping to system A and B both.
It is But obvious that if A can ping to B and C , so they can ping back to A too.
IP of system A : 192.168.1.1
IP of system B: 192.168.1.2
IP of system C: 192.168.1.3

System A can Ping System B

SYSTEM A can also ping SYSTEM C
