From owner-freebsd-net@FreeBSD.ORG Sat Aug 23 17:33:06 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 465A241E; Sat, 23 Aug 2014 17:33:06 +0000 (UTC) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E177F3A28; Sat, 23 Aug 2014 17:33:05 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id la4so13403050vcb.5 for ; Sat, 23 Aug 2014 10:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=4drpU7MktphkOArM/ZQMsHb5PW0dZLt9GIJdIpcNrcA=; b=BNAAID74qFyfgGKdfrWjDseDZKQVeJrElnQ0rkM+EklBKhbdiW4fqT2gH0as2yRz+W bBaiYrH7dz3ZvcrA8rUjPvQhfc4MjVDKZt+vBg2SCI/Wa+9E/qWbZ2AcnGWDRgUs3jar uxqvgid3jF2ZTwQoiRPHaNzIN4g9OzKReOyTMEH1gc/2IkMJTMYw1YOCVMyDIyxy+kRL DVVjHFOCEuHT0xLdGgWUME3TI/7BR0H/gU/Y1KtRHVK8shBMLseWpFEUfGFox63EXMq1 NqyTNxuwzAeON6pf648GECU5S5gVNPnfTxUzVO285ullcuisrO9+2C0oyCTrmeJ3ytpr bEeg== MIME-Version: 1.0 X-Received: by 10.52.119.229 with SMTP id kx5mr378276vdb.40.1408815185018; Sat, 23 Aug 2014 10:33:05 -0700 (PDT) Sender: ndenev@gmail.com Received: by 10.221.46.133 with HTTP; Sat, 23 Aug 2014 10:33:04 -0700 (PDT) In-Reply-To: References: Date: Sat, 23 Aug 2014 19:33:04 +0200 X-Google-Sender-Auth: nytzHuUOZGwLHpoPz1PwQFoDbw4 Message-ID: Subject: Re: Set arbitrary protocol for route? From: Nikolay Denev To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: FreeBSD Net , 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 17:33:06 -0000 On Sat, Aug 23, 2014 at 8:49 AM, Adrian Chadd 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