# [SOLVED]configure wlan0 lan route metric

## deadeyes

Hi all,

For my home network I am generally using wireless to get connected to the network and the internet.

However for copying some large files I use the wire.

That means I get 2 IPs in the same range.

And both interfaces get the same metric : 0.

I found out I can modify the metric for the default route using metric_wlan0.

```

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0

192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0

0.0.0.0         192.168.1.1     0.0.0.0         UG    2      0        0 eth0

0.0.0.0         192.168.1.1     0.0.0.0         UG    100    0        0 wlan0

```

(this is not the full routing table)

However this changes the metric of the default route.

Not of the route that is specifically for the local network.

of course I can do this manually.

However that is alot of hassle and seems to be something that should be configurable use files.

Does anyone knows how I can accomplish this? Or how I can change the metric for each route for the wlan0 interface?

Thanks in advance!Last edited by deadeyes on Sun Apr 17, 2011 6:58 pm; edited 1 time in total

----------

## deadeyes

I found a solution for this.

```

postup() {

   local metric=0

   case "${IFACE}" in

      eth0) metric=0 ;;

      eth1) metric=1 ;;

   esac

   ifmetric "${IFACE}" "${metric}"

   return 0

}

```

https://forums.gentoo.org/viewtopic-p-2544171.html#2544171

Solved  :Smile: 

----------

