From: Roy Marples Date: Wed, 17 Sep 2008 10:32:34 +0000 (+0000) Subject: Document metrics better. X-Git-Tag: v5.0.0~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=065125d478bfa3d0814c8a67fa0bad5fd442270b;p=thirdparty%2Fdhcpcd.git Document metrics better. --- diff --git a/dhcpcd.8.in b/dhcpcd.8.in index 4905a88c..82644f50 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 15, 2008 +.Dd September 17, 2008 .Dt DHCPCD 8 SMM .Sh NAME .Nm dhcpcd @@ -107,8 +107,16 @@ can be run per interface or as a single instance to manage all interfaces. If a list of interfaces are given on the command line, then .Nm only works with those interfaces. -If no interfaces are given then we discover available interfaces and -attempt to configure all of them. +If no interfaces are given then +.Nm +discovers available interfaces and attempts to configure them. +.Pp +Interfaces are preferred by carrier, DHCP lease/IPv4LL and then lowest metric. +For systems that support route metrics, each route will be tagged with the +metric, otherwise +.Nm +changes the routes to use the interface with the same route and the lowest +metric. See options below for controlling what interfaces we allow and deny through the use of patterns. .Ss Hooking into DHCP events @@ -193,14 +201,11 @@ By default does not request any lease time and leaves the it in the hands of the DHCP server. .It Fl m , -metric Ar metric -Added routes will use the -.Ar metric -on systems where this is supported -.Po -presently only Linux -.Pc . -Route metrics allow the addition of routes to the same destination across -different interfaces, the lower the metric the more it is preferred. +Metrics are used to prefer an interface over another one, lowest wins. +.Nm +will supply a default metic of 200 + +.Xr if_nametoindex 3 . +An extra 100 will be added for wireless interfaces. .It Fl o , -option Ar option Request the DHCP .Ar option @@ -456,6 +461,7 @@ running on the .Xr dhcpcd-run-hooks 8 , .Xr resolv.conf 5 , .Xr resolvconf 8 , +.Xr if_nametoindex 3, .Xr fnmatch 3 .Sh STANDARDS RFC 2131, RFC 2132, RFC 2855, RFC 3004, RFC 3361, RFC 3396, RFC 3397, diff --git a/dhcpcd.conf.5.in b/dhcpcd.conf.5.in index 19676c19..35c48787 100644 --- a/dhcpcd.conf.5.in +++ b/dhcpcd.conf.5.in @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 16, 2008 +.Dd September 17, 2008 .Dt DHCPCD.CONF 5 SMM .Sh NAME .Nm dhcpcd.conf @@ -98,6 +98,12 @@ Subsequent options are only parsed for this .It Ic leasetime Ar seconds Request a leasetime of .Ar seconds . +.It Ic metric Ar metric +Metrics are used to prefer an interface over another one, lowest wins. +.Nm dhcpcd +will supply a default metic of 200 + +.Xr if_nametoindex 3 . +An extra 100 will be added for wireless interfaces. .It Ic noarp Don't send any ARP requests. This also disables IPv4LL. @@ -173,6 +179,7 @@ If not set then none is sent. .Sh SEE ALSO .Xr dhcpcd-run-hooks 8 , .Xr dhcpcd 8 , +.Xr if_nametoindex 3 , .Xr fnmatch 3 .Sh AUTHORS .An Roy Marples