static routing -about metrics

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
tombowin
Posts: 9
Joined: Thu Sep 18, 2014 5:34 am

static routing -about metrics

Post by tombowin »

hi,
i am using wifi hotspot, it requires static routing,

Code: Select all

Destination      Gateway         Netmask           Metric
xxx.xxx.xxx.xxx  yyy.yyy.yyy.yyy 255.255.255.255    1 
how do i input metric in static routing?
in openwrt i can do it,

sorry for my english.

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: static routing -about metrics

Post by Lantis »

Usually a metric is used (at least in Windows) to set the priority of a network interface. 1 is the lowest (first priority).
I believe you can just ignore it.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

tombowin
Posts: 9
Joined: Thu Sep 18, 2014 5:34 am

Re: static routing -about metrics

Post by tombowin »

if i ignore it, not work,
four routing setting i must input the router, different metric
more then one static routing ip required

thanks,

Lantis
Moderator
Posts: 6753
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: static routing -about metrics

Post by Lantis »

In that case you'll need to edit the route table using the command line.

Typing "route" in ssh shows the routing table which lists metrics.
"route add" is what you are looking for but I don't know any of the remaining required syntax.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

User avatar
i3laze
Posts: 10
Joined: Mon Jun 26, 2017 3:41 pm
Location: Moscow

Re: static routing -about metrics

Post by i3laze »

Sometimes metric is very useful.
For example, I got a backup ISP uplink : )

Check your routing table:

Code: Select all

route
Modify the route:

Code: Select all

ip route del default via 10.0.0.1 dev br-lan proto static
ip route add default via 10.0.0.1 dev br-lan proto static metric 110

Post Reply