Link-Local Address
     にまつわる
     エトセトラ
   2012/11/03 IPv6SG #03

       @twovs
             1
                           1
agenda
• 自己紹介
• クイズ
• 聞きたいこと
• 調べてみたこと
• まとめ
• 気付いたこと    2
                2
自己紹介
• @twovs
• 無線LAN装置の開発(1999∼2004)
• オンラインゲームのシステム管理者
 (2004∼)

• ただし、ゲームには全く興味無し...
• ZFS 最高 ! beadm 便利 !
            3
                          3
クイズ
Link-Local Address は
fe80::0/10 ですか ? (YES/NO)
つまり、最初の 10bit が

'1111 1110 10' だと Link-Local ?
1111 1110 1000 0000 : 0000 0000 0000 0000 : ...

   f   e    8    0   :       0   0   0   0   : ...

  
                         4
                                                     4
fe80:1::1            や   febf::1 も
Link-Local Address ?


1111 1110 1000 0000 : 0000 0000 0000 0001 : ...

  f    e    8    0   :       0   0   0   1   : ...

1111 1110 1011 1111 : 0000 0000 0000 0000 : ...

  f    e   b     f   :       0   0   0   0   : ...

                         5
                                                     5
答え = NO                            (だと思う)


 RFC4291 Section 2.5.6.

 Link-Local IPv6 Unicast Addresses

 Link-Local addresses are for use on a
 single link. Link-Local addresses have the
 following format:
|   10     |
| bits     |         54 bits         |          64 bits           |
+----------+-------------------------+----------------------------+
|1111111010|           0             |       interface ID         |
+----------+-------------------------+----------------------------+

                               6
                                                                      6
fe80:1::1            や   febf::1 は
11-64 bits が 0 でないから

Link-Local Address ではないと思う


1111 1110 1000 0000 : 0000 0000 0000 0001 : ...

  f    e    8    0   :       0   0   0   1   : ...

1111 1110 1011 1111 : 0000 0000 0000 0000 : ...

  f    e   b     f   :       0   0   0   0   : ...

                         7
                                                     7
でも Cisco は...
febf::1 (11-64bit = '0' でない) が
Link-Local Addr になる(なってしまう)
Cisco1812#show ipv6 interface FastEthernet 0
FastEthernet0 is up, line protocol is up
  IPv6 is enabled, link-local address is FEBF::1
  No Virtual link-local address(es):
  No global unicast address is configured
  Joined group address(es):
    FF02::1
    FF02::2
    FF02::1:FF00:1
                                8
                                                   8
でも CentOS は...
febf::1 (11-64bit = '0' でない) が
scope=link になる(なってしまう)
[CentOS6.3]# ip -f inet6 addr show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 fe80::a00:27ff:febb:1443/64 scope link
       valid_lft forever preferred_lft forever
[CentOS6.3]# ip -f inet6 addr add febf::1 dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr show dev eth0 scope link
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 febf::1/128 scope link
       valid_lft forever preferred_lft forever
                                 9
                                                                9
でも Solarisは...
febf::1 (11-64bit = '0' でない) が
Link-Local Addr になる(なってしまう)
[Solaris11.1]$ ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v6            static   ok           ::1/128
net0/v6           static   ok           febf::1/10




                                   10
                                                     10
聞きたいこと.1

 サーバに設定する
 DefaultGW どうします?
• 前回の IPv6SG #02 でも質問しました
• HSRP を使うなら Link-Local ?


                 11
                            11
聞きたいこと.2

Loopback Interface に
Link-Local Addr を
設定する?

         12
                       12
聞きたいこと.3

I/F に設定する Link-Local
Addr の prefix 長は
/64 ? それとも /10 ?

         13
                       13
調べてみた
1. デフォルトの prefix length
2. loopback I/F への Link-Local
3. fe80::1 を設定した時の prefix length
4. fe80::64/64 の設定可否
5. fe80::10/10 の設定可否
6. febf::1 を設定した時の prefix length
7. febf::64/64 の設定可否
8. febf::10/10 の設定可否

                   14
                                  14
