Page 1 of 1

static routing -about metrics

Posted: Mon Aug 24, 2015 8:34 am
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.

Re: static routing -about metrics

Posted: Mon Aug 24, 2015 9:00 am
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.

Re: static routing -about metrics

Posted: Mon Aug 24, 2015 9:07 am
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,

Re: static routing -about metrics

Posted: Mon Aug 24, 2015 10:08 am
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.

Re: static routing -about metrics

Posted: Mon Oct 09, 2017 10:12 am
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