|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Are IPs always in the format { 0..255 , period , 0..255 , period , 0..255 , period , 0..255 } ?
I have heard that class A addresses are split 7 bits - 25 bits (may not be true). Do these IPs still follow the format I displayed above? |
|
#2
|
||||
|
||||
|
1. Yes for IP version 4 (IPv4 for short) only, which has 4 octets to specify an IP address. IPv6 is different (see http://www.ipv6.org/ if you're interested in IPv6).
2. The original definition for class A addresses was for all addresses where the first octet is 00000000 - 10000000 (in binary, of course). Class B is for addresses where the first octet is 10000001 - 11000000, Class C is 11000001 - 11100000, you can see where the pattern is heading. In decimal, this would mean the first octet could range as follows: Class A - 0...127 (0, 10 and 127 are reserved though) Class B - 128...191 (172 is reserved for internal networks) Class C - 192...223 (192.168 is reserved for internal networks) Class D - 224...247 (there are multicast addresses) Class E - 248...255 (these are experimental) This was the original Internet scheme developed in the 70s. These days, with subnetting, these definitions have become largely meaningless. |
|
#3
|
|||
|
|||
|
Thanks for the info. I have a few more simple but interesting questions:
1) It seems IPs always contain 4 bytes values (range 0..255) split up by 3 periods... is this true? In other words, is an IP always 4 octets split with periods? 2a) 123.31.32.012 <------- Do IPs ever have leading zeros, like this? 2b) If so, would the base of the number assumed to be 8 (octal)? 3) When zeros exist in an IP, like 127.0.0.1, what do they mean? Is there ever an octet that never contains a zero. I believe that the right-most octet is a network if it is a zero, but I am not sure about the others. Last edited by Doucette : April 24th, 2003 at 11:58 AM. |
|
#4
|
||||
|
||||
|
1. Yes, for IPv4 only. IPv4 addresses always contain 4 octets (i.e. 32 bits). Not true for IPv6, which uses 128 bit addresses.
2a. Never seen it represented like that -- but I guess you could, if you want to represent numbers in octal. . For the record, I've only seen the numbers represented in decimal, never in hex, oct or any other base.2b. Note that the leading 0 is used to represent octal numbers in C and C-influenced programming languages. I don't think Visual Basic treats numbers starting with 0 as octal numbers, neither does Pascal, and there are other languages as well. Your average beginning programmer, who hasn't programmed in a C influenced language, would probably assume that the number is in decimal format rather than octal. 3. 0 and 255 are special values in any octet. 0 is reserved for machines that don't know their own address. For example, a host could know that its host address is 42, but not its network address. So it could temporarily assign itself 0.0.0.42 and broadcast a message asking for the network address. Another server could tell it the network address (say 12.34.56.), and then it would assign itself 12.34.56.42. Similarly, 255 is a special address that indicates that this message is broadcast to all hosts within that network. So a message going to 12.34.56.255 will be received by all hosts within the 12.34.56.xx network. Sending to 12.34.255.255 will send to all hosts within 12.34.xx.xx network. As to whether or not, there are any addresses that DON'T contain a 0, there are plenty around. As a matter of fact, your own website (www.matthewdoucette.com) has an IP address that doesn't contain a 0 in it .Hope this helps. Last edited by Scorpions4ever : April 24th, 2003 at 04:27 PM. |
|
#5
|
||||
|
||||
|
Thanks again!
Quote:
Quote:
|
|
#6
|
||||
|
||||
|
>> Are the 32 bits always split up in octets (4x8bits)?
Yes, it is always 4 octets of 8 bits each, for IPv4. |
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > IP specifications |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|