IPv6 Διευθυνσιοδότηση

Από AWMN-WiKi

Μετάβαση σε: πλοήγηση, αναζήτηση

Πίνακας περιεχομένων

Εισαγωγή

Η μετάβαση στο πρωτόκολλο IPv6 γίνεται σε πρώτη φάση με την μέθοδο dual-stack. Οι διεπαφές έχουν ταυτόχρονα IPv4 και IPv6 διευθύνσεις ενώ λειτουργούν παράλληλα και τα δύο πρωτόκολλα. Έτσι η παρούσα λειτουργία του δικτύου δεν επηρεάζεται.

Για την επιλογή του Πανελλαδικού IPv6 Δικτύου χρησιμοποιείται η Unique Local Address (RFC4193) fdd4:f629::/32. Η δημιουργία του έγινε τυχαία με αυτό το scirpt. Όπως παρατηρείτε, το υποδίκτυο δεν έχει πρόθεμα /48 όπως προβλέπεται από το RFC αλλά /32. Αυτή η παραβίαση του RFC έγινε ώστε να μη χρειαστεί να μειώσουμε τα διαθέσιμα bit για τα δίκτυα και υποδίκτυα του κάθε κόμβου (βλέπε μορφή διεύθυνσης)

Μορφή Διεύθυνσης

7 bits 1 bit 24 bits 16 bits 16 bits 64 bits
Prefix L Global ID Network ID Subnet ID Interface ID

Υπόμνημα

Prefix FC00::/7
L 1
Global ID 00D4:F629
Network ID 1-to-1 mapping of Node IPv4 8-23 bits
Subnet ID Node Subnet ID
Interface ID Node Interface ID


Interface ID (EUI-64)

One of IPv6's key benefits over IPv4 is its capability for automatic interface addressing. By implementing the IEEE's 64-bit Extended Unique Identifier (EUI-64) format, a host can automatically assign itself a unique 64-bit IPv6 interface identifier without the need for manual configuration or DHCP. This is accomplished on Ethernet interfaces by referencing the already unique 48-bit MAC address, and reformatting that value to match the EUI-64 specification.

RFC 2373 dictates the conversion process, which can be described as having two steps. The first step is to convert the 48-bit MAC address to a 64-bit value. To do this, we break the MAC address into its two 24-bit halves: the Organizationally Unique Identifier (OUI) and the NIC specific part. The 16-bit hex value 0xFFFE is then inserted between these two halves to form a 64-bit address.

eui64_step1.png

Why 0xFFFE? As explained in the IEEE's Guidelines for EUI-64 Registration Authority, this is a reserved value which equipment manufacturers cannot include in "real" EUI-64 address assignments. In other words, any EUI-64 address having 0xFFFE immediately following its OUI portion can be recognized as having been generated from an EUI-48 (or MAC) address.

The second step is to invert the universal/local (U/L) flag (bit 7) in the OUI portion of the address. Globally unique addresses assigned by the IEEE originally have this bit set to zero, indicating global uniqueness. Likewise, locally created addresses, such as those used for virtual interfaces or a MAC address manually configured by an administrator, will have this bit set to one. The U/L bit is inverted when using an EUI-64 address as an IPv6 interface ID.

eui64_step2.png

Again, you're probably wondering why this is done. The answer lies buried in section 2.5.1 of RFC 2373:

The motivation for inverting the "u" bit when forming the interface identifier is to make it easy for system administrators to hand configure local scope identifiers when hardware tokens are not available. This is expected to be case for serial links, tunnel end-points, etc. The alternative would have been for these to be of the form 0200:0:0:1, 0200:0:0:2, etc., instead of the much simpler ::1, ::2, etc.

The important part to remember here is that the scope of the address never changes: global addresses are still global and local addresses are still local. Rather, the meaning of the bit is inverted for convenience, so the value of the bit must be inverted as well.

We can see this conversion in action when we assign an IPv6 address to a router interface. First, take note of the interface's MAC address (this is typically the same as its burned-in address, or BIA).


Router# show interface f0/0
FastEthernet0/0 is up, line protocol is down
  Hardware is Gt96k FE, address is 0012.7feb.6b40 (bia 0012.7feb.6b40)
...

After assigning an EUI-64-designated IPv6 address to the interface, we can verify that the interface ID has been drawn from the MAC address in the process described for both the assigned and the link local address:


Router(config)# interface f0/0
Router(config-if)# ipv6 address 2001:db8::/64 eui-64
Router(config-if)# do show ipv6 interface f0/0
FastEthernet0/0 is up, line protocol is down
  IPv6 is enabled, link-local address is FE80::212:7FFF:FEEB:6B40 [TEN]
  No Virtual link-local address(es):
  Global unicast address(es):
