Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
travaux:ipv6-faq [2014/05/02 14:19] sthibaul rewrite some paragraphs, fix some information |
travaux:ipv6-faq [2018/06/19 02:20] (Version actuelle) sthibaul [Why should I enable IPv6?] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | |||
======= IPv6 FAQ ======= | ======= IPv6 FAQ ======= | ||
Ligne 28: | Ligne 29: | ||
* Because you have the opportunity to rethink your addressing scheme. | * Because you have the opportunity to rethink your addressing scheme. | ||
* Because there are no IPv4 addresses any more. | * Because there are no IPv4 addresses any more. | ||
- | * Because IPv4 will be yet more and more painful to make working at all. | + | * Because IPv4 will be yet more and more painful to make working at all. We have kept piling up tricks to continue using IPv4, but that has already cost more than just migrating to IPv6, and continue costing **again** even more than just migrating to IPv6. |
- | * http:// | + | * Because there are no IPv4 addresses any more. |
+ | * https:// | ||
+ | * https:// | ||
+ | * https:// | ||
TODO: links to details | TODO: links to details | ||
Ligne 48: | Ligne 53: | ||
===== Do I have to completely migrate to IPv6? ===== | ===== Do I have to completely migrate to IPv6? ===== | ||
- | Well, in the end, all machines should have IPv6 configured. But that does not mean one has to get rid of IPv4 immediately. One can simply add IPv6 along IPv4, and IPv6 will be used whenever it can be, while IPv4 can still be used as a fallback, even if it is behind a CGN. | + | Well, in the end, all machines should have IPv6 configured. But that does not mean one has to get rid of IPv4 immediately. One can simply add IPv6 along IPv4, and IPv6 will be used whenever it can be, while IPv4 can still be used as a fallback, even if it is behind a CGN (see about CGN below). |
- | The combination of NAT64 + DNS64 can however | + | That said, a combination of NAT64 + DNS64 can be used to set up an IPv6-only network, which can still transparently access the IPv4 world, see more on this below. |
===== Is IPv6 slower than IPv4? ===== | ===== Is IPv6 slower than IPv4? ===== | ||
- | There is no general answer to this. For various reasons, IPv6 is faster to process than IPv4 (e.g. no checksum in the IP header, no fragmentation, | + | There is no general answer to this. |
+ | |||
+ | For various reasons, IPv6 is faster to process than IPv4 (e.g. no checksum in the IP header, no fragmentation, much simpler routing tables, which brings huge savings for routers, and much less use of Ethernet broadcasts). | ||
+ | |||
+ | For other reasons, it is slower (e.g. bigger addresses, leading to 1.33% bandwidth overhead on typical networks, and implementations might not have yet gotten as optimized as IPv4 ones). | ||
+ | |||
+ | In the end, some applications simply try both, and use the one that connects first, so whichever it is wins :) | ||
===== Does my machine support IPv6? ===== | ===== Does my machine support IPv6? ===== | ||
Ligne 75: | Ligne 86: | ||
===== How does DNS work with IPv6? ===== | ===== How does DNS work with IPv6? ===== | ||
- | DNS replies contain both IPv4 answers (in A records) and IPv6 answers (in AAAA records), independently of the protocol which was actually used to transport the request/reply themselves: | + | DNS replies contain both IPv4 answers (in A records) and IPv6 answers (in AAAA records), independently of the protocol which was actually used to transport the request |
$ dig -4 any www.ffdn.org | $ dig -4 any www.ffdn.org | ||
... | ... | ||
- | www.ffdn.org. 86400 IN A 141.255.128.13 | + | www.ffdn.org. 86400 IN A 185.233.100.13 |
- | www.ffdn.org. 86400 IN AAAA 2a01:474::13 | + | www.ffdn.org. 86400 IN AAAA 2a0c:e300::13 |
... | ... | ||
$ dig -6 any www.ffdn.org | $ dig -6 any www.ffdn.org | ||
... | ... | ||
- | www.ffdn.org. 86400 IN A 141.255.128.13 | + | www.ffdn.org. 86400 IN A 185.233.100.13 |
- | www.ffdn.org. 86400 IN AAAA 2a01:474::13 | + | www.ffdn.org. 86400 IN AAAA 2a0c:e300::13 |
... | ... | ||
Ligne 113: | Ligne 124: | ||
==== How to bring IPv6 routing up to my machine? ==== | ==== How to bring IPv6 routing up to my machine? ==== | ||
- | Hopefully, your ISP brings IPv6 up to your router, if not, ask them for it. You then just need to configure the router to route IPv6 (that step is extremely similar to IPv4 routing, with BGP and OSPF (version 3) for instance), and for instance configure DHCPv6 or stateless autoconfiguration, | + | Hopefully, your ISP brings IPv6 up to your router, if not, ask them for it. You then just need to configure the router to route IPv6 (which is extremely similar to IPv4 routing, with BGP and OSPF (version 3) for instance). |
- | + | ||
- | You also need to make sure IPv6 resolution works. For instance, '' | + | |
If your ISP does not bring IPv6 up to your router, you can use an IPv6 tunnel, see below. | If your ISP does not bring IPv6 up to your router, you can use an IPv6 tunnel, see below. | ||
- | Of course, don't forget to set up a firewall along the way. Yes, a firewall, not NAT. | + | Of course, don't forget to set up a firewall along the way. Yes, a firewall, not NAT, see below. |
- | + | ||
- | [[http:// | + | |
==== Does my ISP bring IPv6 up to my router? ==== | ==== Does my ISP bring IPv6 up to my router? ==== | ||
Ligne 133: | Ligne 140: | ||
* TODO... | * TODO... | ||
- | ==== How to configure my server operating system for IPv6? ==== | + | ==== How to configure my server |
- | The simplest way is simply not to have to configure it, by just configuring DHCPv6 or stateless autoconfiguration on your router. Machines on the network will then automatically configure themselves, just like they can do for IPv4. | + | The simplest way is simply not to have to configure it, by just configuring DHCPv6 or stateless autoconfiguration, as well as Router Advertisement (RA) on your router, see the "quick examples" |
You can however also configure the IPv6 address, default gateway and DNS server by hand, similarly to manual configuration of the IPv4 address. | You can however also configure the IPv6 address, default gateway and DNS server by hand, similarly to manual configuration of the IPv4 address. | ||
+ | |||
+ | You need to make sure IPv6 resolution works. For instance, '' | ||
+ | |||
+ | [[http:// | ||
==== How to make sure my client software knows how to connect through IPv6? ==== | ==== How to make sure my client software knows how to connect through IPv6? ==== | ||
- | You can tcpdump | + | You can use '' |
One can force the application to use IPv6 by specifying the IPv6 address by hand. This can for instance be done in URLs, by putting the address inside braces (to avoid confusion with the TCP port number), for instance http:// | One can force the application to use IPv6 by specifying the IPv6 address by hand. This can for instance be done in URLs, by putting the address inside braces (to avoid confusion with the TCP port number), for instance http:// | ||
Ligne 147: | Ligne 158: | ||
A lot of command-line tools (e.g. ssh, wget, dig, ...) have '' | A lot of command-line tools (e.g. ssh, wget, dig, ...) have '' | ||
- | ==== How to make sure my server software listens | + | ==== How to make sure my server software listens |
- | One can see this in netstat -Ainet6, e.g.: | + | One can see this in '' |
'' | '' | ||
Ligne 155: | Ligne 166: | ||
ssh is properly listening on TCPv6 port 22. | ssh is properly listening on TCPv6 port 22. | ||
- | Some software may have to be explicitly told to listen | + | Some software may have to be explicitly told to listen |
'' | '' | ||
- | where 0.0.0.0 is for all IPv4 addresses, and :: is for all IPv6 addresses. | + | where 0.0.0.0 is for all IPv4 addresses, and :: is for all IPv6 addresses. See the "quick examples" |
==== How to publish AAAA DNS records ==== | ==== How to publish AAAA DNS records ==== | ||
- | IPv6 AAAA DNS records are just like IPv4 A records, except they contain an IPv6 (which is 4 times bigger than an IPv4, thus the 4 A's :) ) | + | IPv6 AAAA DNS records are just like IPv4 A records, except they contain an IPv6 (which is 4 times bigger than an IPv4, thus the 4 A's :) ). For instance, here ' |
+ | |||
+ | '' | ||
+ | '' | ||
===== Can an IPv6-only machine A connect to an IPv4-only machine B? ===== | ===== Can an IPv6-only machine A connect to an IPv4-only machine B? ===== | ||
Ligne 169: | Ligne 183: | ||
Not natively: there has to be a router '' | Not natively: there has to be a router '' | ||
- | '' | + | '' |
'' | '' | ||
Ligne 188: | Ligne 202: | ||
===== I have heard that IPv6 is less secure because it does not have NAT, is that so? ===== | ===== I have heard that IPv6 is less secure because it does not have NAT, is that so? ===== | ||
- | Well, IPv6 does have NAT support nowadays actually (See below), but using NAT has drawbacks (see below). | + | Well, IPv6 does have NAT support nowadays actually (see below), but using NAT has drawbacks (see below). |
- | And anyway, | + | And anyway, using NAT does not make your network |
===== Is NAT available with IPv6? ===== | ===== Is NAT available with IPv6? ===== | ||
Ligne 198: | Ligne 212: | ||
That being said, this is usually not a good idea, as NAT breaks a lot of application protocols, see below, and IPv6 is precisely meant to let all machines have their own public IP. | That being said, this is usually not a good idea, as NAT breaks a lot of application protocols, see below, and IPv6 is precisely meant to let all machines have their own public IP. | ||
- | If you really want to, you can use a random fd00::/8 prefix for defining a private local network. | + | If you really want to, you can use a random fd00::/8 prefix for defining a private local network, see below. |
===== What are the downsides of NAT? ===== | ===== What are the downsides of NAT? ===== | ||
Ligne 208: | Ligne 222: | ||
* IRC's DCC | * IRC's DCC | ||
* Voice over IP: SIP | * Voice over IP: SIP | ||
- | * And any such protocol that anybody on earth might want to invent. Firewall plugins can be written to cope with the protocols above, but they can not work with newer protocols that people invent. | + | * And any such protocol that anybody on earth might want to invent. Firewall plugins can be written to cope with the protocols above, but they can not automatically |
- | * Consequently, | + | * Consequently, |
- | ===== Why CGN poses more downsides? ===== | + | ===== Why CGN has more downsides? ===== |
- | Well, it's basically the same as NAT, but first to a larger scale: Carrier-Grade NAT (CGN) means it is all customers of an ISP which are masqueraded behind the same public IP addresses, and out of control from customers. | + | Well, it's basically the same as NAT, but to a larger scale: Carrier-Grade NAT (CGN) means it is all customers of an ISP which are masqueraded behind the same public IP addresses, and out of control from the customers. |
* All users sharing the same public IP address appear the same on the Internet. | * All users sharing the same public IP address appear the same on the Internet. | ||
Ligne 235: | Ligne 249: | ||
(TODO: any other?) | (TODO: any other?) | ||
+ | |||
+ | See the "quick examples" | ||
===== Do I have to rethink my addressing scheme? ===== | ===== Do I have to rethink my addressing scheme? ===== | ||
Ligne 248: | Ligne 264: | ||
One of the issues in IPv4 is however when merging two networks which already use 192.168.0.0/ | One of the issues in IPv4 is however when merging two networks which already use 192.168.0.0/ | ||
- | For this reason, it is recommended to rather use Unique Local Addresses (ULA): take one 40-bit random number for your site, and append it to fd00::/8, leading to a /48 prefix. For instance, one could end up with fd12: | + | For this reason, it is recommended to rather use Unique Local Addresses (ULA): take one 40-bit random number for your site, and append it to fd00::/8, leading to a /48 prefix. For instance, one could end up with fd12: |
===== How does dynamic routing work? (BGP, | ===== How does dynamic routing work? (BGP, | ||
Ligne 256: | Ligne 272: | ||
===== Does my IPv6 address leak information on my machine? ===== | ===== Does my IPv6 address leak information on my machine? ===== | ||
- | If you configure your network with stateless configuration, | + | If you configure your network with stateless configuration, |
But that's only in that case. With static configuration, | But that's only in that case. With static configuration, | ||
+ | The privacy extension is usually not enabled by default, but can be enabled this way on Linux (here on eth0): | ||
+ | |||
+ | '' | ||
+ | |||
+ | TODO: other OSes | ||
===== Do I have to change all my equipments? ===== | ===== Do I have to change all my equipments? ===== | ||
Ligne 285: | Ligne 306: | ||
===== Is there ARP in IPv6? ===== | ===== Is there ARP in IPv6? ===== | ||
- | Yes, although it is rather | + | It was reworked and called Neighbour Discovery Protocol (NDP), |
====== Cheatsheet ====== | ====== Cheatsheet ====== | ||
Ligne 311: | Ligne 332: | ||
====== Some quick examples ====== | ====== Some quick examples ====== | ||
+ | ===== Firefox ===== | ||
+ | |||
+ | Out of the box, firefox should use IPv6 connectivity when available. However, it is not visible to the user. | ||
+ | |||
+ | There is a firefox extension that displays whether the current page is loaded over IPv4 or IPv6: https:// | ||
+ | |||
+ | You can test it on this wiki: if you have IPv6 connectivity, | ||
+ | |||
+ | If IPv6 connectivity does not work, make sure that it is not disabled: in '' | ||
===== Basic OS checks ===== | ===== Basic OS checks ===== | ||
Ligne 367: | Ligne 397: | ||
TODO: how to deactivate ipv4 completely, to check ipv6 for sure? | TODO: how to deactivate ipv4 completely, to check ipv6 for sure? | ||
+ | |||
+ | ==== *BSD ==== | ||
+ | |||
+ | TODO | ||
==== MacOS ==== | ==== MacOS ==== | ||
Ligne 419: | Ligne 453: | ||
interface eth0 { | interface eth0 { | ||
AdvSendAdvert on; | AdvSendAdvert on; | ||
- | prefix 2001: | + | prefix 2001: |
route ::/0 { }; # default route through us | route ::/0 { }; # default route through us | ||
RDNSS 2001: | RDNSS 2001: | ||
} | } | ||
- | '' | + | '' |
===== DHCPv6 configuration example ===== | ===== DHCPv6 configuration example ===== | ||
Ligne 434: | Ligne 468: | ||
===== dnsmasq ===== | ===== dnsmasq ===== | ||
- | dnsmasq can provide both DHCPv6 and Router Advertisement (RA) | + | dnsmasq can provide both DHCPv6 and Router Advertisement (RA). |
TODO | TODO | ||
Ligne 440: | Ligne 474: | ||
===== Firewall example ===== | ===== Firewall example ===== | ||
- | Here are example | + | Here are examples |
==== iptables ==== | ==== iptables ==== | ||
Ligne 516: | Ligne 550: | ||
===== Mobile IPv6 ===== | ===== Mobile IPv6 ===== | ||
- | Although not widely used, this allows a machine to roam between IPv6 networks without losing | + | Although not widely used, this allows a machine to roam between IPv6 networks without losing connections: |
====== Why is there no IPv5? ====== | ====== Why is there no IPv5? ====== |