対象
a. Cisco (IOS 12.4)
b. Linux/CentOS6.3
c. Solaris 11.1
d. SEIL/CLI (4.00/OutsidersEdge)
e. SEIL/SHELL (NetBSD 3.1_STABLE)
f. NetBSD6.0
g. FreeBSD9.0
h. OpenBSD5.1

                      15
                                    15
まとめ
                  1        2              3     4   5    6     7   8

a. Cisco         /10       x             /10    x   x   /10    x   x

b. CentOS6.3     /64       x             /128   o   o   /128   o   o

c. Solaris11.1   /10       x             /10    o   o   /10    o   o

d. SEIL/CLI      /64   fe80::1/64        /64    o   x    x     x   x

e. SEIL/SHELL    /64   fe80::1/64        /64    o   o   /64    o   o

f. NetBSD6.0     /64   fe80::1/64        /64    o   o   /64    o   o

g. FreeBSD9.0    /64   fe80::1/64        /64    o   o   /64    o   o

h. OpenBSD5.1    /64   fe80::1/64        /64    o   o   /64    o   o

                                    16
                                                                       16
気付いたこと.1
                 1        2              3     4   5    6     7   8

a. Cisco        /10       x             /10    x   x   /10    x   x

b. CentOS6.3    /64       x             /128   o   o   /128   x   x

c. Solaris11    /10       x             /10    o   o   /10    o   o

d. SEIL/CLI     /64   fe80::1/64        /64    o   x    x     x   x

e. SEIL/SHELL   /64   fe80::1/64        /64    o   o   /64    o   o

f. NetBSD6.0    /64   fe80::1/64        /64    o   o   /64    o   o

g. FreeBSD9.0   /64      SEIL /64 o o /64
                              のこだわり(?)
                      fe80::1/64                              o   o

h. OpenBSD5.1   /64   fe80::1/64        /64    o   o   /64    o   o

                                   17
                                                                      17
http://www.seil.jp/
  18
                      18
気付いたこと.2
BSD の実装
 In the kernel, an interface index for link-
local scoped address is embedded into
2nd 16bit-word (3rd and 4th byte) in IPv6
address. For example, you may see
something like:

  fe80:1::200:f8ff:fe01:6317
                    FreeBSD Developers' Handbook / Chapter 8 IPv6 Internals

        http://www.freebsd.org/doc/en/books/developers-handbook/ipv6.html#ipv6-scope-index

                                  19
                                                                                             19
[FreeBSD9.0]# ifconfig em0 inet6

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500

           options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>

           nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

[FreeBSD9.0]# ifconfig em0 inet6   fe80:ffff:ffff:ffff:1111:2222:3333:4444/64                      alias

[FreeBSD9.0]# ifconfig em0 inet6

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500

           options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>

           inet6   fe80:0:ffff:ffff:1111:2222:3333:4444%em0                 prefixlen 64 scopeid 0x1

           nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

[FreeBSD9.0]# /usr/sbin/route6d



                                                            自動的に 0 に修正
[FreeBSD9.0]# kill -SIGINT `cat /var/run/route6d.pid

[FreeBSD9.0]# cat /var/run/route6d_dump

15:50:47: Interface Table Dump

  Number of interfaces: 2



                                                        1 (index = 1)
  advertising interfaces:

(snip)

    em0:   index(1)       flags(UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST)

              addr( fe80:1:ffff:ffff:1111:2222:3333:4444)                   mtu(1500) metric(0)

           fe80:1:ffff:ffff:1111:2222:3333:4444/64

(snip)
                                                       20
                                                                                                           20
[FreeBSD9.0]# man route6d

(snip)

 Internally route6d embeds interface
identifier into bit 32 to 63 of link-local
addresses (fe80::xx and ff02::xx) so they
will be visible on internal state dump file
(/var/run/route6d_dump).


                    16 to 31 の間違い

                    21
                                             21
