| 1 | Enabling IPv6 |
|---|
| 2 | ------------- |
|---|
| 3 | |
|---|
| 4 | Remember IPv6 is 128 bits: |
|---|
| 5 | |
|---|
| 6 | 340.282.366.920.938.463.463.374.607.431.768.211.456 unique values |
|---|
| 7 | |
|---|
| 8 | For this workshop, we use a Unique Local Address ( fc00::/7 ) (RFC4193) |
|---|
| 9 | |
|---|
| 10 | We have registered: the prefix fdba:dc55:48c7::/48 |
|---|
| 11 | |
|---|
| 12 | In full notation: fdba:dc55:48c7:0000:0000:0000:0000:0000 prefixlen 48 |
|---|
| 13 | |
|---|
| 14 | /48 is what is given to each customer in an ISP environment. |
|---|
| 15 | Normally, LANs are 64 bits in size (18446744073709551616 IPs), so |
|---|
| 16 | this leaves 16 bits - in total, 65536 LANs! |
|---|
| 17 | |
|---|
| 18 | Note: We may also have a "real" routable prefix, which will be given in |
|---|
| 19 | class. |
|---|
| 20 | |
|---|
| 21 | I. Manual configuration |
|---|
| 22 | ----------------------- |
|---|
| 23 | |
|---|
| 24 | Manually, we will use the following addressing scheme: |
|---|
| 25 | |
|---|
| 26 | fdba:dc55:48c7:0000:0000:0000:00xx:000y/64 (LANs are 64 bit in IPv6) |
|---|
| 27 | |<- prefix ->||site||<----- LAN ------>| |
|---|
| 28 | |
|---|
| 29 | ... where xx = your group number, and y is your host IP (i.e.: 1) |
|---|
| 30 | |
|---|
| 31 | For example, for Group 25, this will be: |
|---|
| 32 | |
|---|
| 33 | group IP |
|---|
| 34 | vv vv |
|---|
| 35 | fdba:dc55:48c7:0000:0000:0000:0025:0001/64 (LANs are 64 bit in IPv6) |
|---|
| 36 | |<- prefix ->||site||<----- LAN ------>| |
|---|
| 37 | |
|---|
| 38 | Or, in short notation (consecutive 0's can be expressed as ::) |
|---|
| 39 | |
|---|
| 40 | fdba:dc55:48c7::25:1 prefixlen 64 (LAN |
|---|
| 41 | |
|---|
| 42 | |
|---|
| 43 | 1. On AUTH1, edit /etc/rc.conf, and add |
|---|
| 44 | |
|---|
| 45 | ipv6_ifconfig_eth0="fdba:dc55:48c7::XX:YY/64" |
|---|
| 46 | |
|---|
| 47 | Save the file & exit, and run the ip6addrctl script, which |
|---|
| 48 | sets a source address selection policy: |
|---|
| 49 | |
|---|
| 50 | # service ip6addrctl start |
|---|
| 51 | |
|---|
| 52 | Run ip6addrctl and look at the output. |
|---|
| 53 | |
|---|
| 54 | # ip6addrctl |
|---|
| 55 | |
|---|
| 56 | 2. Start IPv6: |
|---|
| 57 | |
|---|
| 58 | Normally, to configure IPv6, we would need to restart the |
|---|
| 59 | networking configuration, like this - BUT DON'T DO IT! |
|---|
| 60 | |
|---|
| 61 | # service netif start |
|---|
| 62 | # service routing start |
|---|
| 63 | |
|---|
| 64 | ... if you do this now, you will lose connection to your machine! |
|---|
| 65 | |
|---|
| 66 | So instead, let's do it manually: |
|---|
| 67 | |
|---|
| 68 | # ifconfig eth0 inet6 fdba:dc55:48c7::XX:YY/64 |
|---|
| 69 | |
|---|
| 70 | 3. Check your interface: |
|---|
| 71 | |
|---|
| 72 | # ifconfig eth0 inet6 |
|---|
| 73 | |
|---|
| 74 | -> do you see an IPv6 address starting with fdba:... ? |
|---|
| 75 | |
|---|
| 76 | 4. Repeat steps 1 - 3 above for: |
|---|
| 77 | |
|---|
| 78 | - auth2.grpX |
|---|
| 79 | - resolv.grpX |
|---|
| 80 | |
|---|
| 81 | 5. Check that the 3 hosts can ping each other: |
|---|
| 82 | |
|---|
| 83 | # ping6 fdba:dc55:48c7::XX:YY (where XX = group number, YY = IP of host) |
|---|
| 84 | |
|---|
| 85 | 6. Can you ping the gateway ? |
|---|
| 86 | |
|---|
| 87 | # ping6 fdba:dc55:48c7::0000:254 |
|---|
| 88 | |
|---|
| 89 | 7. What is another way to express: |
|---|
| 90 | |
|---|
| 91 | fdba:dc55:48c7::0000:254 ? |
|---|
| 92 | |
|---|
| 93 | II. Auto configuration with RA/RS |
|---|
| 94 | --------------------------------- |
|---|
| 95 | |
|---|
| 96 | 1. On AUTH1, edit /etc/rc.conf, and add |
|---|
| 97 | |
|---|
| 98 | ipv6_activate_all_interfaces="YES" |
|---|
| 99 | |
|---|
| 100 | Save and exit, and re-run the ipv6addrctl configuration: |
|---|
| 101 | |
|---|
| 102 | # service ip6addrctl start |
|---|
| 103 | |
|---|
| 104 | 2. Force an IPv6 sollicitaion |
|---|
| 105 | |
|---|
| 106 | # rtsol -F eth0 |
|---|
| 107 | |
|---|
| 108 | 3. Check your IP configuration |
|---|
| 109 | |
|---|
| 110 | # ifconfig eth0 inet6 |
|---|
| 111 | |
|---|
| 112 | -> You should now see an additional IPv6 address starting with fdba:... |
|---|
| 113 | |
|---|
| 114 | Try and ask other participants in the class to ping your |
|---|
| 115 | autoconfigured IPv6 address. |
|---|
| 116 | |
|---|
| 117 | 4. If you see another prefix than fdba:dc55:... |
|---|
| 118 | |
|---|
| 119 | When you run "ifconfig eth0 inet", do you see another prefix |
|---|
| 120 | than fdba:dc55:, then it is probable that you have a routable |
|---|
| 121 | IPv6 prefix configured as well! |
|---|
| 122 | |
|---|
| 123 | Test ipv6 connectivity to the Internet like this: |
|---|
| 124 | |
|---|
| 125 | # dig +short @10.20.0.254 ipv6.google.com AAAA |
|---|
| 126 | |
|---|
| 127 | Try and ping the IPv6 address returned by dig: |
|---|
| 128 | |
|---|
| 129 | # pin6 2404:6800:8005::67 |
|---|
| 130 | |
|---|
| 131 | Try and use the "mtr" command to see the path: |
|---|
| 132 | |
|---|
| 133 | # mtr -6 2404:6800:8005::67 |
|---|
| 134 | |
|---|
| 135 | ... |
|---|
| 136 | |
|---|
| 137 | BE AWARE that your machine is now connected, without filtering, to the |
|---|
| 138 | IPv6 Internet! |
|---|
| 139 | |
|---|