Creating a custom network topology.

Harshil Shah
3 min readMar 27, 2021

Creating 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 able to ping each other without using any security rule e.g. firewall etc.

You can refer to one of my article regarding network setup by below link 👇🏼

In this article I will use three systems, system A,B and C. Where system A can ping both systems but system B and C can not ping each other. In other words, system A has connectivity to both B and C, but B and C does not have connectivity with each other.

System A’s IP address is → 192.168.1.11

System B’s IP address is → 192.168.1.14

System C’s IP address is → 192.168.1.15

Note: I will change IPs of all three systems just for sake of current practical.

System A’s details and it’s route table 👇🏼

Changing IP of system A to 192.168.1.1

And adding new and only network rule to route table

route add -net 192.168.1.0/24 enp0s3

System B’s details and it’s route table 👇🏼

changing it’s IP to 192.168.1.4 and adding new rule to route table that can only ping to system A

route add -net 192.168.1.0/31 enp0s3

System C’s details and it’s route table 👇🏼

changing it’s IP to 192.168.1.5 and adding new rule to route table that can only ping to system A

route add -net 192.168.1.0/31 enp0s3

Now let’s ping system A-B and vice versa. Left image shows connection from A → B and right image shows connection from B → A. 👇🏼

(left image) - A →B and (right image) - B →A

Now let’s ping system A-C and vice versa. Left image shows connection from A → C and right image shows connection from C→ A. 👇🏼

(left image) — A →C and (right image) — C→A

Now let’s ping system B and C with each other 👇🏼

B →C (left image) | C →B (right image)

So here as you can see B and C systems are unable to connect to each other but are able to connect to system A individually.

So finally we have achieved following network topology 👇🏼

Thank you for reading. Hope you learned something new 👍🏼😄

--

--