how to set preference and metric when configuring a satic route
I am trying to figure out how to set preference and metric for a static route.
Based on the manual of "ip route" command, seems like both metric and preference options are acceptable. But when tried, I got failure. i,e
ip route add 1.1.0.0/16 via 2.2.2.2 metric 1 preference 5
ip: either "to" is duplicate or "metric" is garbage.
And, the linux "route" command only accept metric option. I can do the following succesfully.
route add -net 1.1.0.0/16 gw 2.2.2.2 metric 1
can anyone help me out?
Thanks a lot,
Yong
|