[CentOS] About IPv6 Link-Local Address(CentOS5)

Mon Nov 16 17:00:13 UTC 2015
Paul Heinlein <heinlein at madboa.com>

On Mon, 16 Nov 2015, 米山陽介 wrote:

>>  First off, I assume you can ping your link-local address:
>>
>>     ping6 -I eth1 fe80::a00:27ff:fe03:5b8a
>>
>>  Second, you never mentioned how eth1 was assigned its IPv6 address.
>>  Given that you've tried to embed an IPv4 address within an IPv6 address
>>  (which is normally done with a 0:0:0:0:0: prefix), I'd guess you did it
>>  manually. If so, with what tools?
>
> Thanks for the response.
> I'm sorry when it was misguided answer.
>
> The setting of the IP address reaches by manual operation.
>
> # cat /etc/sysconfig/network-scripts/ifcfg-eth1
> DEVICE=eth1
> BOOTPROTO="none"
> ONBOOT=yes
> HWADDR=08:00:27:83:74:54
> IPADDR=192.168.11.8
> NETMASK=255.255.255.0
> IPV6INIT=yes
> IPV6ADDR=2000:8000:12:6:192:168:11:8/64
> IPV6_DEFAULTGW=2000:7000:12:6::1

First off, I'm pretty sure you've got a typo in your gateway 
definition: it should be 2000:8000:12:6::1 (not :7000:).

Second, I've never tested how well the init scripts expand "::" 
notation in IPv6 addresses. They may work fine, or you may have to 
expand it yourself, e.g.,

   IPV6_DEFAULTGW=2000:8000:12:6:0:0:0:1

When doing static IPv6 configuration, it's probably best to set

   IPV6_AUTOCONF=no

Even if all that works, however, I'm not sure where you got the 
2000:8000:12:6::/64 prefix. I think the current range of routable 
addresses starts at 2001:0000::1. I doubt your packets will be able to 
traverse the Internet with a 2000:8000:: address.

If you want to do IPv6 locally, you should be able to use the 
link-local address space, fe80::.

If you want a globally valid IPv6 address, your Internet provider will 
have to give you a route or you'll have to set yourself up with a IPv6 
tunnelling service.

> ■ link up
> # ethtool eth1
> Settings for eth1:
>>         Link detected: yes
>
> #  ifdown eth1
> #  ifup eth1
> #  ifconfig eth1
> eth1      Link encap:Ethernet  HWaddr 08:00:27:83:74:54
>           inet addr:192.168.11.8  Bcast:192.168.11.255  Mask:255.255.255.0
>           inet6 addr: fe80::a00:27ff:fe83:7454/64 Scope:Link      ←○
>           inet6 addr: 2000:8000:12:6:192:168:11:8/64 Scope:Global
>
>
> ■ link down
> # ethtool eth1
> Settings for eth1:
>>         Link detected: no
>
> #  ifdown eth1
> #  ifup eth1
> #  ifconfig eth1
> eth1      Link encap:Ethernet  HWaddr 08:00:27:83:74:54
>           inet addr:192.168.11.8  Bcast:192.168.11.255  Mask:255.255.255.0
>           inet6 addr: 2000:8000:12:6:192:168:11:8/64 Scope:Global
>
>
> Missing fe80::a00:27ff:fe83:7454/64.

The link-local address should always be present, but I've never done a 
lot a ifdown/ifup operations to see how they can muck things up.

I'd try "service network restart" to get full interface 
initialization.

-- 
Paul Heinlein
heinlein at madboa.com
45°38' N, 122°6' W