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 pinging each other without using any security rule, eg firewall etc

This Task is an very interesting Task ,which can be used in many types of used case, We need to be well versed with concept of Network Name, Netmask, and Routing Table ,etc

Prasantmahato
4 min readDec 14, 2020

--

I have done this practical in same network or same range ,As we know If there are many systems in same Network and in order to connect those systems to each other ,We need switch for connecting same networks .

Here I am using Oracle Virtual box and this virtual box gives us pre-created switch , So if we want to attach that switch to VM .We have to go VM setting and in sub heading of network there We just need to select the Option Host only . Same I did for rest of my VM.

Attaching Switch

What actually I did …

In System A ,

System B and System C would be in the same network. To ensure this I created a network and then I created a Routing Table in such a way that System A can create packets only for 2 IP’s that will be assigned to System B and System C

Creating IP 192.168.30.1 with range /24 or 255.255.255.0

Commands used :

ifconfig enp0s3 192.168.30.1/24 and ifconfig enp0s3

Creating a new IP for System A

Now ,Creating a new rule for the network card enp0s3 in the Route Table. It will allow to create packets only for 2 IP’s.

Commands used :

route add -net 192.168.30.0/30 enp0s3 and route -n

Creating a new rule in the Routing Table .

In System B ,

I created IP (192.168.30.2)which remains in the range of System A and also I created Routing Table in such a way that System B can create packets only for one IP ,ie System A

Creating IP 192.168.30.2 with range /24 or 255.255.255.0

Commands used :

ifconfig enp0s3 192.168.30.2/24 and ifconfig enp0s3

Creating a New IP for System B

Creating a new rule for the Network card enp0s3 in the Route Table. It will allow to create packets only for 1 IP.

Commands used :

route add -net 192.168.30.0/31 enp0s3 and route -n

Adding a new rule .

In System C ,

I Created IP (192.168.30.3)which remains in the range of System A and also I created Routing Table in such a way that System C can create packets only for one IP ,ie System A

Creating IP 192.168.30.3 with range /24 or 255.255.255.0

Commands used :

ifconfig enp0s3 192.168.30.3/24 and ifconfig enp0s3

Creating a new IP for System C

Creating a new rule for the network card enp0s3 in the Route Table. It will allow to create packets only for 1 IP.

Adding a new rule .

Now we have ,

System A — 192.168.30.1

System B — 192.168.30.2

System C — 192.168.30.3

Now testing my Setup

System A

First pinging to System B (192.168.30.2) from System A (192.168.30.1)

We can easily ping from A to B

Command used :

ping 192.168.30.2

Pinging from A to B

Pinging from System A (192.168.30.1) to System C (192.168.30.2)

We can easily ping from A to C

Command used:

ping 192.168.30.3

Pinging from A to C

System B

First pinging from System B (192.168.30.2) to System A (192.168.30.1)

We can easily ping from B to A

Command used:

ping 192.168.30.1

Pinging from B to A

Pinging from System B (192.168.30.2) to System C (192.168.30.3)

I can’t ping from B to C

Command used:

ping 192.168.30.3

Pinging from B to C

System C

First pinging from System C(192.168.30.3) to System A (192.168.30.1)

We can easily ping from C to A

Command used:

ping 192.168.30.1

Pinging from C to A

Pinging from System C (192.168.30.3) to System B (192.168.30.2)

I can’t ping from C to B

Command used:

ping 192.168.30.2

Pinging from C to B

Here I successfully created the Topology that I explained in the Top of my Heading .

Thankyou

Open for queries and suggestions .

--

--

No responses yet