Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 11-11-2008, 02:57 PM   #1 (permalink)
 
Newb Techie

Join Date: May 2005

Posts: 33

xStevey_Bx

Default IP addresses

I have a university project that I need to work on and part of it will require me assigning users a specific avatar when they log into the site.

To shake things up a little and remove the totally random aspect I want to set up ranges of IP addresses which each correspond to one of the avatars. This means that users from different areas will have a higher probability of recieving an avatar than users in another.

There are 4,200,000,000 odd Ip4 addresses and I need to split them up into 1000 ranges. How do Ip addresses incriment?

They start at 0.0.0.0, but is the next one 0.0.0.1?

What happens once the address reaches 0.0.0.255? Is the next one 0.0.1.0?

Any help or suggestions would be greatly appreciated!!
xStevey_Bx is offline  
Old 11-11-2008, 04:29 PM   #2 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default

each octet actually contains 8 bits. in binary, this can be represented as 10101010.10101010.10101010.10101010

you're on the right track. you also need to account for network addresses and broadcast addresses as well.

the first address (0.0.0.0) is the network address and the last address (0.0.0.255) is the broadcast address. Number of host per network is 2^N - 2 , where n is the number of host bits.

For network, 192.168.0.0/24, the calcualtion is 2^8-2. should be 253

You are going to need to account for the subnet mask as well. The subnet mask is what separtates the host bits from the network bits.

Don't forget to exclude the private addresses.

reference
IP address - Wikipedia, the free encyclopedia




there is no method to this madness. i may be back later. I suggest researching subnetting a network.

IP addresses and Subnetting

good read on subnetting

Last edited by Mak213; 11-11-2008 at 10:28 PM.
office politics is offline  
Old 11-11-2008, 07:13 PM   #3 (permalink)
S0ULphIRE's Avatar
 
01001100011011110110110

Join Date: Mar 2007

Location: Perth, Australia

Posts: 1,940

S0ULphIRE has a spectacular aura aboutS0ULphIRE has a spectacular aura about

Send a message via MSN to S0ULphIRE
Default Re: IP addresses

In terms of what the OP wanted the addressess for, he doesn't really have to be concerned with subnetting/broadcast-addresses/network-addressess.
If he worried about that his job would be massive! A lot of networks don't have the same masks as eachother, e.g. different network and bc address.

to the OP: All you need to know is yes, you were right. That's how they increment. And Iuno, there might be a site somewhere which gives a rundown of block ip addresses in different areas of the world. That'd make your job easier.
__________________
"As a result of all this hardship, dirt, thirst, and wombats, you would expect Australians to be a dour lot. Instead, they are genial, jolly, cheerful, and always willing to share a kind word with a stranger, unless they are an American."
-- Douglas Adams

Click this if I helped you
>>>><<<<
S0ULphIRE is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My IP will not change.. CRACKSNACKS Computer Networking & Internet Access 19 02-17-2008 02:26 PM
Sky.com Email Addresses Ollie A Browser & General Internet Questions 4 01-29-2008 08:01 PM
ip addresses pyroknife Browser & General Internet Questions 1 04-26-2007 10:04 PM