IP address range matching

This is a discussion on IP address range matching within the Tech Board forums, part of the Community Boards category; Running into this at work. I have IP address ranges like 209.85.128.0/17 and I'm trying to figure out how that ...

  1. #1
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681

    IP address range matching

    Running into this at work. I have IP address ranges like 209.85.128.0/17 and I'm trying to figure out how that matches 209.85.217.221

    I thought the 0/17 only affected the last octet but it appears I'm wrong (via other documents) but even then I can't see how the 3rd octet matches.

    Any one have some references they could point me to?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    The /17 means that only the first seventeen bits are used for the subnet mask -- which means, in the third octet, only the first byte must be matched. Your subnet goes from 209.85.128.0 to 209.85.255.255.

    You can probably google "subnetting calculator" or something like that.

    (Edit: first byte!?! first bit. Sorry.)
    Last edited by tabstop; 07-16-2009 at 04:30 PM.

  3. #3
    & the hat of GPL slaying Thantos's Avatar
    Join Date
    Sep 2001
    Posts
    5,681
    Got to love how just a little bit more searching after asking finds you the solution

    Turns out the IP is in CIDR notation - Wikipedia, the free encyclopedia where the /17 specifies the subnet mask.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DX - CreateDevice - D3DERR_INVALIDCALL
    By Tonto in forum Game Programming
    Replies: 3
    Last Post: 12-01-2006, 06:17 PM
  2. how get ip address on 2 network cards
    By akesayyo in forum C Programming
    Replies: 8
    Last Post: 07-04-2005, 10:15 PM
  3. systray app to get IP Address
    By bonkey in forum Windows Programming
    Replies: 17
    Last Post: 09-19-2003, 08:10 AM
  4. MSN Vital Information
    By iain in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 09-22-2001, 08:55 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21