Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
routing table ok?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
CaptainBlood
l33t
l33t


Joined: 24 Jan 2010
Posts: 995

PostPosted: Fri Jun 12, 2015 6:59 pm    Post subject: routing table ok? Reply with quote

Hi,
Code:
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.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1717

PostPosted: Sun Jun 14, 2015 6:57 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
CaptainBlood
l33t
l33t


Joined: 24 Jan 2010
Posts: 995

PostPosted: Sun Jun 14, 2015 10:47 pm    Post subject: Reply with quote

Thks 4 ur prompt reply,
I know about such a hack, but I fails to stay iner my long term memory :)
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
Back to top
View user's profile Send private message
CaptainBlood
l33t
l33t


Joined: 24 Jan 2010
Posts: 995

PostPosted: Sun Jun 14, 2015 10:52 pm    Post subject: Reply with quote

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
Code:
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
Code:
route del 192.168.1.0 metric 0 wlan0
SIOCDELRT: Aucun processus de ce type
Code:
route del -net 192.168.1.0 metric 0 netmask 255.255.255.0 dev wlan0
is doing slightly better here. :)

Thks 4 ur attention, interest & suport.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum