From owner-freebsd-net@freebsd.org Tue Feb 19 16:37:42 2019 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05F2814F53FA for ; Tue, 19 Feb 2019 16:37:42 +0000 (UTC) (envelope-from freebsd@disroot.org) Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D82868D770 for ; Tue, 19 Feb 2019 16:37:40 +0000 (UTC) (envelope-from freebsd@disroot.org) Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 11D05291EC; Tue, 19 Feb 2019 17:37:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oXsYOpJryB2C; Tue, 19 Feb 2019 17:37:36 +0100 (CET) Subject: Re: Point-to-point using GRE over IPv6 -> not possible with a single /128 address on the server? DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1550594256; bh=9P4tDHcj5TEKt6RaU/f45oMtaYDT3ThDCr2tCZbq99I=; h=Subject:To:References:From:Date:In-Reply-To; b=JC/MgRJme/XBsFMStcH/p2EQ6AfcJiMowBpnwAUMGImEswth8a7PXO6FjJVbVqoM4 YZZKNgLokmzU7gSvHCnCPiQYJPLYMZG1UJHtcYpcHAROetkqugXvLsq/He9T7NtIzR 4HjO2Pfi3iwh4iv+a2y+rK9Otn1qPQKLoM1mTWpuSJ8pSX2OkWTIHqVp3NuXMKSo8Y nDMCNFj/QumwLdv9d3B9uNc/v1yBOFvLDLm9BaIJNteHWTm8qiB8rTxzOFY1aQbg50 M/1k1ZtGxPqJlwTg1PKX2IEDR16TWi19ltdzlsc1c7NjvdEdRylR1ViHeMUSx0AhBu plFlWt0x/UGzw== To: andrnils@gmail.com, freebsd-net@freebsd.org References: <95d8e3ea-af36-4d14-f280-908f92a96515@disroot.org> <9ab1a9b1-e1e3-9f48-2c3e-35454bcd6e77@disroot.org> From: "Peter G." Message-ID: Date: Tue, 19 Feb 2019 17:37:31 +0100 Mime-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: D82868D770 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=disroot.org header.s=mail header.b=JC/MgRJm; dmarc=pass (policy=none) header.from=disroot.org; spf=pass (mx1.freebsd.org: domain of freebsd@disroot.org designates 178.21.23.139 as permitted sender) smtp.mailfrom=freebsd@disroot.org X-Spamd-Result: default: False [-5.10 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[disroot.org:s=mail]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[disroot.org:+]; MX_GOOD(-0.01)[cached: disroot.org]; RCVD_IN_DNSWL_NONE(0.00)[139.23.21.178.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.95)[-0.950,0]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; DMARC_POLICY_ALLOW(-0.50)[disroot.org,none]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:50673, ipnet:178.21.23.0/24, country:NL]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-2.64)[ip: (-7.35), ipnet: 178.21.23.0/24(-3.67), asn: 50673(-2.22), country: NL(0.02)] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2019 16:37:42 -0000 On 19/02/2019 14:06, Andreas Nilsson wrote: > On Tue, Feb 19, 2019 at 1:38 PM Peter G. wrote: > >> On 15/02/2019 17:49, Peter G. wrote: >>> Now the GRE tunnel >>> >>>> ifconfig gre6 create >>>> ifconfig gre6 inet6 fc01:e::100 fc:02:e::200 tunnelfib 6 >>> #ifconfig: ioctl (SIOCAIFADDR): File exists > I have not used gre with ipv6, so I cannot really be of any help. However > for ipv4 you specify a netmask while setting up the interface, whereas you > do not while setting up the ipv6. I also notice that you list fc02:e::200 > for "other end" but in the commands you have fc:02:e::200 which I guess is > just typo. Does > > ifconfig gre6 inet6 fc01:e::100 fc:02:e::200 prefixlen 128 tunnelfib 6 > > work? Or the whole thing > > ifconfig gre6 inet6 fc01:e::100 fc02:e::200 tunnel fc01:e::100 fc02:e::200 > prefixlen 128 tunnelfib 6 Thanks for answering. The "full" syntax including tunnel definition also generates the same error, and ifconfig gre6 inet6 fc01:e::100 fc:02:e::200 prefixlen 128 tunnelfib 6 seems to be equivalent to ifconfig gre6 inet6 fc01:e::100 fc:02:e::200 tunnelfib 6 that is, specifying no prefixlen implies "prefixlen 128". Also tried that. There's seems to be a quirk how IPv6 is handled. If a particular IPv6 address is already set on the physical interface, using that particular address for a GRE definition (i.e. "fc01:e::100" in this case, so single /128), always generates: ioctl (SIOCAIFADDR): File exists This is what confuses me. Using IPv4 this way is not an issue. A /32 address can be set on an interface and the same address can be used for a GRE link. That's what tunnelfib/FIB is for, to separate routing for GRE. And this is what *does not work with IPv6* and I don't understand why. Seems to me the server needs to have a whole IPv6 range, and then an address from that range can be allocated to create/maintain GRE links, so this can't work with a /128 address available only. The problem is that this particular server I need this on, only has a single /128 address allocated to it. _The bottom line:_ I don't understand why an already allocated /128 address can't be used for a GRE link with its own separate FIB. This is not logical. PG