ip address and network

R

Ruslan Spivak

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
 
P

Peter Hansen

Ruslan said:
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?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,270
Latest member
TopCryptoTwitterChannels_

Latest Threads

Top