As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
It is a known fact that there are three blocks of IPv4 Addresses that were chosen to be reserved for private networks:
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
(as specified by RFC 1918). However, although I can sort of see why 10.0.0.0 would be a natural choice, I can think of no particular reason why 172.16.0.0 and 192.168.0.0 were chosen among all the possibilities. I tried to google about this but got nothing, and the RFC document did not provide any explanation either. Was it really just a random decision?
AS stated by ganeshh.iyer "
10.0.0.0/8 was the old ARPANET, which they picked up on 01-Jan-1983. When they shut down the ARPANET in 1990, the 10.0.0.0/8 block was freed. There was much argument about if there should ever be private IP spaces, given that a goal of IPv4 was universal to all hosts on the net.
In then end, practicality won out, and RFC 1597 reserved the now well known private address spaces. When ARPANET went away, the 10.0.0.0/8 allocation was marked as reserved and since it was known that the ARPANET was truly gone (the hosts being moved to MILNET, NSFNET or the Internet) it was decided that this was the best Class A block to allocate.
Note Class A. This was before CIDR. So, the Class A, B and C private address netblocks needed to come out of the correct IP ranges.
I know that 172.16.0.0/12 was picked because it offered the most continuous block of Class B (/16) addresses in the IP space that was in a reserved block. 192.0.0.0/24 was always reserved for the same reason that 0.0.0.0/8 and 128.0.0.0/16 were reserved (first blocks of the old Class C, A and B network blocks) so assigning 192.168.0.0/24 out as private fit well -- 192.0.2.0/24 was already TEST-NET, where you could use them in public documentation without fear of someone trying it (see example.com for another example.)"
Quoted from:
https://supportforums.cisco.com/thread/2014967
https://supportforums.cisco.com/people/ganeshh.iyer
Related
I've seen around IPv4 subnet address ranges expressed in a compact form.
For example:
127/24 == 127.0.0.0/24
10/8 == 10.0.0.0/8
10.10.10/24 == 10.10.10.0/24
BTW I can't find any RFC (or any other kind of official or semi-official documentation) that describes it.
Does anyone have some links to share?
I recall this notation being used on Juniper routers as far back as 2001; not sure what, if any, RFC defined it. RFCs do not define the whole planet; somehow over the years they replaced specifications (which are/were much more detailed), but were originally intended for Request For Comments. (Gee, I wonder why there are so many bugs in networking gear.)
In RFC 5952 - section 5 it is stated that for some IPv6 addresses it is recommended to give the mixed notation, if it has a certain prefix. However, it is unclear which prefixes are used for this, because it is stated that a prefix may be used if it is commonly used as a prefix for a IPv4-mapped address. Thus meaning basically any prefix could be used for this.
Now my question is:
May every IPv6 address be written as an IPv4-mapped IPv6-address?
If not, what are the exact rules for correctly writing an IPv4-mapped IPv6-address?
You may use the IPv4 notation for the last 32 bits in any IPv6 address. The RFC you mention is about the recommended notation. It doesn't specify all correct notations. The RFC that defines that is https://www.rfc-editor.org/rfc/rfc4291#section-2.2 and it allows the IPv4 style notation (Note that it isn't called "IPv4-mapped IPv6-address", that is actually a special range of addresses that commonly used this notation style) for any address.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I have a web application that collect user ip addresses when user login, I want to drwa all collected ip addresses to a map that will show me a pin on the country have one or more user loged in from it
example: let us say we have the following ip addresses in a database
xx.ee.rr.tt = USA
cc.ee.ww.aa = UK
I need a world map with pins on USA and UK
There are a few good examples of mapping IP to country (or Country IP Blocks).
Here is a free restful API service you can call to do this - you're limited to 10k queries per hour.
They are on GitHub in case you want to copy and run the code locally and to get around this 10k constraint or speed things up.
Here is a sample output of a query on my IP address (I'll mask it, but you'll get the idea)
IP 198.70.xxx.xxx
Country United States
Region Ohio
City Xxxxx
Latitude and Longitude 4x.xxx -8x.xxx
Area and Metro codes 330 -
Here is a CodeProject article on consuming the WSIP2Country service. (If you go this route, note that the GetCountryCode method was deprecated and recommend using the GetCountryCodeAuth - see comments at the end of the article).
This works if you are only trying to derive location from the IP address - per your comment you want to also go the next step and pin it to a map. There are some great ways to incorporate Google Maps for this.
This site's IP Mapper method/code has been used quite successfully by many (it boasts: "Asynchronously Geocode IP Addresses on Google Maps"). They have a way to add a list of IP addresses in their example code:
var ipArray = ["111.111.111.111", "222.222.222.222", "123.123.123.123"];
IPMapper.addIPArray(ipArray);
They utilize the Google map API, so you should be able to modify their JavaScript code using the Google Map API docs as a guide if you want anything special.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Storm is a free and open source distributed realtime computation system. It receives streams of data and does processing on it. What if Storm goes down and part of the data never goes through it which means that calculations would not be in sync?
How can Storm solve this problem? If it can't, how could one solve this problem?
A similar question would be: How can I read old data that existed before Storm was added?
How can I read old data that existed before Storm was added?
The data must be stored somewhere (say, HDFS). You write a Spout which accepts data from some transport (say, JMS). Then, you would need to write replay code to read the appropriate data from HDFS, put it on a JMS channel, and Storm would deal with it. The trick is knowing how far back you need to go in the data, which is probably the responsibility of an external system, like the replay code. This replay code may consult a database, or the results of Storm's processing, whatever they may be.
Overall, the 'what if it goes down' question depends on what type of calculations you are doing, and if your system deals with back pressure. In short, much of the durability of your streams are dependent on the messaging/transport mechanism that delivers to Storm.
Example: If you need to simply tranform (xslt) individual events, then there is no real-time failure, and no state issues if Storm goes down. You simply start back up and resume processing.
The system that provides your feed may need to handle the back pressure. Messaging transports like Kafka can handle durable messaging, and allow Storm to resume where it left off.
The specific use case that results in "calculations would not be in sync" would need to be expounded upon to provide a better, more specific answer.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Please any body tell what is meant by address space ?
why it is called like that ?
and also about the virtual memory ?
Thanks in advance
Regards
Pavankumar
I think address space refers to a segment.
In real mode (intel's XT and 286) segment is just a way to make a program independent of it's space in memory. When a program gets compiled the addresses (of varables, labels - functions) are hardcoded into a program. - This way it would be difficult to load two programs at the same time, because they would all want to use the same addresses.
We need to use relative addresses instead of absolute ones. The resolution between the relative and physical addresses are made relative to segments. If one program is loaded starting from the segment 0x200 and another program is loaded starting from 0x600 they can freely use the same address (for example 0x41) because that will be relative to their respective segments. In our case (real mode) the segment 0x200 will be translated to physical address 0x2000 (through multiplying it by 0x10) and after adding the relative address, the resulting physical address will be 0x2041.
There are many segments which can be used. Data operations by default are made relative to the program's Data Segment (held in the DS register of the cpu) and code operations are made relative to Code Sement (held in the CS register). Stack addresses are resolved to physical addresses using the Stack Segment (SS register).
But in real mode you can freely use the segments, you can access other program's segments or enter arbitrary values which will be resolved to arbitrary physical addresses.
In protected mode the whole concept changed. Segments do not hold addresses any more. They hold selectors. They only refer to an element in a table, where the real base addresses are held. The table also contains limits, so you can no longer address ANY physical address, only inside the portion of memory which was given to your program by the OS. This introduces the concept of ownership of memory blocks by processes.
I think this is enough for the start, feel free to read more on either Wikipedia or other good sources. The topic is quite documented.