Home All Groups Group Topic Archive Search About
Author
7 May 2007 7:03 PM
Fred Marshall
If I run this command:

route -p ADD 172.020.109.012  MASK 255.255.255.252  192.168.109.254  METRIC
3



It responds with:



The route addition failed: The specified mask parameter is invalid.
(Destination
& Mask) != Destination.



But, if I run this command:



route -p ADD 172.20.109.12  MASK 255.255.255.252  192.168.109.254  METRIC 3



it works.....



Is this a bug or don't I understand?



Thanks,

Fred

Author
9 May 2007 5:43 PM
Steve Winograd [MVP]
In article <uvvMipNkHHA.3***@TK2MSFTNGP06.phx.gbl>, "Fred Marshall"
<fmarshallx@remove_the_x.acm.org> wrote:
Show quoteHide quote
>If I run this command:
>
>route -p ADD 172.020.109.012  MASK 255.255.255.252  192.168.109.254  METRIC
>3

>It responds with:
>
>The route addition failed: The specified mask parameter is invalid.
>(Destination
> & Mask) != Destination.
>
>But, if I run this command:
>
>route -p ADD 172.20.109.12  MASK 255.255.255.252  192.168.109.254  METRIC 3
>
>it works.....
>
>Is this a bug or don't I understand?
>
>Thanks,
>
>Fred

The first command has "020" in the second octet of the destination
field.  The second command has "20".

A number starting with a zero is interpreted as octal, so "020" and
"20" are different numbers:

   020 = 20 octal = 16 decimal
     20 = 20 decimal
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see.  I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
Author
9 May 2007 6:09 PM
Steve Winograd [MVP]
In article <jn1443h2i77hvu1387effaf8tkmc37q***@4ax.com>, "Steve
Winograd [MVP]" <bcma***@mvps.org> wrote:
Show quoteHide quote
>In article <uvvMipNkHHA.3***@TK2MSFTNGP06.phx.gbl>, "Fred Marshall"
><fmarshallx@remove_the_x.acm.org> wrote:
>>If I run this command:
>>
>>route -p ADD 172.020.109.012  MASK 255.255.255.252  192.168.109.254  METRIC
>>3
>
>>It responds with:
>>
>>The route addition failed: The specified mask parameter is invalid.
>>(Destination
>> & Mask) != Destination.
>>
>>But, if I run this command:
>>
>>route -p ADD 172.20.109.12  MASK 255.255.255.252  192.168.109.254  METRIC 3
>>
>>it works.....
>>
>>Is this a bug or don't I understand?
>>
>>Thanks,
>>
>>Fred
>
>The first command has "020" in the second octet of the destination
>field.  The second command has "20".
>
>A number starting with a zero is interpreted as octal, so "020" and
>"20" are different numbers:
>
>   020 = 20 octal = 16 decimal
>     20 = 20 decimal

On closer inspection, I see that I had the right idea in my first
reply, but I got the details wrong.  "020" and "20" are both OK in the
second octet.  It's the "012" vs. "12" in the fourth octet that causes
the problem:

   012 = 12 octal = 10 decimal  = 00001010 binary

In the fourth octet, the logical AND of the subnet mask and the
destination address is:

   11111100 AND 00001010 = 00001000

