From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Whelan Subject: iproute2 - modifying routes in place Date: Fri, 11 May 2018 07:42:58 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" To: netdev@vger.kernel.org Return-path: Received: from mail-qk0-f170.google.com ([209.85.220.170]:42463 "EHLO mail-qk0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752592AbeEKLnK (ORCPT ); Fri, 11 May 2018 07:43:10 -0400 Received: by mail-qk0-f170.google.com with SMTP id a21-v6so4059485qkg.9 for ; Fri, 11 May 2018 04:43:10 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: `ip route` has 2 subcommands that don't seem to work as expected and i'm not sure if its a bug, or if i'm misunderstanding the semantics. I am unable to modify a route 'in place', which from what i'm reading online, I should be able to do with `ip route change` and/or `ip route replace`. After a route is created with either `ip route add` or `ip route replace`, I am unable to use `change`, regardless of how I attempt to identify the route i'm trying to alter. # ip -6 route show ... fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 1000 pref medium fe80::/64 dev enp0s3 proto kernel metric 256 pref medium fe80::/64 dev enp0s8 proto kernel metric 256 pref medium fe80::/64 dev internal0 proto kernel metric 256 pref medium If i try to change the metric of the route that already exist via `ip route change`, i get "No such file or directory. # ip -6 route change fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 100 RTNETLINK answers: No such file or directory If i use `replace`, the command does not error, but creates another route instead of replacing the current route. # ip -6 route replace fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 100 # ip -6 route show ... fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 100 pref medium fd9b:caee:ff93:ceef:3431:3831:3930:3032 dev internal0 src fd9b:caee:ff93:ceef:3431:3831:3930:3031 metric 1000 pref medium fe80::/64 dev enp0s3 proto kernel metric 256 pref medium fe80::/64 dev enp0s8 proto kernel metric 256 pref medium fe80::/64 dev internal0 proto kernel metric 256 pref medium What am I missing or doing wrong? Forgive me if i'm being dense, but i could not find an answer online to explain this behavior. If this is the wrong forum for this question, I apologize; please point me in the right direction? Linux: 4.16.6 iproute2: 4.15.0 Thank you!