Ping two computers within same network but different subnet mask


if one pc has and second pc has why both are ping together. because they have different subnet mask.
and how we assign class A with subnet mask.



Because the two addresses have the same IP range with different and classfull subnet mask.
Then /8 and /24 or until is in the range covered by /24



i think you know the anding process.
so when you are trying to ping from it means the source host will only match the firs octet of your ip. so in this case destination ip is
so in this case source host will find that the “source ip” and and “destination ip” are in the same subnet. by doing ANDING Process.
ANDING Process of “host1 ip” with “host1 subnet mask”::
IP :
Subnet Mask:
in ANDING Process there is some rules
A B Result
1 0 0
1 1 1
0 1 0
so if we do ANDING with Host1 IP with Subnet Mask it will be
IP: 00000001:00000001:00000001:00000001
Subnet: 111111111:00000000:00000000:00000000
Result: 00000001:00000000:00000000:00000000
so the network is

ANDING Process of “destination Ip” and “subnet mask of host1”
IP: 000000001:00000001:00000001:00000010
SUBNET: 1111111111:00000000:00000000:00000000
Now you will find that Host1 network and host2 network is in same subnet.
so host1 will send data to host2.
now the destination host will read the packet and will again check for ip add and will ensure that whatever packet he has received is this for him or not. so again destination host wil do same anding process
his own ip address with his own subnet mask and will find the network part so in that case network will be ( and will do anding process with sender ip address with subnet mask and the network will be (
so host2 also found that “yes this packet is for me”
now he will send echo reply to Host2 as they are in same Subnet.
that’s why instead of having different Subnet Mask they are pinging.



Well done. I Agree
sometimes the basic concepts are forgotten