I have been trying to understand the output from netstat -r
, all I know it is related to routing table!
What is the numbers next to each interface in the interface list also what is the metric?
Asked
Active
Viewed 442 times
-1

Brian Tompsett - 汤莱恩
- 5,753
- 72
- 57
- 129

Mohamed Gamal
- 1,348
- 2
- 13
- 19
1 Answers
0
metrics assign a "cost" to each interface. They're used to figure out which interface to use if a host has two or more interfaces that could be used for a particular routing. The higher the metric number, the higher the cost of using that interface.
e.g. you might have a dual-homed machine. one interface on a 'cheap' local DSL line, and one interface on an expensive satellite uplink. By default, you'd rather use that DSL line. Both interfaces could be used for outgoing packets, so you make sure that the DSL interface has the lower metric.

Marc B
- 356,200
- 43
- 426
- 500