Thank You



    22
            22
[参考] b. CentOS
[CentOS6.3]# ip -f inet6 addr show               dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr add fe80::1        dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr add fe80::64/64 dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr add fe80::10/10 dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr add febf::1        dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr add febf::64/64 dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr add febf::10/10 dev eth0 scope link
[CentOS6.3]# ip -f inet6 addr show               dev eth0 scope link
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000
    inet6 febf::10/10 scope link
       valid_lft forever preferred_lft forever
    inet6 febf::64/64 scope link
       valid_lft forever preferred_lft forever
    inet6 febf::1/128 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::10/10 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::64/64 scope link
       valid_lft forever preferred_lft forever
    inet6 fe80::1/128 scope link
       valid_lft forever preferred_lft forever




                                            23
                                                                       23
[参考] c. Solaris 11.1
[Solaris11.1]# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v6            static   ok           ::1/128
net0/v6           addrconf ok           fe80::a00:27ff:fe63:4cff/10
[Solaris11.1]# ipadm create-addr -T static -a local=fe80::1     net0/IPv6SG3
[Solaris11.1]# ipadm create-addr -T static -a local=fe80::64/64 net0/IPv6SG4
[Solaris11.1]# ipadm create-addr -T static -a local=fe80::10/10 net0/IPv6SG5
[Solaris11.1]# ipadm create-addr -T static -a local=febf::1     net0/IPv6SG6
[Solaris11.1]# ipadm create-addr -T static -a local=febf::64/64 net0/IPv6SG7
[Solaris11.1]# ipadm create-addr -T static -a local=febf::10/10 net0/IPv6SG8
[Solaris11.1]# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v6            static   ok           ::1/128
net0/v6           addrconf ok           fe80::a00:27ff:fe63:4cff/10
net0/IPv6SG3      static   ok           fe80::1/10
net0/IPv6SG4      static   ok           fe80::64/64
net0/IPv6SG5      static   ok           fe80::10/10
net0/IPv6SG6      static   ok           febf::1/10
net0/IPv6SG7      static   ok           febf::64/64
net0/IPv6SG8      static   ok           febf::10/10




                                         24
                                                                               24
[参考] d-1. SEIL(CLI)
SEIL-X1# show status interface lan0
interface lan0:
(snip)
         EthernetAddress=00:E0:4D:xx:xx:xx
         IP   address=192.168.0.1 netmask=255.255.255.0 broadcast=192.168.0.255
         IPv6 address=fe80::2e0:4dff:fexx:xxxx%lan0 prefixlen=64 scopeid 0x1
SEIL-X1# interface lan0 add fe80::1
SEIL-X1# interface lan0 add fe80::64/64
SEIL-X1# interface lan0 add fe80::10/10
                               ^
error: invalid prefix length
SEIL-X1# interface lan0 add febf::1
                               ^
error: invalid address
SEIL-X1# interface lan0 add febf::64/64
                               ^
error: invalid address
SEIL-X1# interface lan0 add febf::10/10
                               ^
error: invalid prefix length




                                             25
                                                                                  25
[参考] d-2. SEIL(CLI)
SEIL-X1# show status interface lan0
interface lan0:
(snip)
         EthernetAddress=00:E0:4D:xx:xx:xx
         IP   address=192.168.0.1 netmask=255.255.255.0 broadcast=192.168.0.255
         IPv6 address=fe80::2e0:4dff:fexx:xxxx%lan0 prefixlen=64 scopeid 0x1
         IPv6 address=fe80::1%lan0 prefixlen=64 scopeid 0x1
         IPv6 address=fe80::64%lan0 prefixlen=64 scopeid 0x1




                                             26
                                                                                  26
[参考] f. NetBSD6.0
[NetBSD6.0]# ifconfig wm0 inet6
wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        (snip)
        inet6 fe80::a00:27ff:fe9a:7e50%wm0 prefixlen 64 scopeid 0x1
