From owner-freebsd-net@FreeBSD.ORG Sat Aug 23 23:02:33 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F05EBD0; Sat, 23 Aug 2014 23:02:33 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 397FF37B6; Sat, 23 Aug 2014 23:02:32 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s7NN2NL3066023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Aug 2014 16:02:24 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s7NN2N6d066022; Sat, 23 Aug 2014 16:02:23 -0700 (PDT) (envelope-from jmg) Date: Sat, 23 Aug 2014 16:02:23 -0700 From: John-Mark Gurney To: Nikolay Denev Subject: Re: Set arbitrary protocol for route? Message-ID: <20140823230223.GI71691@funkthat.com> Mail-Followup-To: Nikolay Denev , Adrian Chadd , FreeBSD Net , Josh Moore References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Sat, 23 Aug 2014 16:02:24 -0700 (PDT) Cc: FreeBSD Net , Adrian Chadd , Josh Moore 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: Sat, 23 Aug 2014 23:02:33 -0000 Nikolay Denev wrote this message on Sat, Aug 23, 2014 at 19:33 +0200: > On Sat, Aug 23, 2014 at 8:49 AM, Adrian Chadd wrote: > > Ok, so how does the whole protocol thing implement priority? > > 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. If that's the case, a simple man route would have found the answer: -proto1 RTF_PROTO1 - set protocol specific routing flag #1 -proto2 RTF_PROTO2 - set protocol specific routing flag #2 -proto3 RTF_PROTO3 - set protocol specific routing flag #3 Not as many as Linux, but I do believe some of the routing daemons use this flag to know what routes it can delete or not... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."