How to build a network topology where you can ping Device A To Device B and Device C But Can’t Ping From B to C or C to B🙂
So hey guys hope you all are doing good in today's article we are going to set up very interesting network topology in which we will be having three system name A, B, C respectively what we want A can ping to B and C but B and C cant ping to each other. This can be done via firewall very easily but we are going to do this via network.
Note if you are using Virtual box for setting system then remember to attach host-only adopter so they can use their internal switch to communicate with each other.
Guys if you have not read my previous blog then I would recommend reading it first(Link below) because in that I have explained the basic part of networking which we will be using here.
First, let's give IP to all our system
System A IP:-192.168.1.2/24
System B IP:-192.168.1.2/24
System C IP:-192.168.1.7/24
To assign IP to our use the following command:-
ifconfig ip/prefixlength network card nameEg:- ifconfig 192.168.1.2/24 enp0s3
Once we have assigned IP to our systems now we have to make a route in the route table for them because assigning IP is now enough system always check the route table where to go where to not from route table only.
One thing that can be seen all systems are in the same network first 3 octets of all the systems are the same we can define this by using netmask.
Now from system A we want to ping B and C so system A should ping from 0–255 or at least 0–8 this count can be arranged from netmask. From where we start our IP count is defined by the route table not by assigning IP.
As you can see below in the image our system A have a route that it can ping to all IP raging from 192.168.1.[0–255] hence it can ping to system Band system C.
Note you can not ping first IP and last IP because they are reserved first is reserved for network name and last IP is for broadcast IP.
Now let's see system B from which we can ping to A but it should not ping to C so we give IP range to it from 192.168.1.0 to 192.168.1.3 now effectively system B can ping to IP 192.168.1.1,192.168.1.2 because first and last is reserved. As we can see below also it is pinging to system A which has IP 192.168.1.2 that is in range of system B.
As you can see we allocated 192.168.1.7/24 IP to our system C.
Now let’s see system C from which we can ping to A but it should not ping to B so we give IP range to it from 192.168.1.0 to 192.168.1.3 now effectively system C can ping to IP 192.168.1.1,192.168.1.2 because first and last is reserved. As we can see below also it is pinging to system A which has IP 192.168.1.2 that is in range of system B.
As we want Our network topology Through which system A can ping to System B and System C and System B and System C can’t ping to each other we have successfully completed this.
Guys, here we come to the end of this blog I hope you all like it and found it informative. If have any query feel free to reach me :)
Guys follow me for such amazing blogs and if have any review then please let me know I will keep those points in my mind next time while writing blogs. If want to read more such blog to know more about me here is my website link https://sites.google.com/view/adityvgupta/home.Guys Please do not hesitate to keep 👏👏👏👏👏 for it (An Open Secret: You can clap up to 50 times for a post, and the best part is, it wouldn’t cost you anything), also feel free to share it across. This really means a lot to me.