| … | |
… | |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-management.xml,v 1.8 2006/10/28 09:17:55 neysx Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-management.xml,v 1.9 2007/03/07 00:07:52 nightmorph Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <abstract> |
11 | <abstract> |
| 12 | For laptop users or people who move their computer around different networks. |
12 | For laptop users or people who move their computer around different networks. |
| 13 | </abstract> |
13 | </abstract> |
| 14 | |
14 | |
| 15 | <version>7.0</version> |
15 | <version>7.1</version> |
| 16 | <date>2006-08-30</date> |
16 | <date>2007-03-06</date> |
| 17 | |
17 | |
| 18 | <section> |
18 | <section> |
| 19 | <title>Network Management</title> |
19 | <title>Network Management</title> |
| 20 | <body> |
20 | <body> |
| 21 | |
21 | |
| 22 | <p> |
22 | <p> |
| 23 | If you and your computer are always on the move, you may not always have an |
23 | If you and your computer are always on the move, you may not always have an |
| 24 | ethernet cable or plugged in or an access point available. Also, we may want |
24 | ethernet cable or plugged in or an access point available. Also, you may want |
| 25 | networking to automatically work when an ethernet cable is plugged in or an |
25 | networking to automatically work when an ethernet cable is plugged in or an |
| 26 | access point is found. |
26 | access point is found. |
| 27 | </p> |
27 | </p> |
| 28 | |
28 | |
| 29 | <p> |
29 | <p> |
| 30 | Here you can find some tools that helps you manage this. |
30 | Here you can find some tools that help you manage this. |
| 31 | </p> |
31 | </p> |
| 32 | |
32 | |
| 33 | <note> |
33 | <note> |
| 34 | This document only talks about <c>ifplugd</c>, but there are alternatives you |
34 | This document only talks about <c>ifplugd</c>, but there are alternatives such |
| 35 | can look into like <c>quickswitch</c>. |
35 | as <c>netplug</c>. <c>netplug</c> is a lightweight alternative to |
|
|
36 | <c>ifplugd</c>, but it relies on your kernel network drivers working correctly, |
|
|
37 | and many drivers do not. |
| 36 | </note> |
38 | </note> |
| 37 | |
39 | |
| 38 | </body> |
40 | </body> |
| 39 | </section> |
41 | </section> |
| 40 | <section> |
42 | <section> |
| … | |
… | |
| 52 | # <i>emerge sys-apps/ifplugd</i> |
54 | # <i>emerge sys-apps/ifplugd</i> |
| 53 | </pre> |
55 | </pre> |
| 54 | |
56 | |
| 55 | <p> |
57 | <p> |
| 56 | Configuration for ifplugd is fairly straightforward too. The configuration file |
58 | Configuration for ifplugd is fairly straightforward too. The configuration file |
| 57 | is held in <path>/etc/conf.d/ifplugd</path>. Run <c>man ifplugd</c> for details |
59 | is held in <path>/etc/conf.d/net</path>. Run <c>man ifplugd</c> for details on |
| 58 | on what the variables do. |
60 | the available variables. Also, see <path>/etc/conf.d/net.example</path> for more |
|
|
61 | examples. |
| 59 | </p> |
62 | </p> |
| 60 | |
63 | |
| 61 | <pre caption="sample ifplug configuration"> |
64 | <pre caption="Sample ifplug configuration"> |
| 62 | <comment># Define which interfaces we monitor</comment> |
65 | <comment>(Replace eth0 with the interface to be monitored)</comment> |
| 63 | INTERFACES="eth0" |
66 | ifplugd_eth0="..." |
| 64 | |
67 | |
| 65 | AUTO="no" |
68 | <comment>(To monitor a wireless interface)</comment> |
| 66 | BEEP="yes" |
69 | ifplugd_eth0="--api-mode=wlan" |
| 67 | IGNORE_FAIL="yes" |
70 | </pre> |
| 68 | IGNORE_FAIL_POSITIVE="no" |
|
|
| 69 | IGNORE_RETVAL="yes" |
|
|
| 70 | POLL_TIME="1" |
|
|
| 71 | DELAY_UP="0" |
|
|
| 72 | DELAY_DOWN="0" |
|
|
| 73 | API_MODE="auto" |
|
|
| 74 | SHUTDOWN="no" |
|
|
| 75 | WAIT_ON_FORK="no" |
|
|
| 76 | MONITOR="no" |
|
|
| 77 | ARGS="" |
|
|
| 78 | |
71 | |
| 79 | <comment># Additional parameters for ifplugd for the specified interface. Note that |
72 | <p> |
| 80 | # the global variable is ignored, when a variable like this is set for an |
73 | In addition to managing multiple network connections, you may want to add a tool |
| 81 | # interface</comment> |
74 | that makes it easy to work with multiple DNS servers and configurations. This is |
| 82 | MONITOR_wlan0="yes" |
75 | very handy when you receive your IP address via DHCP. Simply emerge |
| 83 | DELAY_UP_wlan0="5" |
76 | <c>resolvconf-gentoo</c>. |
| 84 | DELAY_DOWN_wlan0="5" |
77 | </p> |
|
|
78 | |
|
|
79 | <pre caption="Installing resolvconf-gentoo"> |
|
|
80 | # <i>emerge resolvconf-gentoo</i> |
| 85 | </pre> |
81 | </pre> |
|
|
82 | |
|
|
83 | <p> |
|
|
84 | See <c>man resolvconf-gentoo</c> to learn more about its features. |
|
|
85 | </p> |
| 86 | |
86 | |
| 87 | </body> |
87 | </body> |
| 88 | </section> |
88 | </section> |
| 89 | |
89 | |
| 90 | </sections> |
90 | </sections> |