[NetBSD6.0]# ifconfig wm0 inet6 fe80::1     alias
[NetBSD6.0]# ifconfig wm0 inet6 fe80::64/64 alias
[NetBSD6.0]# ifconfig wm0 inet6 fe80::10/10 alias
[NetBSD6.0]# ifconfig wm0 inet6 febf::1     alias
[NetBSD6.0]# ifconfig wm0 inet6 febf::64/64 alias
[NetBSD6.0]# ifconfig wm0 inet6 febf::10/10 alias
[NetBSD6.0]# ifconfig wm0 inet6
wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        (snip)
        inet6 fe80::a00:27ff:fe9a:7e50%wm0 prefixlen 64 scopeid 0x1
        inet6 fe80::1%wm0 prefixlen 64 scopeid 0x1
        inet6 fe80::64%wm0 prefixlen 64 scopeid 0x1
        inet6 fe80::10%wm0 prefixlen 10 scopeid 0x1
        inet6 febf::1%wm0 prefixlen 64 scopeid 0x1
        inet6 febf::64%wm0 prefixlen 64 scopeid 0x1
        inet6 febf::10%wm0 prefixlen 10 scopeid 0x1




                                          27
                                                                      27
[参考] g. FreeBSD9.0
[FreeBSD9.0]# ifconfig em0 inet6
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        inet6 fe80::a00:27ff:fe26:2290%em0 prefixlen 64 scopeid 0x1
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
[FreeBSD9.0]# ifconfig em0 inet6 fe80::1        alias
[FreeBSD9.0]# ifconfig em0 inet6 fe80::64/64 alias
[FreeBSD9.0]# ifconfig em0 inet6 fe80::10/10 alias
[FreeBSD9.0]# ifconfig em0 inet6 febf::1        alias
[FreeBSD9.0]# ifconfig em0 inet6 febf::64/64 alias
[FreeBSD9.0]# ifconfig em0 inet6 febf::10/10 alias
[FreeBSD9.0]# ifconfig em0 inet6
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        inet6 fe80::a00:27ff:fe26:2290%em0 prefixlen 64 scopeid 0x1
        inet6 fe80::1%em0 prefixlen 64 scopeid 0x1
        inet6 fe80::64%em0 prefixlen 64 scopeid 0x1
        inet6 fe80::10%em0 prefixlen 10 scopeid 0x1
        inet6 febf::1%em0 prefixlen 64 scopeid 0x1
        inet6 febf::64%em0 prefixlen 64 scopeid 0x1
        inet6 febf::10%em0 prefixlen 10 scopeid 0x1
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>




                                           28
                                                                            28
[参考] h. OpenBSD5.1
[OpenBSD5.1]# ifconfig em0 inet6
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        (snip)
        inet6 fe80::a00:27ff:fe59:ba72%em0 prefixlen 64 scopeid 0x1
[OpenBSD5.1]# ifconfig em0 inet6 fe80::1        alias
[OpenBSD5.1]# ifconfig em0 inet6 fe80::64/64 alias
[OpenBSD5.1]# ifconfig em0 inet6 fe80::10/10 alias
[OpenBSD5.1]# ifconfig em0 inet6 febf::1        alias
[OpenBSD5.1]# ifconfig em0 inet6 febf::64/64 alias
[OpenBSD5.1]# ifconfig em0 inet6 febf::10/10 alias
[OpenBSD5.1]# ifconfig em0 inet6
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        (snip)
        inet6 fe80::a00:27ff:fe59:ba72%em0 prefixlen 64 scopeid 0x1
        inet6 fe80::1%em0 prefixlen 64 scopeid 0x1
        inet6 fe80::64%em0 prefixlen 64 scopeid 0x1
        inet6 fe80::10%em0 prefixlen 10 scopeid 0x1
        inet6 febf::1%em0 prefixlen 64 scopeid 0x1
        inet6 febf::64%em0 prefixlen 64 scopeid 0x1
        inet6 febf::10%em0 prefixlen 10 scopeid 0x1




                                           29
                                                                      29

