Announcement

Collapse
No announcement yet.

IPv6 Subnetting

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

    IPv6 Subnetting

    While experimenting with IPv6 on Precise I found an interesting web page explaining how the 128 binary bits that make up an IPv6 IP address are divided up between the 48 bits which define the Internet address, the 16 bits which are used for the subnet, and the remaining 64 bits which are used for devices that are used on a particular subnet:

    http://www.exabyte.net/lambert/subne...et_masking.htm

    The current IPv4 IP address has 32 bits, which allows for 4,294,967,296 connections.

    The 48 bits reserved for Internet addresses in IPv6 allows for 281,474,976,710,656 connections. If there are 7 billion people on this planet those 48 bits will allow EVERYONE on this planet plus EVERYONE on 42,209 other planets as populated as this one to have their own IPv6 address!

    But, just like IPv4, some patterns of the 48 Internet address bits are reserved for specific uses.
    https://wiki.ubuntu.com/IPv6
    Special IPv6 address ranges

    Address ranges are specified using a prefix. This is similar to the IPv4 concept of a network prefix and netmask, but in IPv6 we always use CIDR notation to specify the number of bits at the start of the mask that are 1. For example, the address range fe80::/10 includes all addresses that are the same as the address fe80:: in the first 10 bits, i.e. all beginning with the bit pattern 1111 1110 10. One hex digit corresponds to four bits: 1111 is f, 1110 is e. 10 is the most significant two bits of 1000 which is 8 in hex, but since this length is not a multiple of 4, the range also includes addresses with this digit set to 9 (1001), a (1010) and b (1011). Obviously a network prefix of length 128 specifies an individual address.
    IPv6 address Prefix length (bits) Description Notes
    :: 128 unspecified Used for default route and router solicitations. cf. 0.0.0.0 in IPv4
    ::1 128 loopback address cf. 127.0.0.1 in IPv4
    ::ffff:a.b.c.d 96 IPv4 mapped IPv6 address The lower 32 bits are the IPv4 address. Used in socket API's to represent IPv4 hosts.
    fe80:: 10 link-local Unroutable autoconfigured addresses used on a LAN, e.g. for DHCPv6
    fc00:: 7 unique local Addresses used only within an autonomous system, unroutable globally. Cf. RFC 1918 addresses such as used in NAT.
    ff00:: 8 multicast
    2000:: 3 global unicast All global unicast addresses currently begin with 2.

    Some IPv6 address prefixes have been deprecated, and should no longer be used.
    deprecated IPv6 address Prefix length (bits) Description Notes
    3ffe:: 16 6bone prefix Used 1998-2006.
    ::a.b.c.d 96 embedded IPv4 96 zero bits followed by 32 IPv4 bits. Also called “IPv4 compatible IPv6 address”. Replaced by mapped addresses.
    fec0:: 10 site-local Replaced by Unique Local Addresses

    Some address prefixes are special use:
    special IPv6 address Prefix length (bits) Description Notes
    2001:db8:: 32 documentation examples Not to be routed.
    2001:0:: 32 Teredo tunnels the remaining bits come from a Teredo server and the client NAT device.
    2002:: 16 6to4 tunnels the next 32 bits are the client IPv4 address
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    #2
    Jerry: 2^128 addresses would allow us to have how many addresses per square inch of the earth's surface, including oceans?

    Comment


      #3
      Originally posted by SteveRiley View Post
      Jerry: 2^128 addresses would allow us to have how many addresses per square inch of the earth's surface, including oceans?
      Well, now that you've asked! ...

      The surface of the earth is 7.9 x 10^17 square inches, according to Wolfram Alpha.

      So, each square inch on this planet could have 4.3 X 10^20 IPv6 addresses all their own.

      If we limited each square inch to the number of device addresses allowed to each IP address then each square inch of the Earth's surface would have 23 IPv6 device addresses to play with.

      I don't think we are going to run out of IPv6 address spaces anytime soon unless we develop intelligent nanobots that began asking for connections.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        I figured you'd find this to be a fun exercise

        Comment


          #5
          Originally posted by GreyGeek View Post
          fec0:: 10 site-local Replaced by Unique Local Addresses
          Some poorly-written stacks still try to create site-local addresses, or attempt to locate DNS servers with the fec0: prefix. An easy way to block all site-local traffic is with a rule that discards everything: block the entire range fec0::ff. I think that's pretty funny

          (Pronouce aloud, substitute an "Oh" for the "zero," don't say "colon colon"...)

          Comment


            #6
            Originally posted by SteveRiley View Post
            I figured you'd find this to be a fun exercise
            It sure does give one a sense of how BIG the domain and device spaces are in IPv6.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Originally posted by GreyGeek View Post
              It sure does give one a sense of how BIG the domain and device spaces are in IPv6.
              ...and my internet connection is still using IPv4

              Comment


                #8
                Originally posted by nickstonefan View Post
                ...and my internet connection is still using IPv4
                So, when you ping6 your ISP domain name you get "unknown host"?
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  Originally posted by GreyGeek View Post
                  So, when you ping6 your ISP domain name you get "unknown host"?
                  I hadn't tried it before you mentioned it, but have now and the answer is yes. But then I am only using a mobile broadband "dongle" to connect to internet. (T-mobile is what I'm using.

                  Comment


                    #10
                    T-Mobil has activated IPv6 across their entire US network.
                    http://support.t-mobile.com/thread/26025
                    As of right now, the only devices that support IPv6 over GSM and UMTS are the Samsung Nexus S for T-Mobile USA and the international unlocked HSPA+ Samsung Galaxy Nexus. The deployment of IPv6 is also critical to T-Mobile’s upcoming launch of LTE next year. LTE uses IPv6 natively across the network, so all LTE devices are IPv6 capable, too. T-Mobile’s HSPA+/LTE devices will be IPv6 capable on all types of supported networks, rather than just LTE and WiFi (which is how Verizon and Sprint LTE devices will work).
                    It would probably be a minor miracle if you could get Kubuntu to connect, but it may be worth a try. Meanwhile, you could install miredo from the repository and use it to access IPv6 websites.

                    The T-Mobil setup process is explained here if you are a T-Mobile phone user and are using one of the phones mentioned above.:
                    https://sites.google.com/site/tmoipv6/lg-mytouch

                    Known Bugs
                    1. Peer-to-peer applications like Skype and Tango do not work with IPv6. If you use these services, please contacts Skype and Tango to request support of IPv6. Here is a list applications that have been tested on the T-Mobile USA IPv6 network
                    2. The IPv6 service only works in T-Mobile USA coverage, it does not work in domestic or international roaming at this time.
                    3. Tethering is not yet an IPv6 feature in Android (special builds work)
                    4. A-GPS feature in the Nexus phones does not work with IPv6 correctly, this will make locking a GPS signal take longer.
                    5. Have another bug to report? Send it to the Google Group

                    You can test your setup here:
                    http://ip6.me/

                    http://test-ipv6.com/

                    P.S. --
                    http://support.t-mobile.com/message/147760#147760
                    If you apply the Android 4.0 ICS update to the Samsung Galaxy S II, you can now connect to the T-Mobile USA network using IPv6!
                    Last edited by GreyGeek; Jun 12, 2012, 10:57 AM.
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #11
                      Thanks for the info but it won't work for me as I'm using T-Mobile UK. Just looking on their website for IPv6 rollout but so far haven't found anything yet.

                      Comment


                        #12
                        Jees, guys. I keep reading Jerry's posts hoping I can learn geek that way. Doesn't seem to help, it's still geek to me. So is the ipv6 a way to improve the usability of present bandwidth? Is this something I need to start to configure for?

                        Comment


                          #13
                          Originally posted by capt-zero View Post
                          ... So is the ipv6 a way to improve the usability of present bandwidth? Is this something I need to start to configure for?
                          The IPv4 address space IS exhausted. New webpages can only appear in volume if they are given IPv6 addresses. . 80% of Internet traffic is because of 20 websites, and they have converted to IPv6. They only reason why you can still reach them is because they still maintain their IPv4 stack. Sometime in the future, exactly when no one knows, but it will probably be within the decade, IPv4 will be shut down.

                          Right now, to reach both the existing IPv4 sites and those that are coming on line using IPv6, you will have to have both stacks operating in your system. To add IPv6 all you have to do is

                          sudo apt-get install miredo

                          That's all. A new tap will appear in your "ip addr" listing with the name of "Teredo", and it will have an IPv6 address. That address will be this end of an IPv4-->IPv6 tunnel residing on a server in Germany or where ever. There they take four of your IPv4 packets and compose an IPv6 packet and pass it on to the IPv6 website you want to browse. Packets coming back to you through the tunnel are converted from one IPv6 packet into four IPv4 packets. So, in effect, you are still using IPv4. The ipv6 test URL mentioned in a previous post checks out your tunnel. Right now, unless you have native IPv6 hardware for your wireless, cable modem and your ISP talks IPv6, your rating will be 9/10 because of a bug in the DNS handling of Network-Manager, and IPv6 DNS resolution doesn't work right. There is a work-a-round but there is also no rush, so I am waiting till the upgrade fixes it.

                          @Steve, I read somewhere that with IPv6 they could give an IP address to every bullet in every magazine in every weapon on Earth. Obviously, by merely taking one from each square inch of water on the face of the planet, leaving the water with 22 left to use.
                          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                          – John F. Kennedy, February 26, 1962.

                          Comment


                            #14
                            Originally posted by GreyGeek View Post
                            @Steve, I read somewhere that with IPv6 they could give an IP address to every bullet in every magazine in every weapon on Earth. Obviously, by merely taking one from each square inch of water on the face of the planet, leaving the water with 22 left to use.
                            Huh...bullets with globally unique routable source addresses? Now there's an interesting notion...!

                            Comment


                              #15
                              Originally posted by capt-zero View Post
                              Jees, guys. I keep reading Jerry's posts hoping I can learn geek that way. Doesn't seem to help, it's still geek to me. So is the ipv6 a way to improve the usability of present bandwidth? Is this something I need to start to configure for?
                              IPv6 is the replacement network protocol for the currently-pervasive IPv4, designed in the early 1970s. IPv4 uses a 32-bit addressing space. 2^32 was a huge number in 1970; it isn't so big anymore. All available address blocks have been assigned to regional numbering authorities. While most numbering authorities still have a decent number of addresses to hand out, APNIC (for Asia) is close to running out.

                              IPv6 uses a 128-bit addressing space. 2^128 is an impossibly huge number. IPv6 fixes a number of deficiencies not envisioned during the design of IPv4. Mostly, these solve problems related to device mobility, something not imagined 40 years ago. IPv6's mechanisms for automatic address assignment, stateless configuration, router/neighbor discovery, and origin privacy are vastly improved. Routing is simplified, and asymmetric ("triangular") routing disappears. But IPv6 also introduces some new levels of complexity, mostly related to IPv4-IPv6 coexistence. And because it's still so new for so many people, IPv6 networks are likely to be riddled with configuration vulnerabilities for a while, as people learn.

                              IPv6 won't increase or decrease effective bandwidth. IPv6 has no mechanism for full broadcasting, instead relying on multicasting, so in theory IPv6 might reduce overall utilization a little bit.

                              Comment

                              Working...
                              X