B
B
bacalastein2015-12-22 11:16:06
Computer networks
bacalastein, 2015-12-22 11:16:06

How to determine the netmask from the highest assigned IP?

Hello, there is a certain network X with IP 10.0.0.0, it is known that the maximum possible IP (except for the one reserved for broadcasting) is 10.0.15.254
How to determine the netmask?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
alegzz, 2015-12-22
@alegzz

10.0.0.0/20 i.e. 10.0.0.0/255.255.240.0
in general, according to the maximum number of hosts on the network

O
Oleg Tsilyurik, 2015-12-22
@Olej

What nonsense!
Both in the question... and in some of the answers.
You can verify everything and check it yourself (so as not to guess) by assigning alias IP addresses to the interface:

[email protected] ~ $ sudo ifconfig eth0:1 10.0.15.254/24
[email protected] ~ $ ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr f4:6d:04:60:78:6f  
          inet addr:10.0.15.254  Bcast:10.0.15.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

[email protected] ~ $ sudo ifconfig eth0:1 10.0.15.254/31
[email protected] ~ $ ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr f4:6d:04:60:78:6f  
          inet addr:10.0.15.254  Bcast:10.0.15.255  Mask:255.255.255.254
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

[email protected] ~ $ sudo ifconfig eth0:1 10.0.15.254/30
[email protected] ~ $ ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr f4:6d:04:60:78:6f  
          inet addr:10.0.15.254  Bcast:10.0.15.255  Mask:255.255.255.252
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

Here you have 3 subnets + different sizes ... and your IP falls into each!
(as you can see, these examples are not invented, but copied from the terminal ... I left extra on purpose)

L
LESHIY_ODESSA, 2015-12-22
@LESHIY_ODESSA

IP Calculator Online
Address1 - 10.0.0.0
Address2 - 10.0.15.254
10.0.0.0/21
10.0.8.0/22
​​10.0.12.0/23
10.0.14.0/24
10.0.15.0/25
10.0.15.128/26
10.0.15.192.07
. 15.224/28
10.0.15.240/29
10.0.15.248/30
10.0.15.252/31
10.0.15.254/32

V
Veronika Serzhantova, 2015-12-23
@vserzh

In this case, you can definitely determine only that the network is not more than /20, and then options up to /30.

A
anton1234, 2015-12-25
@anton1234

The subnet mask is needed in order to decide which packets to send directly and which through the gateway. If you know the host address and the gateway address, then based on these data, you can already calculate the minimum subnet mask (minimum network size).
Given the input data, the question has no reasonable solution, or any subnet mask can be answered.
PS. If you are solving some practical problem, then simply describe it as it is, since you did not succeed in asking a simple question.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question