locked
How to calculate the network address of the subnet?

    Question

  • How to calculate the network address of the subnet?

    best wishes!

    Sunday, October 14, 2012 7:52 AM

Answers


  • Hi Roy_Rock,

    If you want to do the IP/subnet calculation in script code, you can search for some online IP calculators and then lookup the script code to get some ideas on how to implement the code yourself.


    #javascript subnet calculator
    http://www.thaemlitz.com/john/javascript-ip-subnet-calculator.html

    #Online IP calculator
    http://faqintosh.com/risorse/en/othutil/webapps/ipcalc/

    Or as Song Tian suggested, you can also build a custom webservice which encapsulate the ip/subnet calculation details (in .NET code)  and your HTML5 +JS client simply consumes the custom service for calculation. Here is a sample project on codeplex which provides ip network calculation functions:

    #IPNetwork utility computes your netmask, cidr, subnet, supernet and network
    http://ipnetwork.codeplex.com/

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. Putting communities in your palms. Launch the browser on your phone now, type aka.ms/msforums and get connected!

    • Marked as answer by Roy_Rock Monday, October 22, 2012 6:42 AM
    Tuesday, October 16, 2012 3:41 AM
    Moderator

All replies

  • Hi,

    You could write a webservice to get network address. And then call that from your app with javascript.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework

    Monday, October 15, 2012 7:26 AM

  • Hi Roy_Rock,

    If you want to do the IP/subnet calculation in script code, you can search for some online IP calculators and then lookup the script code to get some ideas on how to implement the code yourself.


    #javascript subnet calculator
    http://www.thaemlitz.com/john/javascript-ip-subnet-calculator.html

    #Online IP calculator
    http://faqintosh.com/risorse/en/othutil/webapps/ipcalc/

    Or as Song Tian suggested, you can also build a custom webservice which encapsulate the ip/subnet calculation details (in .NET code)  and your HTML5 +JS client simply consumes the custom service for calculation. Here is a sample project on codeplex which provides ip network calculation functions:

    #IPNetwork utility computes your netmask, cidr, subnet, supernet and network
    http://ipnetwork.codeplex.com/

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. Putting communities in your palms. Launch the browser on your phone now, type aka.ms/msforums and get connected!

    • Marked as answer by Roy_Rock Monday, October 22, 2012 6:42 AM
    Tuesday, October 16, 2012 3:41 AM
    Moderator