IPv6SG_03_20121103

  • 1.
    Link-Local Address にまつわる エトセトラ 2012/11/03 IPv6SG #03 @twovs 1 1
  • 2.
    agenda • 自己紹介 • クイズ •聞きたいこと • 調べてみたこと • まとめ • 気付いたこと 2 2
  • 3.
    自己紹介 • @twovs • 無線LAN装置の開発(1999∼2004) •オンラインゲームのシステム管理者 (2004∼) • ただし、ゲームには全く興味無し... • ZFS 最高 ! beadm 便利 ! 3 3
  • 4.
    クイズ Link-Local Address は fe80::0/10ですか ? (YES/NO) つまり、最初の 10bit が '1111 1110 10' だと Link-Local ? 1111 1110 1000 0000 : 0000 0000 0000 0000 : ... f e 8 0 : 0 0 0 0 : ...    4 4
  • 5.
    fe80:1::1 や febf::1 も Link-Local Address ? 1111 1110 1000 0000 : 0000 0000 0000 0001 : ... f e 8 0 : 0 0 0 1 : ... 1111 1110 1011 1111 : 0000 0000 0000 0000 : ... f e b f : 0 0 0 0 : ... 5 5
  • 6.
    答え = NO (だと思う) RFC4291 Section 2.5.6. Link-Local IPv6 Unicast Addresses Link-Local addresses are for use on a single link. Link-Local addresses have the following format: | 10 | | bits | 54 bits | 64 bits | +----------+-------------------------+----------------------------+ |1111111010| 0 | interface ID | +----------+-------------------------+----------------------------+ 6 6
  • 7.
    fe80:1::1 や febf::1 は 11-64 bits が 0 でないから Link-Local Address ではないと思う 1111 1110 1000 0000 : 0000 0000 0000 0001 : ... f e 8 0 : 0 0 0 1 : ... 1111 1110 1011 1111 : 0000 0000 0000 0000 : ... f e b f : 0 0 0 0 : ... 7 7
  • 8.
    でも Cisco は... febf::1(11-64bit = '0' でない) が Link-Local Addr になる(なってしまう) Cisco1812#show ipv6 interface FastEthernet 0 FastEthernet0 is up, line protocol is up IPv6 is enabled, link-local address is FEBF::1 No Virtual link-local address(es): No global unicast address is configured Joined group address(es): FF02::1 FF02::2 FF02::1:FF00:1 8 8
  • 9.
    でも CentOS は... febf::1(11-64bit = '0' でない) が scope=link になる(なってしまう) [CentOS6.3]# ip -f inet6 addr show dev eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 fe80::a00:27ff:febb:1443/64 scope link valid_lft forever preferred_lft forever [CentOS6.3]# ip -f inet6 addr add febf::1 dev eth0 scope link [CentOS6.3]# ip -f inet6 addr show dev eth0 scope link 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 febf::1/128 scope link valid_lft forever preferred_lft forever 9 9
  • 10.
    でも Solarisは... febf::1 (11-64bit= '0' でない) が Link-Local Addr になる(なってしまう) [Solaris11.1]$ ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v6 static ok ::1/128 net0/v6 static ok febf::1/10 10 10
  • 11.
    聞きたいこと.1 サーバに設定する DefaultGWどうします? • 前回の IPv6SG #02 でも質問しました • HSRP を使うなら Link-Local ? 11 11
  • 12.
  • 13.
    聞きたいこと.3 I/F に設定する Link-Local Addrの prefix 長は /64 ? それとも /10 ? 13 13
  • 14.
    調べてみた 1. デフォルトの prefixlength 2. loopback I/F への Link-Local 3. fe80::1 を設定した時の prefix length 4. fe80::64/64 の設定可否 5. fe80::10/10 の設定可否 6. febf::1 を設定した時の prefix length 7. febf::64/64 の設定可否 8. febf::10/10 の設定可否 14 14
  • 15.
    対象 a. Cisco (IOS12.4) b. Linux/CentOS6.3 c. Solaris 11.1 d. SEIL/CLI (4.00/OutsidersEdge) e. SEIL/SHELL (NetBSD 3.1_STABLE) f. NetBSD6.0 g. FreeBSD9.0 h. OpenBSD5.1 15 15
  • 16.
    まとめ 1 2 3 4 5 6 7 8 a. Cisco /10 x /10 x x /10 x x b. CentOS6.3 /64 x /128 o o /128 o o c. Solaris11.1 /10 x /10 o o /10 o o d. SEIL/CLI /64 fe80::1/64 /64 o x x x x e. SEIL/SHELL /64 fe80::1/64 /64 o o /64 o o f. NetBSD6.0 /64 fe80::1/64 /64 o o /64 o o g. FreeBSD9.0 /64 fe80::1/64 /64 o o /64 o o h. OpenBSD5.1 /64 fe80::1/64 /64 o o /64 o o 16 16
  • 17.
    気付いたこと.1 1 2 3 4 5 6 7 8 a. Cisco /10 x /10 x x /10 x x b. CentOS6.3 /64 x /128 o o /128 x x c. Solaris11 /10 x /10 o o /10 o o d. SEIL/CLI /64 fe80::1/64 /64 o x x x x e. SEIL/SHELL /64 fe80::1/64 /64 o o /64 o o f. NetBSD6.0 /64 fe80::1/64 /64 o o /64 o o g. FreeBSD9.0 /64 SEIL /64 o o /64 のこだわり(?) fe80::1/64 o o h. OpenBSD5.1 /64 fe80::1/64 /64 o o /64 o o 17 17
  • 18.
  • 19.
    気付いたこと.2 BSD の実装 Inthe kernel, an interface index for link- local scoped address is embedded into 2nd 16bit-word (3rd and 4th byte) in IPv6 address. For example, you may see something like: fe80:1::200:f8ff:fe01:6317 FreeBSD Developers' Handbook / Chapter 8 IPv6 Internals http://www.freebsd.org/doc/en/books/developers-handbook/ipv6.html#ipv6-scope-index 19 19
  • 20.
    [FreeBSD9.0]# ifconfig em0inet6 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> [FreeBSD9.0]# ifconfig em0 inet6 fe80:ffff:ffff:ffff:1111:2222:3333:4444/64 alias [FreeBSD9.0]# ifconfig em0 inet6 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> inet6 fe80:0:ffff:ffff:1111:2222:3333:4444%em0 prefixlen 64 scopeid 0x1 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> [FreeBSD9.0]# /usr/sbin/route6d 自動的に 0 に修正 [FreeBSD9.0]# kill -SIGINT `cat /var/run/route6d.pid [FreeBSD9.0]# cat /var/run/route6d_dump 15:50:47: Interface Table Dump Number of interfaces: 2 1 (index = 1) advertising interfaces: (snip) em0: index(1) flags(UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST) addr( fe80:1:ffff:ffff:1111:2222:3333:4444) mtu(1500) metric(0) fe80:1:ffff:ffff:1111:2222:3333:4444/64 (snip) 20 20
  • 21.
    [FreeBSD9.0]# man route6d (snip) Internally route6d embeds interface identifier into bit 32 to 63 of link-local addresses (fe80::xx and ff02::xx) so they will be visible on internal state dump file (/var/run/route6d_dump). 16 to 31 の間違い 21 21
  • 22.
  • 23.
    [参考] b. CentOS [CentOS6.3]#ip -f inet6 addr show dev eth0 scope link [CentOS6.3]# ip -f inet6 addr add fe80::1 dev eth0 scope link [CentOS6.3]# ip -f inet6 addr add fe80::64/64 dev eth0 scope link [CentOS6.3]# ip -f inet6 addr add fe80::10/10 dev eth0 scope link [CentOS6.3]# ip -f inet6 addr add febf::1 dev eth0 scope link [CentOS6.3]# ip -f inet6 addr add febf::64/64 dev eth0 scope link [CentOS6.3]# ip -f inet6 addr add febf::10/10 dev eth0 scope link [CentOS6.3]# ip -f inet6 addr show dev eth0 scope link 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 febf::10/10 scope link valid_lft forever preferred_lft forever inet6 febf::64/64 scope link valid_lft forever preferred_lft forever inet6 febf::1/128 scope link valid_lft forever preferred_lft forever inet6 fe80::10/10 scope link valid_lft forever preferred_lft forever inet6 fe80::64/64 scope link valid_lft forever preferred_lft forever inet6 fe80::1/128 scope link valid_lft forever preferred_lft forever 23 23
  • 24.
    [参考] c. Solaris11.1 [Solaris11.1]# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v6 static ok ::1/128 net0/v6 addrconf ok fe80::a00:27ff:fe63:4cff/10 [Solaris11.1]# ipadm create-addr -T static -a local=fe80::1 net0/IPv6SG3 [Solaris11.1]# ipadm create-addr -T static -a local=fe80::64/64 net0/IPv6SG4 [Solaris11.1]# ipadm create-addr -T static -a local=fe80::10/10 net0/IPv6SG5 [Solaris11.1]# ipadm create-addr -T static -a local=febf::1 net0/IPv6SG6 [Solaris11.1]# ipadm create-addr -T static -a local=febf::64/64 net0/IPv6SG7 [Solaris11.1]# ipadm create-addr -T static -a local=febf::10/10 net0/IPv6SG8 [Solaris11.1]# ipadm show-addr ADDROBJ TYPE STATE ADDR lo0/v6 static ok ::1/128 net0/v6 addrconf ok fe80::a00:27ff:fe63:4cff/10 net0/IPv6SG3 static ok fe80::1/10 net0/IPv6SG4 static ok fe80::64/64 net0/IPv6SG5 static ok fe80::10/10 net0/IPv6SG6 static ok febf::1/10 net0/IPv6SG7 static ok febf::64/64 net0/IPv6SG8 static ok febf::10/10 24 24
  • 25.
    [参考] d-1. SEIL(CLI) SEIL-X1#show status interface lan0 interface lan0: (snip) EthernetAddress=00:E0:4D:xx:xx:xx IP address=192.168.0.1 netmask=255.255.255.0 broadcast=192.168.0.255 IPv6 address=fe80::2e0:4dff:fexx:xxxx%lan0 prefixlen=64 scopeid 0x1 SEIL-X1# interface lan0 add fe80::1 SEIL-X1# interface lan0 add fe80::64/64 SEIL-X1# interface lan0 add fe80::10/10 ^ error: invalid prefix length SEIL-X1# interface lan0 add febf::1 ^ error: invalid address SEIL-X1# interface lan0 add febf::64/64 ^ error: invalid address SEIL-X1# interface lan0 add febf::10/10 ^ error: invalid prefix length 25 25
  • 26.
    [参考] d-2. SEIL(CLI) SEIL-X1#show status interface lan0 interface lan0: (snip) EthernetAddress=00:E0:4D:xx:xx:xx IP address=192.168.0.1 netmask=255.255.255.0 broadcast=192.168.0.255 IPv6 address=fe80::2e0:4dff:fexx:xxxx%lan0 prefixlen=64 scopeid 0x1 IPv6 address=fe80::1%lan0 prefixlen=64 scopeid 0x1 IPv6 address=fe80::64%lan0 prefixlen=64 scopeid 0x1 26 26
  • 27.
    [参考] f. NetBSD6.0 [NetBSD6.0]#ifconfig wm0 inet6 wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 (snip) inet6 fe80::a00:27ff:fe9a:7e50%wm0 prefixlen 64 scopeid 0x1 [NetBSD6.0]# ifconfig wm0 inet6 fe80::1 alias [NetBSD6.0]# ifconfig wm0 inet6 fe80::64/64 alias [NetBSD6.0]# ifconfig wm0 inet6 fe80::10/10 alias [NetBSD6.0]# ifconfig wm0 inet6 febf::1 alias [NetBSD6.0]# ifconfig wm0 inet6 febf::64/64 alias [NetBSD6.0]# ifconfig wm0 inet6 febf::10/10 alias [NetBSD6.0]# ifconfig wm0 inet6 wm0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 (snip) inet6 fe80::a00:27ff:fe9a:7e50%wm0 prefixlen 64 scopeid 0x1 inet6 fe80::1%wm0 prefixlen 64 scopeid 0x1 inet6 fe80::64%wm0 prefixlen 64 scopeid 0x1 inet6 fe80::10%wm0 prefixlen 10 scopeid 0x1 inet6 febf::1%wm0 prefixlen 64 scopeid 0x1 inet6 febf::64%wm0 prefixlen 64 scopeid 0x1 inet6 febf::10%wm0 prefixlen 10 scopeid 0x1 27 27
  • 28.
    [参考] g. FreeBSD9.0 [FreeBSD9.0]#ifconfig em0 inet6 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> inet6 fe80::a00:27ff:fe26:2290%em0 prefixlen 64 scopeid 0x1 nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> [FreeBSD9.0]# ifconfig em0 inet6 fe80::1 alias [FreeBSD9.0]# ifconfig em0 inet6 fe80::64/64 alias [FreeBSD9.0]# ifconfig em0 inet6 fe80::10/10 alias [FreeBSD9.0]# ifconfig em0 inet6 febf::1 alias [FreeBSD9.0]# ifconfig em0 inet6 febf::64/64 alias [FreeBSD9.0]# ifconfig em0 inet6 febf::10/10 alias [FreeBSD9.0]# ifconfig em0 inet6 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM> inet6 fe80::a00:27ff:fe26:2290%em0 prefixlen 64 scopeid 0x1 inet6 fe80::1%em0 prefixlen 64 scopeid 0x1 inet6 fe80::64%em0 prefixlen 64 scopeid 0x1 inet6 fe80::10%em0 prefixlen 10 scopeid 0x1 inet6 febf::1%em0 prefixlen 64 scopeid 0x1 inet6 febf::64%em0 prefixlen 64 scopeid 0x1 inet6 febf::10%em0 prefixlen 10 scopeid 0x1 nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL> 28 28
  • 29.
    [参考] h. OpenBSD5.1 [OpenBSD5.1]#ifconfig em0 inet6 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 (snip) inet6 fe80::a00:27ff:fe59:ba72%em0 prefixlen 64 scopeid 0x1 [OpenBSD5.1]# ifconfig em0 inet6 fe80::1 alias [OpenBSD5.1]# ifconfig em0 inet6 fe80::64/64 alias [OpenBSD5.1]# ifconfig em0 inet6 fe80::10/10 alias [OpenBSD5.1]# ifconfig em0 inet6 febf::1 alias [OpenBSD5.1]# ifconfig em0 inet6 febf::64/64 alias [OpenBSD5.1]# ifconfig em0 inet6 febf::10/10 alias [OpenBSD5.1]# ifconfig em0 inet6 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 (snip) inet6 fe80::a00:27ff:fe59:ba72%em0 prefixlen 64 scopeid 0x1 inet6 fe80::1%em0 prefixlen 64 scopeid 0x1 inet6 fe80::64%em0 prefixlen 64 scopeid 0x1 inet6 fe80::10%em0 prefixlen 10 scopeid 0x1 inet6 febf::1%em0 prefixlen 64 scopeid 0x1 inet6 febf::64%em0 prefixlen 64 scopeid 0x1 inet6 febf::10%em0 prefixlen 10 scopeid 0x1 29 29