Manual:IPv6/ND: Difference between revisions
No edit summary |
|||
Line 225: | Line 225: | ||
==Examples== | ==Examples== | ||
===Stateless autoconfiguration example=== | |||
<pre> | |||
[admin@MikroTik] > ipv6 address print | |||
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local | |||
# ADDRESS INTERFACE ADVERTISE | |||
0 G fc00:1::1/64 ether1 yes | |||
</pre> | |||
As in example above <b>advertise</b> flag is enabled which indicates that dynamic <code>/ipv6 nd prefix</code> entry is added. | |||
<pre> | |||
[admin@MikroTik] > ipv6 nd prefix print | |||
Flags: X - disabled, I - invalid, D - dynamic | |||
0 D prefix=fc00:1::/64 interface=ether1 on-link=yes autoconfig=yes | |||
valid-lifetime=4w2d preferred-lifetime=1w | |||
</pre> | |||
On a host that is directly attached to the router we see that an address was added. The address consists of prefix part (first 64 bits) that takes prefix from the prefix advertisement, and host part (last 64 bits) that is automatically generated from local MAC address: | |||
atis@atis-desktop:~$ ip -6 addr | |||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 | |||
inet6 ::1/128 scope host | |||
valid_lft forever preferred_lft forever | |||
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 | |||
<b> inet6 fc00:1::21a:4dff:fe56:1f4d/64 scope global dynamic | |||
valid_lft 2588363sec preferred_lft 601163sec</b> | |||
inet6 fe80::21a:4dff:fe56:1f4d/64 scope link | |||
valid_lft forever preferred_lft forever | |||
The host has received the ''fc00:1::/64'' prefix from the router and configured an address with it. | |||
There is also an option to redistribute [[M:IP/DNS | DNS]] server information using RADVD: | |||
<pre> | |||
[admin@MikroTik] > ip dns set secondary-dns=fc00:1::2 | |||
[admin@MikroTik] > ip dns print | |||
primary-dns: 10.0.0.1 | |||
secondary-dns: fc00:1::2 | |||
... | |||
[admin@MikroTik] > ipv6 nd set [f] advertise-dns=yes | |||
</pre> | |||
You will need a running client side software with Router Advertisement DNS support to take advantage of the advertised DNS information. | |||
==See Also== | ==See Also== |
Revision as of 10:11, 4 June 2010
Applies to RouterOS: v3, v4 +
Summary
Sub-menu: /ipv6 nd
Standards: RFC 2462, RFC 2461
Package : IPv6
RouterOS has Ipv6 Neighbor Detection and stateless address autoconfiguration support using Router Advertisement Daemon (RADVD).
Stateless address autoconfiguration
A highly useful feature of IPv6 is the ability to automatically configure itself without the use of a stateful configuration protocol like DHCP.
There are several types of autoconfiguration:
- stateless - address configuration is done by received Router Advertisement messages. These messages include stateless address prefixes and require that host is not using stateful address configuration protocol.
- statefull - address configuration is done by using stateful address configuration protocol (DHCPv6). Stateful protocol is used if RA messages do not include address prefixes.
- both - RA messages include stateless address prefixes and require that hosts use a stateful address configuration protocol.
Note: Address autoconfiguration can only be performed on multicast-capable interfaces.
Neighbor discovery
Sub-menu: /ipv6 nd
In this submenu IPv6 Neighbor Discovery (ND) protocol is configured. Nodes (hosts and routers) use Neighbor Discovery to find default routers and to determine the link-layer addresses for neighbors known to reside on attached links and to quickly purge cached values that become invalid.
Properties
Property | Description |
---|---|
advertise-dns (yes | no; Default: no) | Option to redistribute DNS server information using RADVD. You will need a running client side software with Router Advertisement DNS support to take advantage of the advertised DNS information. |
advertise-mac-address (yes | no; Default: yes) | When set, the link-layer address of the outgoing interface is included in the RA. |
comment (string; Default: ) | Descriptive name of an item |
disabled (yes | no; Default: no) | Whether item is disabled or not. By default entry is enabled. |
hop-limit (unspecified | integer[0..4294967295]; Default: unspecified) | The default value that should be placed in the Hop Count field of the IP header for outgoing (unicast) IP packets. |
interface (all | string; Default: ) | Interface on which to run neighbor discovery.
|
managed-address-configuration (yes | no; Default: no) | Flag indicates whether hosts should use stateful autoconfiguration (DHCPv6) to obtain addresses. |
mtu (unspecified | integer[0..4294967295]; Default: unspecified) | The MTU option is used in router advertisement messages to insure that all nodes on a link use the same MTU value in those cases where the link MTU is not well known.
|
other-configuration (yes | no; Default: no) | Flag indicates whether hosts should use stateful autoconfiguration to obtain additional information (excluding addresses). |
ra-delay (time; Default: 3s) | The minimum time allowed between sending multicast router advertisements from the interface. |
ra-interval (time[3s..20m50s]-time[4s..30m]; Default: 3m20s-10m) | min-max interval allowed between sending unsolicited multicast router advertisements from the interface. |
ra-lifetime (none | time; Default: 30m) | |
reachable-time (unspecified | time[0..1h]; Default: unspecified) | The time that a node assumes a neighbor is reachable after having received a reachability confirmation. Used by the Neighbor Unreachability Detection algorithm (see Section 7.3 of RFC 2461) |
retransmit-interval (unspecified | time; Default: unspecified) | The time between retransmitted Neighbor Solicitation messages. Used by address resolution and the Neighbor Unreachability Detection algorithm (see Sections 7.2 and 7.3 of RFC 2461) |
Prefix
Sub-menu: /ipv6 nd prefix
Prefix information sent in RA messages used by stateless address auto-configuration.
Note: The autoconfiguration process applies only to hosts and not routers.
Properties
Property | Description |
---|---|
6to4-interface (none | string; Default: ) | If this option is specified, this prefix will be combined with the IPv4 address of interface name to produce a valid 6to4 prefix. The first 16 bits of this prefix will be replaced by 2002 and the next 32 bits of this prefix will be replaced by the IPv4 address assigned to interface name at configuration time. The remaining 80 bits of the prefix (including the SLA ID) will be advertised as specified in the configuration file. |
autonomous (yes | no; Default: yes) | When set, indicates that this prefix can be used for autonomous address configuration. Otherwise prefix information is silently ignored. |
comment (string; Default: ) | Descriptive name of an item |
disabled (yes | no; Default: no) | Whether item is disabled or not. By default entry is enabled. |
on-link (yes | no; Default: yes) | When set, indicates that this prefix can be used for on-link determination. When not set the advertisement makes no statement about on-link or off-link properties of the prefix. For instance, the prefix might be used for address configuration with some of the addresses belonging to the prefix being on-link and others being off-link. |
preferred-lifetime (infinity | time; Default: 1w) | Timeframe (relative to the time the packet is sent) after which generated address becomes "deprecated". Deprecated is used only for already existing connections and is usable until valid-lifetime expires. |
prefix (ipv6 prefix; Default: ::/64) | Prefix from which stateless address autoconfiguration generates the valid address. |
valid-lifetime (infinity | time; Default: 4w2d) | The length of time (relative to the time the packet is sent) an address remains in the valid state. The valid-lifetime must be greater than or equal to the preferred-lifetime. |
interface (string; Default: ) | Interface name on which stateless auto-configuration will be running. |
Examples
Stateless autoconfiguration example
[admin@MikroTik] > ipv6 address print Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local # ADDRESS INTERFACE ADVERTISE 0 G fc00:1::1/64 ether1 yes
As in example above advertise flag is enabled which indicates that dynamic /ipv6 nd prefix
entry is added.
[admin@MikroTik] > ipv6 nd prefix print Flags: X - disabled, I - invalid, D - dynamic 0 D prefix=fc00:1::/64 interface=ether1 on-link=yes autoconfig=yes valid-lifetime=4w2d preferred-lifetime=1w
On a host that is directly attached to the router we see that an address was added. The address consists of prefix part (first 64 bits) that takes prefix from the prefix advertisement, and host part (last 64 bits) that is automatically generated from local MAC address:
atis@atis-desktop:~$ ip -6 addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 fc00:1::21a:4dff:fe56:1f4d/64 scope global dynamic valid_lft 2588363sec preferred_lft 601163sec inet6 fe80::21a:4dff:fe56:1f4d/64 scope link valid_lft forever preferred_lft forever
The host has received the fc00:1::/64 prefix from the router and configured an address with it.
There is also an option to redistribute DNS server information using RADVD:
[admin@MikroTik] > ip dns set secondary-dns=fc00:1::2 [admin@MikroTik] > ip dns print primary-dns: 10.0.0.1 secondary-dns: fc00:1::2 ... [admin@MikroTik] > ipv6 nd set [f] advertise-dns=yes
You will need a running client side software with Router Advertisement DNS support to take advantage of the advertised DNS information.
See Also
[ Top | Back to Content ]