09.06.2011 21:48, Gert Doering пишет:
Hi,
On Thu, Jun 09, 2011 at 09:11:36PM +0400, Sergey Matveychuk wrote:
It's really weird that I can't set up IPv6 address for tap interface.
You can, but you need the "top of the tree" code, not 2.2 release.
Of course, I use it.
server-ipv6 turns a tun mode,
Actually, it doesn't. server-ipv6 will use whatever is configured as
"device" (device tun / device tap).
From a man page:
--server-ipv6 ipv6addr/bits
convenience-function to enable a number of IPv6 related options
at once, namely --ifconfig-ipv6, --ifconfig-ipv6-pool, --tun-
ipv6 and --push tun-ipv6 Is only accepted if ``--mode server''
or ``--server'' is set.
It turns --tun-ipv6 and --push tun-ipv6. It's not exactly I want. And it
require --server option, I can't understand why.
ifconfig-ipv6 suppose p2p interface and
No. It will work in p2p and p2pm mode.
--ifconfig-ipv6 ipv6addr/bits ipv6remote
configure IPv6 address ipv6addr/bits on the ``tun'' device. The
second parameter is used as route target for --route-ipv6 if no
gateway is specified.
I have no idea what is ipv6remote for tap interface. Moreover it
"configure IPv6 address ipv6addr/bits on the *``tun'' device*".
even 'push route-ipv6' misticaly discards because of some flag
(tt->ipv6) has been unset.
push route-ipv6 will fail if you have no ifconfig-ipv6 on the interface
(because then it would not work anyway).
First get the ifconfig right, then worry about the routes.
I see not any IPv6 address on tap interface after --ifconfig-ipv6. Here
is my config line:
ifconfig-ipv6 xxx:yyy:z:21f::/64 xxx:yyy:z:21f::2
And my tap interface:
# ifconfig tap0
tap0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether 00:bd:e8:18:04:00
inet6 fe80::2bd:e8ff:fe18:400%tap0 prefixlen 64 scopeid 0xe
inet xx.yyy.154.254 netmask 0xffffff00 broadcast xx.yyy.154.255
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
Opened by PID 35635
Lines from syslog:
...
ifconfig_ipv6_local = 'xxx:yyy:z:21f::'
ifconfig_ipv6_netbits = 64
ifconfig_ipv6_remote = 'xxx:yyy:z:21f::2'
...
OpenVPN 2.x-master amd64-portbld-freebsd8.2 [SSL] [LZO2] [eurephia] [MH]
[PF_INET6] [IPv6 payload 20110522-1 (2.2.0)] built on Jun 7 2011
...
TUN/TAP device /dev/tap0 opened
do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=1
...
But no real ifconfig call as I can see.
Looking on added ipv6 support I have only one question but many times
"why? why? why?".
"Something is wrong in your setup".
Sure :)
It works nicely for a number of people in p2mp tun mode, and it works
to some extent in p2mp tap mode (pushing routes does not yet, you need
to add them manually / by script after the interface is "up" - but
that's a documented limitation of the current state of the code).
Really there is no reason for this. I hack a code (just cut off a code
with if(!tt->ipv6) { print_a_message; return} for route add and route
delete) from a client and pushing start works.
IPv6 payload passed through tap interface with any version of openvpn.
I'm telling about working with IPv6 addresses. (I don't care about
ifconfig-ipv6-pool right now, rtadvd do things for clients.)