Manual:IPv6/Route

From MikroTik Wiki
< Manual:IPv6
Revision as of 13:45, 1 June 2010 by Marisb (talk | contribs) (Created page with '{{Versions|v3, v4 +}} __TOC__ <div class=manual> ==Summary== <p id="shbox"><b>Sub-menu:</b> <code>/ipv6 route</code><br /> <b>Standards:</b> <code>RFC 4291</code> </p> <br /> …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Version.png

Applies to RouterOS: v3, v4 +

Summary

Sub-menu: /ipv6 route
Standards: RFC 4291


For static routing, the basic principles of IPv6 are exactly the same as for IPv4.

Simple ipv6 routing example:

[admin@MikroTik] > ipv6 route add dst-address=2001::/16 gateway=fc00:dead:beef::2
[admin@MikroTik] > ipv6 route print detail
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable
 0 A S  dst-address=2001::/16 gateway=fc00:dead:beef::2 reachable ether1 distance=1
        scope=30 target-scope=10

Most notable difference between ipv4 and ipv6 is that link local addresses can be used as route nexthops if interface is specified:

[admin@MikroTik] > ipv6 route add dst-address=2002::/16 gateway=fe80::21a:4dff:fe56:1f4d%ether1
[admin@MikroTik] > ipv6 route print detail
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable
 ...
 1 A S  dst-address=2002::/16
        gateway=fe80::21a:4dff:fe56:1f4d%ether1 reachable distance=1
        scope=30 target-scope=10

Another small difference is that there are no blackhole or prohibit routes, only unreachable.

IPv4 and IPv6 routing also differs in the area of multipath route. Technically speaking, in Linux kernel there is no support for multiple nexthops for a IPv6 route. However, RouterOS allows to set more than one gateway address for a single route. In this case, a route is installed in the kernel for each of the different interfaces to which route's nexthops belong.

Example:

[admin@MikroTik] > ipv6 address p
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local
 #    ADDRESS                                     INTERFACE         ADVERTISE
 0  G fc00:1::1/64                                ether1            no
 1  G fc00:2::1/64                                ether2            no
[admin@MikroTik] > ipv6 route add dst-address=2001::/16 gateway=fc00:1::2,fc00:2::2
[admin@MikroTik] > ipv6 route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable
 #      DST-ADDRESS              GATEWAY                      DISTANCE
 0 A S  2001::/16                fc00:2::2 reachable ether1,  1
                                 fc00:1::2 reachable ether2

When printing the Linux kernel route table, we see that two routes were added, not one:

# ip -6 route
2001::/16 via fc00:2::2 dev eth1  proto static  metric 1024  mtu 1500 advmss 1440 metric10 4294967295
2001::/16 via fc00:1::2 dev eth0  proto static  metric 1024  mtu 1500 advmss 1440 metric10 4294967295
...

Properties

Property Description
address (Address/Netmask; Default: ) Ipv6 address. Allowed netmask range is 0..128
address (Address/Netmask; Default: ) Ipv6 address. Allowed netmask range is 0..128

[ Top | Back to Content ]