The "route add" command correctly reports that the value of the AND
(00001000) doesn't equal the destination (00001010).  In other words,
the route is invalid because it can't match any IP addresses.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see.  I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
Author
10 May 2007 1:06 AM
Fred Marshall
Show quote Hide quote
"Steve Winograd [MVP]" <bcma***@mvps.org> wrote in message
news:fa2443thges90nt8k0rajtkhnrab1p3ncs@4ax.com...
> In article <jn1443h2i77hvu1387effaf8tkmc37q***@4ax.com>, "Steve
> Winograd [MVP]" <bcma***@mvps.org> wrote:
>>In article <uvvMipNkHHA.3***@TK2MSFTNGP06.phx.gbl>, "Fred Marshall"
>><fmarshallx@remove_the_x.acm.org> wrote:
>>>If I run this command:
>>>
>>>route -p ADD 172.020.109.012  MASK 255.255.255.252  192.168.109.254
>>>METRIC
>>>3
>>
>>>It responds with:
>>>
>>>The route addition failed: The specified mask parameter is invalid.
>>>(Destination
>>> & Mask) != Destination.
>>>
>>>But, if I run this command:
>>>
>>>route -p ADD 172.20.109.12  MASK 255.255.255.252  192.168.109.254  METRIC
>>>3
>>>
>>>it works.....
>>>
>>>Is this a bug or don't I understand?
>>>
>>>Thanks,
>>>
>>>Fred
>>
>>The first command has "020" in the second octet of the destination
>>field.  The second command has "20".
>>
>>A number starting with a zero is interpreted as octal, so "020" and
>>"20" are different numbers:
>>
>>   020 = 20 octal = 16 decimal
>>     20 = 20 decimal
>
> On closer inspection, I see that I had the right idea in my first
> reply, but I got the details wrong.  "020" and "20" are both OK in the
> second octet.  It's the "012" vs. "12" in the fourth octet that causes
> the problem:
>
>   012 = 12 octal = 10 decimal  = 00001010 binary
>
> In the fourth octet, the logical AND of the subnet mask and the
> destination address is:
>
>   11111100 AND 00001010 = 00001000
>
> The "route add" command correctly reports that the value of the AND
> (00001000) doesn't equal the destination (00001010).  In other words,
> the route is invalid because it can't match any IP addresses.
> --
> Best Wishes,
> Steve Winograd, MS-MVP (Windows Networking)

Ah!  Octal. Thanks Steve!
Author
10 May 2007 3:53 AM
Steve Winograd [MVP]
In article <Op1P29pkHHA.***@TK2MSFTNGP05.phx.gbl>, "Fred Marshall"
<fmarshallx@remove_the_x.acm.org> wrote:
Show quoteHide quote
>>>>If I run this command:
>>>>
>>>>route -p ADD 172.020.109.012  MASK 255.255.255.252  192.168.109.254
>>>>METRIC
>>>>3
>>>
>>>>It responds with:
>>>>
>>>>The route addition failed: The specified mask parameter is invalid.
>>>>(Destination
>>>> & Mask) != Destination.
>>>>
>>>>But, if I run this command:
>>>>
>>>>route -p ADD 172.20.109.12  MASK 255.255.255.252  192.168.109.254  METRIC
>>>>3
>>>>
>>>>it works.....
>>>>
>>>>Is this a bug or don't I understand?
>>>>
>>>>Thanks,
>>>>
>>>>Fred
>>>
>>>The first command has "020" in the second octet of the destination
>>>field.  The second command has "20".
>>>
>>>A number starting with a zero is interpreted as octal, so "020" and
>>>"20" are different numbers:
>>>
>>>   020 = 20 octal = 16 decimal
>>>     20 = 20 decimal
>>
>> On closer inspection, I see that I had the right idea in my first
>> reply, but I got the details wrong.  "020" and "20" are both OK in the
>> second octet.  It's the "012" vs. "12" in the fourth octet that causes
>> the problem:
>>
>>   012 = 12 octal = 10 decimal  = 00001010 binary
>>
>> In the fourth octet, the logical AND of the subnet mask and the
>> destination address is:
>>
>>   11111100 AND 00001010 = 00001000
>>
>> The "route add" command correctly reports that the value of the AND
>> (00001000) doesn't equal the destination (00001010).  In other words,
>> the route is invalid because it can't match any IP addresses.
>
>Ah!  Octal. Thanks Steve!

You're welcome, Fred.  I tend to think in octal.  I worked for many
years on a Control Data Corporation 6400, which had 60-bit (20 octal
digits) data registers and 18-bit (6 octal digits) address and index
registers.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see.  I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com