Welcome to my new technical blog , In this blog I am going to configure one network topology through which system A can able to connect system B and C and vice-versa but System B and System can not able to connect each other.
For configuring such type of topology you have to clear some basic concepts of netmask, routing table, network address or we can say that the networking.
<-----Now Let's jump to the practical part----->
System A:-
First of all, I am going to check the IP of my system.
Here you can see that the IP of my system is 192.168.0.112, but now I am going to set the IP of my system as 192.167.33.1
Command to change IP :-
ifconfig enp0s3 192.168.33.1/24
Here enp0s3 is the network card name and /24 means netmask which is nothing but 255.255.255.0
Here IP of my system has been changed successfully . Now,I am going to check the routing table of System A.
Command:-
route -n
Here I am going to add one rule to our routing table.
Command to add rule—
route add -net 192.167.33.0/30 enp0s3
According to this rule System A can connect to any other system whose IP comes under the range of 192 .167.33.0 to 192.167.33.3
Here u can see that the rule has been successfully added.
System B:-
I am going to configure system B same as System A , the only diffrence is ip address and netmask.
Command to change IP :-
ifconfig enp0s3 192.167.33.2/24
Here you can see that IP has been successfully changed, now I am going to add one rule.
Command to add rule :-
route add -net 192.167.33.0/31 enp0s3
According to this rule System B can connect to IP 192.167.33.3 and this IP is of System A IP. So system B can connect to System A
Rule is successfully added
System C:-
I am going to do the same thing as I done in the system A and B, again the only difference is IP and netmask. So,
Command to change ip :-
ifconfig enp0s3 192.167.33.3/24
command to add rule :-
route add -net 192.167.33.0/31 enp0s3
According to this rule System C can connect to IP 192.167.33.1 and this IP is of System A IP. So system C can connect to System A
Rule is successfully added
Now I am going to ping system B and system c through system A
Now I am going to ping system B through system C and vice-versa.
Here u can see that the system A can connect to system B, as well as a system C but system C and system B are not able to connect to each other
Hope u will find this article interesting ...
Comments