ip address and network

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ruslan Spivak

    ip address and network

    Hello.

    I need to do the following:
    i have ip address(a lot of different ip addresses) and i need to
    determine if it belongs to some network. (for example ip -
    193.108.240.17, network 193.108.240.0/22).
    How can i solve this?

    Thanks in advance.
    Your help is very appreciated.

    Best regards,
    Ruslan


  • Peter Hansen

    #2
    Re: ip address and network

    Ruslan Spivak wrote:[color=blue]
    >
    > I need to do the following:
    > i have ip address(a lot of different ip addresses) and i need to
    > determine if it belongs to some network. (for example ip -
    > 193.108.240.17, network 193.108.240.0/22).
    > How can i solve this?[/color]

    Are you asking how to deal with this in Python code specifically, or
    are you asking for help with the general problem? In other words,
    do you understand what /22 means and what it means to "belong to
    a network"? (If you do, this is fairly straightforward , so perhaps
    you could explain what part of doing it in Python is unclear to you.)

    -Peter

    Comment

    Working...