Re: [network manger] : overriding default IPv4 routing.



On Tue, 2014-01-07 at 12:20 +0530, Manoj Manthena wrote:
Thanks for the reply Dan.

My primary use case is:

1)If wireless connection is available, always IPv4 routing should happen through this interface though 
other wired interfaces exist.
2)If wireless connection is not available, then the existing behavior of network manager should apply. 

Also say

1) I do not have a wireless connection. Current active connection is eth0.
2) Connected my usb tethered phone.
3) I do not have never-default configuration in either eth0 or usb0 interfaces.
4) Still I observe that active connection is shifted to usb0 from eth0

For this specific case, there is no way to differentiate 'usb0' from
'eth0' via information from the kernel; NetworkManager has no idea that
usb0 is actually a phone because it looks exactly like a USB ethernet
dongle.  Since it is the same type (eg, ethernet) as eth0, they are both
the same priority.  The last one connected "wins" the default route.
You can modify this with never-default though.

So what is the basis for this selection.
Can't I override this behavior(always eth0 to be the preferred)

Yes, you can set the usb0 connection to never-default=true, and it will
never receive the default route.

Dan

Hope I am clear in my use case.

Regards,
Manoj


-----Dan Williams <dcbw redhat com> wrote: -----
To: Manoj Manthena <manoj manthena tcs com>
From: Dan Williams <dcbw redhat com>
Date: 01/03/2014 11:10PM
Cc: networkmanager-list gnome org
Subject: Re: [network manger] : overriding default IPv4 routing.

On Fri, 2013-12-27 at 20:27 +0530, Manoj Manthena wrote:
Hi All,

I have the following problem scenario.

1) Currently connected my desktop to a wireless access point.(active connection is wlan0)
2) As soon as I connect a usb tethered device/ethernet , network manager selects usb0/eth0 as the default 
for IPv4 routing and DNS.

Currently using 0.9.4.1-0ubuntu2.3 of network manager.

I would like to override this behavior. Please let me know how I could do that.
Is there any [keyfile] tag which can be added in NetworkManager.conf so that my default IPv4 device is 
always wlan0?

I came across 

[ipv4]
never-default=true

but is there anything like 

[ipv4]
default=true

There is no such key at this time.  This is because it's typically more
robust to indicate which configurations should *not* get the default
route than to indicate that one particular configuration should always
get it, because...

For example, if your wlan0 is not connected, then the configuration does
not apply, and any other configuration which is not marked never-default
will receive the default route.  This is likely not what you intend.  If
wlan0 does not exist (device removed, driver removed, or device
physically changed) then the configuration will not apply, and any other
configuration can receive the default route.

What is your specific use-case here?  Do you want all configurations
except wlan0 banned from receiving the default route, even when wlan0 is
missing or disconnected?  Do you create/remove configurations often in
this setup?

Dan

so that i will add it under my /etc/NetworkManager/system-connections/ configurations 

Regards,
Manoj
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


_______________________________________________
networkmanager-list mailing list
networkmanager-list gnome org
https://mail.gnome.org/mailman/listinfo/networkmanager-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]