question about preference and metric in "ip route" command

Discussion in 'Linux Networking' started by dshwatrz, Jun 25, 2013.

  1. dshwatrz

    dshwatrz Guest

    Hello,

    Any ideas - is there a difference between preference and metric:

    ip route add 1.2.3.4 via 192.168.2.1 preference 6
    ip route add 1.2.3.5 via 192.168.2.1 metric 2 preference 8

    It seems that in the second case, running "metric 2 preference 8" seems to override the 2 with 8, and in fact the metric and preference are synonyms.
    Or am I wrong ?

    ip route show:
    gives:
    1.2.3.4 via 192.168.2.1 dev eth1 metric 6
    1.2.3.5 via 192.168.2.1 dev eth1 metric 8

    regards,
    David
     
    dshwatrz, Jun 25, 2013
    #1
    1. Advertisements

  2. Hello,

    a écrit :
    No, according to the ip(8) man page.
     
    Pascal Hambourg, Jun 29, 2013
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.