cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1259
Views
0
Helpful
3
Replies

Subnet mask

robertsmith10
Community Member

Hello,

    Can someone please tell me if you can calculate the subnet mask having only the ip and default gateway?

Thanks in advance.

1 Accepted Solution

Accepted Solutions

As mentioned before, you can't tell that. But you can calculate the smallest subnet possible to make sure that both PC and DG are in the same subnet.

Example: PC has 10.0.0.194 and DG has 10.0.0.254. With a subnet-mask of /26 (255.255.255.192) both are in the same subnet. But with any bigger subnet (/25, /24, ...) the PC would also be able to reach it's gateway.

Challenge questions: Which minimum subnet is needed for:

  1. PC 10.0.0.126, DG 10.0.0.129
  2. PC 10.0.0.200, DG 10.0.1.254
  3. PC 10.0.1.0, DG 10.0.1.255

--
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.

View solution in original post

3 Replies 3

As mentioned before, you can't tell that. But you can calculate the smallest subnet possible to make sure that both PC and DG are in the same subnet.

Example: PC has 10.0.0.194 and DG has 10.0.0.254. With a subnet-mask of /26 (255.255.255.192) both are in the same subnet. But with any bigger subnet (/25, /24, ...) the PC would also be able to reach it's gateway.

Challenge questions: Which minimum subnet is needed for:

  1. PC 10.0.0.126, DG 10.0.0.129
  2. PC 10.0.0.200, DG 10.0.1.254
  3. PC 10.0.1.0, DG 10.0.1.255

--
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.

1. 10.0.0.0 /24

2. 10.0.0.0 /23

3. 10.0.0.0 /22

acampbell
VIP Alumni
VIP Alumni

Hi,

Basically you cant tell your mask unless you are using the class defaults from your info.

Class "A" = 255.0.0.0 (1.0.0.0 - 126.255.255.255)

Class "B" = 255.255.0.0 (128.0.0.0 - 191.255.255.255)

Class "C" = 255.255.255.0 (192.0.0.0 - 223.255.255.255)

Regards

Alex

Regards, Alex. Please rate useful posts.