Manual:IPv6/Address: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
Created page with '{{Versions|v3, v4 +}} __TOC__ <div class=manual> ==Summary== <p id="shbox"><b>Sub-menu:</b> <code>/ipv6 address</code><br /> <b>Standards:</b> <code>RFC 4291</code> </p> <br /…'
 
Line 10: Line 10:
</p>
</p>
<br />
<br />
<p>
 
</p>
IPv6 uses 16 bytes addresses compared to 4 byte addresses in IPv4. IPv6 address syntax and types are described in RFC 4291.
 
There are multiple IPv6 address types, that can be recognized by their prefix. RouterOS distinguishes the following:
* multicast (with prefix ff00::/8)
* link-local (with prefix fe80::/10)
* loopback (the address ::1/128)
* unspecified (the address ::/128)
* other (all other addresses, including the obsoleted site-local addresses, and RFC 4193 unique local addresses; they all are treated as global unicast).
 
One difference between IPv6 and IPv4 addressing is that IPv6 automatically generates a link-local IPv6 address for each active interface that has IPv6 support.
 
==EUI-64==
 
IPv6 automatically generated addresses consist of two parts:
* 64 bit long network prefix (usually manually configured for routers, and advertised via RADVD to host);
* 64 bit long unique identifier.
 
The 64 bit unique ID is generated from hardware serial numbers or MAC addresses. In case of a 48 bit MAC address, this so called EUI-64 (Extended Unique Identifier) is generated by the following algorithm:
# use the first 3 bytes of the MAC address (OUI) as the first 3 bytes for the EUI-64, except that the second-least significant bit of the most significant byte is inverted;
# insert 0xFF and 0xFE as 4th and 5th bytes respectively for the EUI-64;
# use the last 3 bytes of the MAC address as the last 3 bytes for the EUI-64;
[[File:ipv6eui64.png]]
 
In RouterOS, if the ''eui-64'' parameter of an address is configured, the last 64 bits of that address will be automatically generated and updated using interface's MAC address. These last bits must be configured to be zero for this case.
Example:
<pre>
[admin@MikroTik] > ipv6 address add address=fc00:3::/64 interface=ether3 eui-64=yes
[admin@MikroTik] > ipv6 address print
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local
#    ADDRESS                                    INTERFACE                  ADVERTISE
...
5  G fc00:3::20c:42ff:fe1d:3d4/64                ether3                    yes
[admin@MikroTik] > interface ethernet set ether3 mac-address=10:00:00:00:00:01
[admin@MikroTik] > ipv6 address print
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local
#    ADDRESS                                    INTERFACE                  ADVERTISE
...
5  G fc00:3::1200:ff:fe00:1/64                  ether3                    yes
</pre>


==Properties==
==Properties==

Revision as of 08:07, 19 May 2010

Applies to RouterOS: v3, v4 +

Summary

Sub-menu: /ipv6 address
Standards: RFC 4291


IPv6 uses 16 bytes addresses compared to 4 byte addresses in IPv4. IPv6 address syntax and types are described in RFC 4291.

There are multiple IPv6 address types, that can be recognized by their prefix. RouterOS distinguishes the following:

  • multicast (with prefix ff00::/8)
  • link-local (with prefix fe80::/10)
  • loopback (the address ::1/128)
  • unspecified (the address ::/128)
  • other (all other addresses, including the obsoleted site-local addresses, and RFC 4193 unique local addresses; they all are treated as global unicast).

One difference between IPv6 and IPv4 addressing is that IPv6 automatically generates a link-local IPv6 address for each active interface that has IPv6 support.

EUI-64

IPv6 automatically generated addresses consist of two parts:

  • 64 bit long network prefix (usually manually configured for routers, and advertised via RADVD to host);
  • 64 bit long unique identifier.

The 64 bit unique ID is generated from hardware serial numbers or MAC addresses. In case of a 48 bit MAC address, this so called EUI-64 (Extended Unique Identifier) is generated by the following algorithm:

  1. use the first 3 bytes of the MAC address (OUI) as the first 3 bytes for the EUI-64, except that the second-least significant bit of the most significant byte is inverted;
  2. insert 0xFF and 0xFE as 4th and 5th bytes respectively for the EUI-64;
  3. use the last 3 bytes of the MAC address as the last 3 bytes for the EUI-64;

In RouterOS, if the eui-64 parameter of an address is configured, the last 64 bits of that address will be automatically generated and updated using interface's MAC address. These last bits must be configured to be zero for this case. Example:

[admin@MikroTik] > ipv6 address add address=fc00:3::/64 interface=ether3 eui-64=yes
[admin@MikroTik] > ipv6 address print
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local
 #    ADDRESS                                     INTERFACE                  ADVERTISE
 ...
 5  G fc00:3::20c:42ff:fe1d:3d4/64                ether3                     yes
[admin@MikroTik] > interface ethernet set ether3 mac-address=10:00:00:00:00:01
[admin@MikroTik] > ipv6 address print
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local
 #    ADDRESS                                     INTERFACE                  ADVERTISE
 ...
 5  G fc00:3::1200:ff:fe00:1/64                   ether3                     yes

Properties

Property Description
address (Address/Netmask; Default: ) Ipv6 address. Allowed netmask range is 0..128
advertise (yes | no; Default: no)
comment (string; Default: ) Descriptive name of an item
disabled (yes | no; Default: no) Whether address is disabled or not. By default it is disabled
eui-64 (yes | no; Default: no)
interface (string; Default: ) Name of an interface on which Ipv6 address is set.


Read-only properties

Property Description
actual-interface (string) Actual interface on which address is set up. For example, if address was configured on ethernet interface and ethernet interface was added to bridge, then actual interface is bridge not ethernet.
dynamic (yes | no) Whether address is dynamically created
global (yes | no) Whether address is global
invalid (yes | no)
link-local (yes | no) Whether address is link local

Example



[ Top | Back to Content ]