A Network Topology Setup in which System A can ping to two Systems System B and System C but both these systems doesn’t ping to each other. (without using any security rule eg firewall etc)

Sangeeth Sahana D
3 min readMar 25, 2021

REQUIREMENT: A and B can connect to each other, A and C can connect to each other but B and C can’t connect to each other…

Where in my case : System A is — 190.168.0.111, System B is — 192.168.0.108 and System C is — 192.168.0.102

No need to configure anything in System A

SYSTEM B:

STEP 1:

Go to System B (192.168.0.108) and delete the 0.0.0.0 rule

route del -net 0.0.0.0

STEP 2:

ADD System A’s IP in the routing table

route add -net 192.168.0.111 netmask 255.255.255.255 gw 192.168.0.1 enp0s3

where enp0s3 is my network card name and 192.168.0.1 is my gateway name

STEP 3:

DELETE the range of your System C’s IP

route del -net 192.168.0.0/24 enp0s3

To view the route table use command → route -n

After running these commands your the route table would look something similar to this.

SYSTEM C:

Follow the same steps as System B

STEP1:

Go to System C(192.168.0.102) and delete the 0.0.0.0 rule

route del -net 0.0.0.0

STEP 2:

ADD System A’s IP in the routing table

route add -net 192.168.0.111 netmask 255.255.255.255 gw 192.168.0.1 enp0s3

where enp0s3 is my network card name and 192.168.0.1 is my gateway name

STEP 3:

DELETE the range of your System B’s IP

route del -net 192.168.0.0/24 enp0s3

To view the route table use command → route -n

After running these commands your the route table would look something similar to this.

Finally Let’s test our setup by pinging

System B to C and System B to A

Yess! B(.108) to C (.102) is unreachable whereas from B to A(.111) it’s pinging !!!

System C to B and System C to A

Yess! C (.102) to B(.108) is unreachable whereas from C to A (.111) it’s pinging !!!

At last let’s check with System A also

Yes Both the System’s are pinging fine!!!!

Thus the Requirement wherein System A connects to both System B and System C but System B and C should not ping each other is satisfied! and task completed successfully!

ThankYou!

--

--