2001:DB8::212:7FFF:FEEB:6B40, subnet is 2001:DB8::/64 [EUI/TEN]
...

Παράδειγμα

Έστω IPv4 Subnet Αθηνάς 10.21.250.0/24

21.250 Hex-> 15.fa

fdd4:f629:15fa::/48

To πρώτο μου subnet

fdd4:f629:15fa:0001::/64

H πρώτη μου IP

Έστω interface με MAC = 00:1B:21:13:4B:18

fdd4:f629:15fa:1:21b:21ff:fe13:4b18/64

HellasWireless IPv6

Νομός Πληθυσμός Network IDs Network ID Range Route
Αττική 3761810 96 (64+32) * 256 fdd4:f629:0000::/48 - fdd4:f629:5fff::/48 fdd4:f629:0000::/34 fdd4:f629:4000::/35
Θεσσαλονίκης 1057825 32 * 256 fdd4:f629:6000::/48 - fdd4:f629:7fff::/48 fdd4:f629.6000::/35
Λάρισας 279305 8 * 256 fdd4:f629:8000::/48 - fdd4:f629:87ff::/48 fdd4:f629:8000::/37
Αχαΐας 322789 8 * 256 fdd4:f629:8800::/48 - fdd4:f629:8fff::/48 fdd4:f629:8800::/37
Ευβοίας 215136 4 * 256 fdd4:f629:9000::/48 - fdd4:f629:93ff::/48 fdd4:f629:9000::/38
Μεσσηνίας 176876 4 * 256 fdd4:f629:9400::/48 - fdd4:f629:97ff::/48 fdd4:f629:9400::/38
Μαγνησίας 206995 4 * 256 fdd4:f629:9800::/48 - fdd4:f629:9bff::/48 fdd4:f629:9800::/38
Δωδεκανήσων 190071 4 * 256 fdd4:f629:9c00::/48 - fdd4:f629:9fff::/48 fdd4:f629:9c00::/38
Καβάλας 145054 2 * 256 fdd4:f629:a000::/48 - fdd4:f629:a1ff::/48 fdd4:f629:a000::/39
Πέλλας 145797 2 * 256 fdd4:f629:a200::/48 - fdd4:f629:a3ff::/48 fdd4:f629:a200::/39
Σερρών 200916 4 * 256 fdd4:f629:a400::/48 - fdd4:f629:a7ff::/48 fdd4:f629:a400::/38
Αργολίδας 105770 2 * 256 fdd4:f629:a800::/48 - fdd4:f629:a9ff::/48 fdd4:f629:a800::/39
Ξάνθης 101856 2 * 256 fdd4:f629:aa00::/48 - fdd4:f629:abff::/48 fdd4:f629:aa00::/39
Αρκαδίας 102035 2 * 256 fdd4:f629:ac00::/48 - fdd4:f629:adff::/48 fdd4:f629:ac00::/39
Δράμας 103975 2 * 256 fdd4:f629:ae00::/48 - fdd4:f629:afff::/48 fdd4:f629:ae00::/39
Ηρακλείου 292489 8 * 256 fdd4:f629:b000::/48 - fdd4:f629:b7ff::/48 fdd4:f629:b000::/37
Ιωαννίνων 170239 4 * 256 fdd4:f629:b800::/48 - fdd4:f629:bbff::/48 fdd4:f629:b800::/38
Κοζάνης 155324 4 * 256 fdd4:f629:bc00::/48 - fdd4:f629:bfff::/48 fdd4:f629:bc00::/38
Κορίνθου 154624 4 * 256 fdd4:f629:c000::/48 - fdd4:f629:c3ff::/48 fdd4:f629:c000::/38
Χανίων 150387 2 * 256 fdd4:f629:c400::/48 - fdd4:f629:c5ff::/48 fdd4:f629:c400::/39
Έβρου 149354 2 * 256 fdd4:f629:c600::/48 - fdd4:f629:c7ff::/48 fdd4:f629:c600::/39
Φθιώτιδας 178771 4 * 256 fdd4:f629:c800::/48 - fdd4:f629:cbff::/48 fdd4:f629:c800::/38
Ημαθίας 143618 2 * 256 fdd4:f629:cc00::/48 - fdd4:f629:cdff::/48 fdd4:f629:cc00::/39
Τρικάλων 138047 2 * 256 fdd4:f629:ce00::/48 - fdd4:f629:cfff::/48 fdd4:f629:ce00::/39
Βοιωτίας 131085 2 * 256 fdd4:f629:d000::/48 - fdd4:f629:d1ff::/48 fdd4:f629:d000::/39
Πιερίας 129846 2 * 256 fdd4:f629:d200::/48 - fdd4:f629:d3ff::/48 fdd4:f629:d200::/39
Καρδίτσας 129541 2 * 256 fdd4:f629:d400::/48 - fdd4:f629:d5ff::/48 fdd4:f629:d400::/39
Κυκλάδων 112615 2 * 256 fdd4:f629:d600::/48 - fdd4:f629:d7ff::/48 fdd4:f629:d600::/39
Κέρκυρας 111975 2 * 256 fdd4:f629:d800::/48 - fdd4:f629:d9ff::/48 fdd4:f629:d800::/39
Ροδόπης 110828 2 * 256 fdd4:f629:da00::/48 - fdd4:f629:dbff::/48 fdd4:f629:da00::/39
Λέσβου 109118 2 * 256 fdd4:f629:dc00::/48 - fdd4:f629:ddff::/48 fdd4:f629:dc00::/39
Χαλκιδικής 107156 2 * 256 fdd4:f629:de00::/48 - fdd4:f629:dfff::/48 fdd4:f629:de00::/39
Ηλείας 193288 4 * 256 fdd4:f629:e000::/48 - fdd4:f629:e3ff::/48 fdd4:f629:e000::/38
Αιτωλοακαρνανίας 224429 4 * 256 fdd4:f629:e400::/48 - fdd4:f629:e7ff::/48 fdd4:f629:e400::/38
Λακωνίας 99637 2 * 256 fdd4:f629:e800::/48 - fdd4:f629:e9ff::/48 fdd4:f629:e800::/39
Κιλκίς 89056 2 * 256 fdd4:f629:ea00::/48 - fdd4:f629:ebff::/48 fdd4:f629:ea00::/39
Ρεθύμνου 81936 2 * 256 fdd4:f629:ec00::/48 - fdd4:f629:edff::/48 fdd4:f629:ec00::/39
Άρτας 78134 2 * 256 fdd4:f629:ee00::/48 - fdd4:f629:efff::/48 fdd4:f629:ee00::/39
Λασιθίου 76319 2 * 256 fdd4:f629:f000::/48 - fdd4:f629:f1ff::/48 fdd4:f629:f000::/39
Πρέβεζας 59356 1 * 256 fdd4:f629:f200::/48 - fdd4:f629:f2ff::/48 fdd4:f629:f200::/40
Φλώρινας 54768 1 * 256 fdd4:f629:f300::/48 - fdd4:f629:f3ff::/48 fdd4:f629:f300::/40
Καστοριάς 53483 1 * 256 fdd4:f629:f400::/48 - fdd4:f629:f4ff::/48 fdd4:f629:f400::/40
Χίου 53408 1 * 256 fdd4:f629:f500::/48 - fdd4:f629:f5ff::/48 fdd4:f629:f500::/40
Φωκίδας 48284 1 * 256 fdd4:f629:f600::/48 - fdd4:f629:f6ff::/48 fdd4:f629:f600::/40
Θεσπρωτίας 46091 1 * 256 fdd4:f629:f700::/48 - fdd4:f629:f7ff::/48 fdd4:f629:f700::/40
Σάμου 43595 1 * 256 fdd4:f629:f800::/48 - fdd4:f629:f8ff::/48 fdd4:f629:f800::/40
Κεφαλληνίας 39488 1 * 256 fdd4:f629:f900::/48 - fdd4:f629:f9ff::/48 fdd4:f629:f900::/40
Ζακύνθου 39015 1 * 256 fdd4:f629:fa00::/48 - fdd4:f629:faff::/48 fdd4:f629:fa00::/40
Γρεβενών 37947 1 * 256 fdd4:f629:fb00::/48 - fdd4:f629:fbff::/48 fdd4:f629:fb00::/40
Ευρυτανίας 32053 1 * 256 fdd4:f629:fc00::/48 - fdd4:f629:fcff::/48 fdd4:f629:fc00::/40
Λευκάδας 22506 1 * 256 fdd4:f629:fd00::/48 - fdd4:f629:fdff::/48 fdd4:f629:fd00::/40
Δεσμευμένα 2 * 256 fdd4:f629:fe00::/48 - fdd4:f629:ffff::/48 fdd4:f629:fe00::/39
Σύνολα 10964020 256 * 256


Βρείτε το δικό σας Subnet.

Το παρακάτω Script Βρίσκει την IP από το Subnet το οποίο έρχεστε και υπολογίζει αυτόματα την αντίστοιχη IPv6 διεύθυνση αυτού του subnet.

Βρείτε το IPv6 Subnet σας