| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
|
| 3 |
|
| 4 |
<!-- The content of this document is licensed under the CC-BY-SA license -->
|
| 5 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
|
| 6 |
|
| 7 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-management.xml,v 1.12 2008/04/17 21:11:30 nightmorph Exp $ -->
|
| 8 |
|
| 9 |
<sections>
|
| 10 |
|
| 11 |
<abstract>
|
| 12 |
For laptop users or people who move their computer around different networks.
|
| 13 |
</abstract>
|
| 14 |
|
| 15 |
<version>10</version>
|
| 16 |
<date>2011-10-30</date>
|
| 17 |
|
| 18 |
<section>
|
| 19 |
<title>Network Management</title>
|
| 20 |
<body>
|
| 21 |
|
| 22 |
<p>
|
| 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, you may want
|
| 25 |
networking to automatically work when an ethernet cable is plugged in or an
|
| 26 |
access point is found.
|
| 27 |
</p>
|
| 28 |
|
| 29 |
<p>
|
| 30 |
Here you can find some tools that help you manage this.
|
| 31 |
</p>
|
| 32 |
|
| 33 |
<note>
|
| 34 |
This document only talks about <c>ifplugd</c>, but there are alternatives such
|
| 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.
|
| 38 |
</note>
|
| 39 |
|
| 40 |
</body>
|
| 41 |
</section>
|
| 42 |
<section>
|
| 43 |
<title>ifplugd</title>
|
| 44 |
<body>
|
| 45 |
|
| 46 |
<p>
|
| 47 |
<uri link="http://0pointer.de/lennart/projects/ifplugd/">ifplugd</uri> is a
|
| 48 |
daemon that starts and stops interfaces when an ethernet cable is inserted or
|
| 49 |
removed. It can also manage detecting association to Access Points or when new
|
| 50 |
ones come in range.
|
| 51 |
</p>
|
| 52 |
|
| 53 |
<pre caption="Installing ifplugd">
|
| 54 |
# <i>emerge sys-apps/ifplugd</i>
|
| 55 |
</pre>
|
| 56 |
|
| 57 |
<p>
|
| 58 |
Configuration for ifplugd is fairly straightforward too. The configuration file
|
| 59 |
is held in <path>/etc/conf.d/net</path>. Run <c>man ifplugd</c> for details on
|
| 60 |
the available variables. Also, see
|
| 61 |
<path>/usr/share/doc/openrc-*/net.example.bz2</path> for more examples.
|
| 62 |
</p>
|
| 63 |
|
| 64 |
<pre caption="Sample ifplug configuration">
|
| 65 |
<comment>(Replace eth0 with the interface to be monitored)</comment>
|
| 66 |
ifplugd_eth0="..."
|
| 67 |
|
| 68 |
<comment>(To monitor a wireless interface)</comment>
|
| 69 |
ifplugd_eth0="--api-mode=wlan"
|
| 70 |
</pre>
|
| 71 |
|
| 72 |
<p>
|
| 73 |
In addition to managing multiple network connections, you may want to add a tool
|
| 74 |
that makes it easy to work with multiple DNS servers and configurations. This is
|
| 75 |
very handy when you receive your IP address via DHCP. Simply emerge
|
| 76 |
<c>openresolv</c>.
|
| 77 |
</p>
|
| 78 |
|
| 79 |
<pre caption="Installing openresolv">
|
| 80 |
# <i>emerge openresolv</i>
|
| 81 |
</pre>
|
| 82 |
|
| 83 |
<p>
|
| 84 |
See <c>man resolvconf</c> to learn more about its features.
|
| 85 |
</p>
|
| 86 |
|
| 87 |
</body>
|
| 88 |
</section>
|
| 89 |
|
| 90 |
</sections>
|