# routing table ok?

## CaptainBlood

Hi,

```
route

Table de routage IP du noyau

Destination     Passerelle      Genmask         Indic Metric Ref    Use Iface

default         192.168.1.1     0.0.0.0         UG    600    0        0 wlan0

loopback        localhost.local 255.0.0.0       UG    0      0        0 lo

192.168.1.0     *               255.255.255.0   U     0      0        0 wlan0

192.168.1.0     *               255.255.255.0   U     303    0        0 wlan0

192.168.2.0     *               255.255.255.0   U     0      0        0 eth0
```

I don't understand what use to have 2 lines for destination 192.168.1.0 identical except for Metric.

Should one of the two lines being uneccessary, how to have it removed, as they are set by dhcpcd.

Thks 4 ur attention, interest & support.

----------

## szatox

Try 

 *Quote:*   

>  # route del 192.168.1.0 metric 0 wlan0 

 

Just an ugly hack. Perhaps you can tell dhcpcd to set routes with correct metrics, in fact it should prioritize wires by default (if you run dhcpcd as a service, not when you use some other tools that call dhcpcd on a particular interface to receive IP), but this might get you going in no time.

----------

## CaptainBlood

Thks 4 ur prompt reply,

I know about such a hack, but I fails to stay iner my long term memory  :Smile: 

However I know I should batch it.

According to your advice,the low metric is the one to be be deleted, isn't it?

Couple of things to be mentionned to be as clear as possible:

Host is a XEN domU gateway between a network of XEN domU and the external networks.

wlan0 is managed via Networkmanager, configured for dhcpcd.

eth0 is static and binded to the internal network.

Tks 4 ur attention, interest & support.Last edited by CaptainBlood on Sun Jun 14, 2015 10:55 pm; edited 1 time in total

----------

## CaptainBlood

1 thing more 2 ask.

As no 192.168.1.* adress is explicity used, but the gateway, shouldn't  the default suffice alltogether, implying to

```
route del 192.168.1.0 metric 303 wlan0
```

as well?

Although it could (does) work, could be efficiency counterproductive, I can not tell.

Incidentally it returns

```
route del 192.168.1.0 metric 0 wlan0

SIOCDELRT: Aucun processus de ce type
```

```
route del -net 192.168.1.0 metric 0 netmask 255.255.255.0 dev wlan0
```

is doing slightly better here.  :Smile: 

Thks 4 ur attention, interest & suport.

----------

