From owner-freebsd-net@FreeBSD.ORG Sun Aug 24 14:58:35 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3875BF32 for ; Sun, 24 Aug 2014 14:58:35 +0000 (UTC) Received: from sender1.zohomail.com (sender1.zohomail.com [74.201.84.155]) by mx1.freebsd.org (Postfix) with ESMTP id 1EBC1352A for ; Sun, 24 Aug 2014 14:58:34 +0000 (UTC) Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1408892313493349.21557806956866; Sun, 24 Aug 2014 07:58:33 -0700 (PDT) Date: Sun, 24 Aug 2014 10:58:33 -0400 From: jmoore To: Message-ID: <14808814623.112dfc436230575.4702450748812904217@devalias.io> In-Reply-To: References: Subject: Re: Re: Set arbitrary protocol for route? MIME-Version: 1.0 X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Aug 2014 14:58:35 -0000 ---- On Sat, 23 Aug 2014 13:33:04 -0400 Nikolay Denev <nike_d@cytexbg.com> wrote ---- On Sat, Aug 23, 2014 at 8:49 AM, Adrian Chadd <adrian@freebsd.org> wrote: > Ok, so how does the whole protocol thing implement priority? > > > -a Ah, sorry, reading again I don't think it does that. For some reason I was under the impression it does. So, it looks like it's just a 8 bit tag applied to each route, not involved in the actual routing, but allows you to filter when displaying etc. >From linux ip-route(8) man page : protocol RTPROTO the routing protocol identifier of this route. RTPROTO may be a number or a string from the file /etc/iproute2/rt_protos. If the routing protocol ID is not given, ip assumes protocol boot (i.e. it assumes the route was added by someone who doesn't understand what they are doing). Several protocol values have a fixed interpretation. Namely: redirect - the route was installed due to an ICMP redirect. kernel - the route was installed by the kernel during autoconfiguration. boot - the route was installed during the bootup sequence. If a routing daemon starts, it will purge all of them. static - the route was installed by the administrator to override dynamic routing. Routing daemon will respect them and, probably, even advertise them to its peers. ra - the route was installed by Router Discovery protocol. The rest of the values are not reserved and the administrator is free to assign (or not to assign) protocol tags. --Nikolay The context for this questions is updating this script[1] to allow a (currently) unsupported FreeBSD instance running on Google Compute Engine to be able to use their load balancers. In this case, the proto is used as a magic number, as necessary internal routes are programmatically determined and then compared to current routes, adding/removing as needed. [1] https://github.com/GoogleCloudPlatform/compute-image-packages/blob/master/google-daemon/usr/share/google/google_daemon/address_manager.py