Home All Groups Group Topic Archive Search About
Author
9 May 2007 6:12 AM
Fred Marshall
I want to clarify something about setting up routes in Windows XP:

If there's a general subnet route:

192.168.1.0   255.255.255.0    192.168.1.2

(which I understand to mean that anything on subnet 192.168.2.0 goes to
192.168.2.1

And, in addition, one needs a specific route within that subnet that's
different, then it appears that:

192.168.2.33 255.255.255.0     192.168.1.17

doesn't work.

But

192.168.2.33 255.255.255.255     192.168.1.17

does work.

Why?

However.... the entry for the last one appears in the routing table after
the more general one.  So, it wouldn't be reached it appears. ???

Thanks,

Fred

Author
9 May 2007 3:27 PM
Robert L [MVP - Networking]
1. I think "192.168.1.0   255.255.255.0    192.168.1.2" should be "192.168.1.0   255.255.255.0    192.168.2.1"
2. 192.168.2.33 255.255.255.0     192.168.1.17: we need more information about this one. from which IP? what's IP 192.168.1.17? gateway?

Bob Lin, MS-MVP, MCSE & CNE
Networking, Internet, Routing, VPN Troubleshooting on http://www.ChicagoTech.net
How to Setup Windows, Network, VPN & Remote Access on http://www.HowToNetworking.com
  "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:Ozr%23NEgkHHA.3264@TK2MSFTNGP04.phx.gbl...
  I want to clarify something about setting up routes in Windows XP:

  If there's a general subnet route:

  192.168.1.0   255.255.255.0    192.168.1.2

  (which I understand to mean that anything on subnet 192.168.2.0 goes to
  192.168.2.1

  And, in addition, one needs a specific route within that subnet that's
  different, then it appears that:

  192.168.2.33 255.255.255.0     192.168.1.17

  doesn't work.

  But

  192.168.2.33 255.255.255.255     192.168.1.17

  does work.

  Why?

  However.... the entry for the last one appears in the routing table after
  the more general one.  So, it wouldn't be reached it appears. ???

  Thanks,

  Fred
Are all your drivers up to date? click for free checkup

Author
9 May 2007 4:55 PM
Steve Winograd [MVP]
In article <Ozr#NEgkHHA.3***@TK2MSFTNGP04.phx.gbl>, "Fred Marshall"
<fmarshallx@remove_the_x.acm.org> wrote:
>I want to clarify something about setting up routes in Windows XP:
>
>If there's a general subnet route:
>
>192.168.1.0   255.255.255.0    192.168.1.2
>
>(which I understand to mean that anything on subnet 192.168.2.0 goes to
>192.168.2.1

That route says that traffic for anything on subnet 192.168.1.0 goes
to 192.168.1.2.

Here's a route that says that anything on subnet 192.168.2.0 goes to
192.168.2.1.  Is this what you meant?

   192.168.2.0   255.255.255.0  192.168.2.1

>And, in addition, one needs a specific route within that subnet that's
>different, then it appears that:
>
>192.168.2.33 255.255.255.0     192.168.1.17
>
>doesn't work.

That route doesn't work because no IP address can match it.  There's a
zero in the fourth octet of the subnet mask, but the fourth octet of
the destination address is 33:

   192.168.2.33 AND 255.255.255.0 = 192.168.2.0

>But
>
>192.168.2.33 255.255.255.255     192.168.1.17
>
>does work.
>
>Why?

That route works because IP address 192.168.2.33 matches it:

   192.168.2.33 AND 255.255.255.255 = 192.168.2.33

>However.... the entry for the last one appears in the routing table after
>the more general one.  So, it wouldn't be reached it appears. ???

When more than one route can reach a destination address, the route
with the longest subnet mask is used.  The order in which routes
appear in the route table is irrelevant.

>Thanks,
>
>Fred
--
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:11 AM
Fred Marshall
Show quote Hide quote
"Steve Winograd [MVP]" <bcma***@mvps.org> wrote in message
news:ner3431slpep7sivhbpen8uif27n7et2u0@4ax.com...
> In article <Ozr#NEgkHHA.3***@TK2MSFTNGP04.phx.gbl>, "Fred Marshall"
> <fmarshallx@remove_the_x.acm.org> wrote:
>>I want to clarify something about setting up routes in Windows XP:
>>
>>If there's a general subnet route:
>>
>>192.168.1.0   255.255.255.0    192.168.1.2
>>
>>(which I understand to mean that anything on subnet 192.168.2.0 goes to
>>192.168.2.1
>
> That route says that traffic for anything on subnet 192.168.1.0 goes
> to 192.168.1.2.
>
> Here's a route that says that anything on subnet 192.168.2.0 goes to
> 192.168.2.1.  Is this what you meant?
>
>   192.168.2.0   255.255.255.0  192.168.2.1
>
>>And, in addition, one needs a specific route within that subnet that's
>>different, then it appears that:
>>
>>192.168.2.33 255.255.255.0     192.168.1.17
>>
>>doesn't work.
>
> That route doesn't work because no IP address can match it.  There's a
> zero in the fourth octet of the subnet mask, but the fourth octet of
> the destination address is 33:
>
>   192.168.2.33 AND 255.255.255.0 = 192.168.2.0
>
>>But
>>
>>192.168.2.33 255.255.255.255     192.168.1.17
>>
>>does work.
>>
>>Why?
>
> That route works because IP address 192.168.2.33 matches it:
>
>   192.168.2.33 AND 255.255.255.255 = 192.168.2.33
>
>>However.... the entry for the last one appears in the routing table after
>>the more general one.  So, it wouldn't be reached it appears. ???
>
> When more than one route can reach a destination address, the route
> with the longest subnet mask is used.  The order in which routes
> appear in the route table is irrelevant.
>

Steve,

Thanks again!  That's very useful to know.  Where might one find these kinds
of "rules"?  I've Googled but nothing seemed to pop out that did it.

I'm getting the impression that the "mask" in a route add doesn't have quite
the same meaning as a host subnet mask, right?

Fred
Author
10 May 2007 3:47 AM
Steve Winograd [MVP]
In article <udFAfAqkHHA.4***@TK2MSFTNGP02.phx.gbl>, "Fred Marshall"
<fmarshallx@remove_the_x.acm.org> wrote:
Show quoteHide quote
>>>I want to clarify something about setting up routes in Windows XP:
>>>
>>>If there's a general subnet route:
>>>
>>>192.168.1.0   255.255.255.0    192.168.1.2
>>>
>>>(which I understand to mean that anything on subnet 192.168.2.0 goes to
>>>192.168.2.1
>>
>> That route says that traffic for anything on subnet 192.168.1.0 goes
>> to 192.168.1.2.
>>
>> Here's a route that says that anything on subnet 192.168.2.0 goes to
>> 192.168.2.1.  Is this what you meant?
>>
>>   192.168.2.0   255.255.255.0  192.168.2.1
>>
>>>And, in addition, one needs a specific route within that subnet that's
>>>different, then it appears that:
>>>
>>>192.168.2.33 255.255.255.0     192.168.1.17
>>>
>>>doesn't work.
>>
>> That route doesn't work because no IP address can match it.  There's a
>> zero in the fourth octet of the subnet mask, but the fourth octet of
>> the destination address is 33:
>>
>>   192.168.2.33 AND 255.255.255.0 = 192.168.2.0
>>
>>>But
>>>
>>>192.168.2.33 255.255.255.255     192.168.1.17
>>>
>>>does work.
>>>
>>>Why?
>>
>> That route works because IP address 192.168.2.33 matches it:
>>
>>   192.168.2.33 AND 255.255.255.255 = 192.168.2.33
>>
>>>However.... the entry for the last one appears in the routing table after
>>>the more general one.  So, it wouldn't be reached it appears. ???
>>
>> When more than one route can reach a destination address, the route
>> with the longest subnet mask is used.  The order in which routes
>> appear in the route table is irrelevant.
>
>Steve,
>
>Thanks again!  That's very useful to know.  Where might one find these kinds
>of "rules"?  I've Googled but nothing seemed to pop out that did it.

You're welcome, Fred.  Here's a good article from Microsoft:

Understanding the IP Routing Table
http://www.microsoft.com/technet/community/columns/cableguy/cg1201.mspx

>I'm getting the impression that the "mask" in a route add doesn't have quite
>the same meaning as a host subnet mask, right?

Right.  I think that article will show the difference.

>Fred
--
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

Bookmark and Share