π° 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.
For archive this high level setup we need to configure all of three systems.
So lets Start with system A:-
First we check the IP address and routing rules of system A which is provided by the system By default.
ifconfig ens160
route -n
Now we change the IP address of System A :-
ifconfig ens160 192.168.80.1/24
Here ens160 is my OS network card name and 192.168.80.1 is the New IP of this system /24 is for set the netmask value as β255.255.255.0β
We also need to add the new routing rule for this system for this we use CMD:-
route add -net 192.168.80.0/30 ens160
This route rule say that, System A only connect to other system with the IP range β192.168.80.1β to β192.168.80.3β
Here IP β192.168.80.0β is reserved for the Network Name.
/30 means that the netmask value for this network is β255.255.255.252β
Now Start Configuring the system B:-
First we check the IP address and routing rules of system B which is provided by the system By default.
ifconfig ens160
route -n
Now we change the IP address of System B:-
ifconfig ens160 192.168.80.2/24
Here ens160 is my OS network card name and 192.168.80.2 is the New IP of this system /24 is for set the netmask value as β255.255.255.0β
We also need to add the new routing rule for this system for this we use CMD:-
route add -net 192.168.80.0/31 ens160
This route rule say that, System A only connect to other system, which system IP is β192.168.80.1β and As we configured above this is the IP of System A.
/31 means that the netmask value for this network is β255.255.255.254β
Here we have βNoβ connectivity to other system rather than A.
Now Start Configuring the system C:-
First we check the IP address and routing rules of system C which is provided by the system By default.
ifconfig ens160
route -n
Now we change the IP address of System C:-
ifconfig ens160 192.168.80.3/24
Here ens160 is my OS network card name and 192.168.80.3 is the New IP of this system /24 is for set the netmask value as β255.255.255.0β
We also need to add the new routing rule for this system for this we use CMD:-
route add -net 192.168.80.0/31 ens160
This route rule say that, System Conly connect to other system, which system IP is β192.168.80.1β and As we configured above this is the IP of System A.
/31 means that the netmask value for this network is β255.255.255.254β
Here we have βNoβ connectivity to other system rather than A.
Now We Start pining The System:-
β Now we try to ping system A to system B
As we see ping is successful
β Now we try to ping system A to system C
As we see ping is successful
β Now we try to ping system B to system A
As we see ping is successful
β Now we try to ping system C to system A
As we see ping is successful
β Now we try to ping system B to system C
As we see ping is unsuccessful
β Now we try to ping system C to system B
As we see ping is unsuccessful
Thank You