IPv6 対応アプリケーション開発なんて怖くない
Upcoming SlideShare
Loading in...5
×
 

IPv6 対応アプリケーション開発なんて怖くない

on

  • 5,560 views

 

Statistics

Views

Total Views
5,560
Views on SlideShare
5,557
Embed Views
3

Actions

Likes
2
Downloads
24
Comments
0

2 Embeds 3

http://twitter.com 2
http://paper.li 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

IPv6 対応アプリケーション開発なんて怖くない IPv6 対応アプリケーション開発なんて怖くない Presentation Transcript

  • IPv6 : IAjapan Java Jun 11th, 2011 - OSC 2011 Hokkaido
  • • IPv6• IPv4• IPv6• Web IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • Jun 11th, 2011 - OSC 2011 Hokkaido
  • • : ( )• HN:• : Web• :• Twitter: @nipotan• Facebook: http://facebook.com/nipotan• Web: http://nipotan.com/• : Perl Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6• IPv6 1 • http://blog.livedoor.jp/nipotan/archives/51195204.html Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6• IPv6 • NO• IPv6 • 2008 12 livedoor IPv6 EDGE Co.Lab v6 http://labs.edge.jp/colabv6/ • • IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • livedoor IPv6 • IPv6@2ch → http://ipv6.2ch.net/ •IPv6 • fixdap → http://fixdap.com/ • EDGE Co.Lab v6 • IPv6 IPv6 • IRCnet IRC • WIDE IRCnet Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 • • IPv6 • • • Jun 11th, 2011 - OSC 2011 Hokkaido
  • • APNIC 27 (Fab 2009 - Manila, Philippnes) • http://meetings.apnic.net/27/program/ipv6-in-3d • http://slidesha.re/nipotan-apnic27 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 2 …•••• IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • APNIC IPv6•• IPv6• Jun 11th, 2011 - OSC 2011 Hokkaido
  • vs IPv6••• L7 • IP (Internet Protocol) → Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 … • IPv6 Ready! • IPv6 Ready! • IP OK • • • • • Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4 Jun 11th, 2011 - OSC 2011 Hokkaido
  • 2011 4 15 IPv4 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4 • 32bit • 43 • 4,294,967,296 • • Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4 IANA (Internet Assigned Numbers Authority) IR (Internet Registry) RIR (Regional Internet Registry) ARIN RIPE LACNIC AfriNIC APNIC (American Registry for Internet Numbers) NCC (Latin American and Caribbean Internet (African Network Information Centre) (Asia-Pacific Network Information Centre) (Réseaux IP Address Registry) Européens Network Coordination Centre) NIR (National Internet Registry) JPNIC (Japan Network KRNIC (Korea Network TWNIC (Taiwan Network etc... Information Center) Information Center) Information Center) LIR (Local Internet Registry) ISP IDC etc... End-users Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4• 2011-01-31 IANA → RIR• 2011-04-15 APNIC → NIR• 2011-04-15 JPNIC • JPNIC APNIC → LIR Jun 11th, 2011 - OSC 2011 Hokkaido
  • • LIR• ISP • NAT (ISP Shared Address) ••• LIR •• IPv6 • Jun 11th, 2011 - OSC 2011 Hokkaido
  • LIR IPv4 • • • IPv6 • • • • • IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6•• IPv6 • • • IDC • •• IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 IPv4 • • IPv4 • IPv6 • IPv4 (NAT) • • • / IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 • 128bit • 340 • 340,282,366,920,938,463,374,607,431,768,211,456 • IPv4 8 • • NAT Jun 11th, 2011 - OSC 2011 Hokkaido
  • IP • IPv4 • 32bit 8bit 10 • .( ) 11001011 00000000 01110001 00000001 203.0.113.1 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IP • IPv6 • 128bit 16bit 16 • :( ) 0010000000000001 0000110110111000 0000101110101101 1111101011001110 0000000000000000 0000000000000000 0000000000000000 1101111010101101 2001:0db8:0bad:face:0000:0000:0000:dead 16 0 2001:db8:bad:face:0:0:0:dead 0 :: 2001:db8:bad:face::dead Jun 11th, 2011 - OSC 2011 Hokkaido
  • [ ] IP • IP • example.com • IPv4 • RFC 5735 - Special Use IPv4 Addresses •192.0.2.0/24 #TEST-NET-1 •198.51.100.0/24 # TEST-NET-2 •203.0.113.0/24 # TEST-NET-3 • IPv6 • RFC 3849 - IPv6 Address Prefix Reserved for Documentation • 2001:db8::/32 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6• IPv4 • 96bit 0 32bit IPv4 • IPv4 10 • ::203.0.113.1• IPv4 • 80bit 0 16bit 0xffff 32 bit IPv4 • ::ffff:203.0.113.1 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IP • IPv4 URL IP http://203.0.113.1:8080/ IP Jun 11th, 2011 - OSC 2011 Hokkaido
  • IP • IPv6 URL IP http://2001:db8:bad:face::dead:8080/ RFC 3989 Uniform Resource Identifier (URI): Generic Syntaxhttp://[2001:db8:bad:face::dead]:8080/ IPv6 (IP-literal) [ ] Jun 11th, 2011 - OSC 2011 Hokkaido
  • IP • IPv6 URL • • RFC 5952 - A Recommendation for IPv6 Address Text Representation • 6. Notes on Combining IPv6 Addresses with Port Numbers Jun 11th, 2011 - OSC 2011 Hokkaido
  • Web IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • • PC IPv6User - IPv6 OK IDC - IPv6 OK Internet PC Jun 11th, 2011 - OSC 2011 Hokkaido
  • • IPv6 • Proxy IPv6User - IPv6 NG IDC - IPv6 OK Internet IPv4 IPv6 Proxy PC Jun 11th, 2011 - OSC 2011 Hokkaido
  • • HTTP Proxy IPv6 HTTP Proxy IPv6 Squid  Apache + mod_proxy  DeleGate  Jun 11th, 2011 - OSC 2011 Hokkaido
  • SSL ID ( ) • • • • 1 • IP • IPv4 / IPv6 • Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 DNS • IPv6 AAAA ( A) • DNS • EDNS0 • (512 Bytes) • IPv6 • IPv6 DNS Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv6 DNS • DNS IPv6 DNS Server AAAA IPv6 EDNS0 transport BIND    NSD    djbdns    * 3rd party patch Jun 11th, 2011 - OSC 2011 Hokkaido
  • MTA ( ) IPv6 • • SMTP IPv6 • • • MX AAAA % host -t MX example.com example.com mail is handled by 0 mail.example.com. % host -t AAAA mail.example.com mail.example.com has IPv6 address 2001:db8::c00:ffee Jun 11th, 2011 - OSC 2011 Hokkaido
  • MTA ( ) IPv6 • MTA IPv6 MTA IPv6 sendmail  postfix  qmail  * 3rd party patch Jun 11th, 2011 - OSC 2011 Hokkaido
  • • IPv6• ICMPv6 • ICMP (IPv4)• ping traceroute IPv6 • ping6 traceroute6 • Windows ping6 tracert6 % ping6 2001:db8:bad:face::dead % traceroute6 2001:db8:bad:face::dead Jun 11th, 2011 - OSC 2011 Hokkaido
  • • AAAA • ipv6.google.com • IPv6 % ping6 ipv6.google.com % traceroute6 ipv6.google.com % curl -Iv http://ipv6.google.com/ Jun 11th, 2011 - OSC 2011 Hokkaido
  • Web• IPv4 IPv6 • IP-base • • The KAME Project → http://www.kame.net/ • IPv6 • IPv6@2ch → http://ipv6.2ch.net/ •IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • Web• Apache • 1.3.x IPv6 • 2.0 IPv6 Apache Portable Runtime (APR) Listen [2001:db8::bad:face]:80 Listen 203.0.113.1:80 <VirtualHost [2001:db8::bad:face]:80> # IPv6 settings : : </VirtualHost> </VirtualHost 203.0.113.1:80> # IPv4 settings : : </VirtualHost> Jun 11th, 2011 - OSC 2011 Hokkaido
  • Web• lighttpd • IPv6 • OS Web Server IPv6 #server.use-ipv6 = "enable" server.port = 80 server.bind = "203.0.113.1" $SERVER["socket"] == "[2001:db8::bad:face]:80" { # IPv6 settings : } $SERVER["socket"] == "203.0.113.1:80" { # IPv4 settings : } Jun 11th, 2011 - OSC 2011 Hokkaido
  • Web• nginx • 0.7.36 IPv6 • … http { server { listen [2001:db8::bad:face]:80 server_name bad-face.example.com # IPv6 settings : } server { listen 127.0.0.1:80; listen 203.0.113.1:80; server_name bad-face.example.com; # IPv4 settings : } } Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4/IPv6 • Web • Proxy Perl • IP $ENV{REMOTE_ADDR} PHP $_SERVER["REMOTE_ADDR"] Ruby ENV["REMOTE_ADDR"] Python os.environ.get("REMOTE_ADDR") Java request.getRemoteAddr() //javax.servlet.http.HttpServletRequest#getRemoteAddr() Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4/IPv6 • IP • IPv6 ^(?:(?:(?:(?:[da-f]){1,4}:){6}|::(?:(?:[da-f]) {1,4}:){5}|(?:[da-f]){0,4}::(?:(?:[da-f]){1,4} :){4}|(?:(?:(?:[da-f]){1,4}:){0,1}(?:[da-f]){1 ,4})?::(?:(?:[da-f]){1,4}:){3}|(?:(?:(?:[da-f] ){1,4}:){0,2}(?:[da-f]){1,4})?::(?:(?:[da-f]){ 1,4}:){2}|(?:(?:(?:[da-f]){1,4}:){0,3}(?:[da-f ]){1,4})?::(?:(?:[da-f]){1,4}:)|(?:(?:(?:[da-f ]){1,4}:){0,4}(?:[da-f]){1,4})?::)(?:(?:[da-f] ){1,4}:(?:[da-f]){1,4}|(?:(?:d|[1-9]d|1dd|2 (?:[0-4]d|5[0-5])).){3}(?:(?:d|[1-9]d|1dd|2 (?:[0-4]d|5[0-5]))))|(?:(?:(?:[da-f]){1,4}:){0 ,5}(?:[da-f]){1,4})?::(?:[da-f]){1,4}|(?:(?:(? :[da-f]){1,4}:){0,6}(?:[da-f]){1,4})?::)$ • … • IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4/IPv6 • reverse proxy • IP proxy X-Forwarded-For • proxy • • • reverse proxy Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4/IPv6 • reverse proxy (4 or 6) X-IP-Version • Perl $ENV{HTTP_X_IP_VERSION} PHP $_SERVER["HTTP_X_IP_VERSION"] Ruby ENV["HTTP_X_IP_VERSION"] Python os.environ.get("HTTP_X_IP_VERSION") Java request.getHeader("X-IP-Version") //javax.servlet.http.HttpServletRequest#getHeader() Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4/IPv6 • Apache • RequestHeader Listen 80 <VirtualHost [2001:db8::bad:face]:80> ServerName bad-face.example.com RewriteEngine On : : RequestHeader set X-IP-Version 6 </VirtualHost> </VirtualHost 203.0.113.1:80> ServerName bad-face.example.com RewriteEngine On : : RequestHeader set X-IP-Version 4 </VirtualHost> Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4/IPv6 • lighttpd • setenv.add-request-header $SERVER["socket"] == "[2001:db8::bad:face]:80" { : : setenv.add-request-header = ("X-IP-Version" => "6") } $SERVER["socket"] == "203.0.113.1:80" { : : setenv.add-request-header = ("X-IP-Version" => "4") } Jun 11th, 2011 - OSC 2011 Hokkaido
  • IPv4/IPv6 • nginx • proxy_set_header http { server { listen [2001:db8::bad:face]:80 server_name bad-face.example.com : : proxy_set_header X-IP-Version 6; } server { listen 127.0.0.1:80; listen 203.0.113.1:80; server_name bad-face.example.com; : : proxy_set_header X-IP-Version 4; } } Jun 11th, 2011 - OSC 2011 Hokkaido
  • IP• IP • DB • • IPv4 … 32bit → 4 • IPv6 … 128bit → 16 • • IPv4 15 • IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • IP• IPv6 • IPv4 0000:0000:0000:0000:0000:ffff:255.255.255.255 ----5----0----5----0----5----0----5----0----5• 45 • <netinet/in.h> • Socket #define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 char ipv4_addr[INET_ADDRSTRLEN]; char ipv6_addr[INET6_ADDRSTRLEN]; Jun 11th, 2011 - OSC 2011 Hokkaido
  • • IPv6 • 2001:db8:bad:beef::0111:dead - - [11/Jun/2011:10:35:55 +0900] "GET / HTTP/1.1" 200 9972 "-" "Mozilla/5.0" 198.51.100.156 - - [11/Jun/2011:10:36:14 +0900] "GET / HTTP/ 1.1" 200 9972 "http://example.com/" "Mozilla/5.0" Jun 11th, 2011 - OSC 2011 Hokkaido
  • • IPv6 IPv6 Webalizer  AWStats  Analog  * 3rd party patch Jun 11th, 2011 - OSC 2011 Hokkaido
  • …• Web IPv6• Jun 11th, 2011 - OSC 2011 Hokkaido
  • Critical issues • APNIC 27 • Web … • IPv6 • IPv4 • IPv6 • IPv6 • IPv4 • Jun 11th, 2011 - OSC 2011 Hokkaido
  • Critical issues • Imagine • The all of interesting websites will be phased out in 2011 • • … Jun 11th, 2011 - OSC 2011 Hokkaido
  • • Web • • • …• IPv6 Jun 11th, 2011 - OSC 2011 Hokkaido
  • Jun 11th, 2011 - OSC 2011 Hokkaido