From owner-freebsd-net@freebsd.org Thu Oct 18 15:57:30 2018 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 46C1E10E0312 for ; Thu, 18 Oct 2018 15:57:30 +0000 (UTC) (envelope-from jinmei.tatuya@gmail.com) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7CFD711CD; Thu, 18 Oct 2018 15:57:29 +0000 (UTC) (envelope-from jinmei.tatuya@gmail.com) Received: by mail-lf1-f54.google.com with SMTP id n14-v6so11110067lfe.6; Thu, 18 Oct 2018 08:57:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=X5AeppwtlBHKzVqwkTLXXRaskOi9TM4DeNNtr950LNQ=; b=VRHhOfKhaqqpF5GxQe4lJh0UnqC53R1XJkGh7OLaZgpun7Yazill0xeobo/jFp/Xhq b0ECYkmrljRpTMSf+jcXK6FI1489P0lR7LRHnU091+UUx5PM1CJ+anZYEPMF/muDiY9r Rm3xHG8AMAK1rLHeig4T4i5Ydw1RsBuJyqarHd/GPU/rAmjxDK9kZKcvibJUtlJDyn4v H9pQTDv/3ZruuOXBeERiUMiAnvBjbyx+Sy5hBxkZLv3PTXsEYsbErth3QKtPTgzXpnWX CdGIcRSh+BBdmZUWs93bISXQ7+tOcabI5aI1eVojkyNnIo0a1z2gOdQI4wj7K+mwbZd3 kfGA== X-Gm-Message-State: ABuFfoh0aqNzcL+8I3TQPlqJhXqE8LHbmBD3yRwpilzM0KZo1z6s/pKG +AWxEcMy5TRjaeNBx/k1AJGkxNrMf4zxmgJ9qe+2XFgY X-Google-Smtp-Source: ACcGV61qy0V1BZ7fbWHePixYNfiOdlBO/2cm0RikXyDzWt3ppFwHhwVrZo93WJmwEPo5ngffjjDCox7qsKu9CRPyPQA= X-Received: by 2002:a19:6803:: with SMTP id d3-v6mr555727lfc.45.1539878247769; Thu, 18 Oct 2018 08:57:27 -0700 (PDT) MIME-Version: 1.0 References: <20180930022007.GA2041@admin.sibptus.ru> <20181018015314.GA81422@admin.sibptus.ru> In-Reply-To: <20181018015314.GA81422@admin.sibptus.ru> From: =?UTF-8?B?56We5piO6YGU5ZOJ?= Date: Thu, 18 Oct 2018 08:57:16 -0700 Message-ID: Subject: Re: why rtsold ? To: vas@mpeks.tomsk.su Cc: asomers@freebsd.org, FreeBSD Net Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2018 15:57:30 -0000 At Thu, 18 Oct 2018 08:53:14 +0700, Victor Sudakov wrote: > > The router may send a router advertisement whenever it wants. That's why > > your machine seems to work even without rtsold. However, SLAAC addresses > > expire after a certain amount of time. rtsold will ask the router for a > > new advertisement before your address expires. > > Who actually processes these router advertisements: the rtsold daemon > or the kernel itself? > > Is this passage: > > 8.1.1.4. Plug and Play > > Most of the IPv6 stateless address autoconfiguration is implemented in > the kernel. Neighbor Discovery functions are implemented in the kernel > as a whole. Router Advertisement (RA) input for hosts is implemented > in the kernel. Router Solicitation (RS) output for endhosts, RS input > for routers, and RA output for routers are implemented in the > userland. > > still correct? > (from https://www.freebsd.org/doc/en/books/developers-handbook/ipv6.html) It's slightly outdated. "RA input for hosts" was originally limited to what's described in RFC4862, but it's been extended over time. The RFC4862-side (aka SLAAC) is still implemented in the kernel, but DNS configuration options (RFC8106, although the FreeBSD implementation may still only conform to RFC6106) are used in the user space. The current trend seems to introduce more such high level config information to RA, so I'd expect these will also be handled in the user space. BTW, regarding the original topic of 'why rtsold', my understanding is that its original motivation is to help hosts moving links. At least at the time of development, there was no sophisticated detection mechanism when a host is connected to a new link, so no one else could send RS to get new network configuration information. rtsold monitors link status and invokes new RS-RA exchanges when it detects a change of the link status from off to on. Address lifetime expiration is not usually an issue since routers are supposed to send RAs periodically (with sufficiently short intervals to prevent accidental expiration); and in any case (AFAIK) rtsold doesn't help that situation, as it doesn't send RSes based on address lifetimes. Today, we now use DNS config information provided via RA in the user space, so another role of rtsold is to reflect any changes to it while the host is still connected to the same link. Routers are supposed to advertise RAs with new information, but without rtsold (or something equivalent) no one in the user space listens to those RAs to apply the configuration change. -- JINMEI, Tatuya