| … | |
… | |
| 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-modules.xml,v 1.26 2011/08/14 16:12:13 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-modules.xml,v 1.27 2011/10/23 09:46:14 swift Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <abstract> |
11 | <abstract> |
| 12 | Gentoo provides you flexible networking - here you are told about choosing |
12 | Gentoo provides you flexible networking - here you are told about choosing |
| 13 | different DHCP clients, setting up bonding, bridging, VLANs and more. |
13 | different DHCP clients, setting up bonding, bridging, VLANs and more. |
| 14 | </abstract> |
14 | </abstract> |
| 15 | |
15 | |
| 16 | <version>9</version> |
16 | <version>10</version> |
| 17 | <date>2011-08-13</date> |
17 | <date>2011-10-23</date> |
| 18 | |
18 | |
| 19 | <section> |
19 | <section> |
| 20 | <title>Network Modules</title> |
20 | <title>Network Modules</title> |
| 21 | <body> |
21 | <body> |
| 22 | |
22 | |
| … | |
… | |
| 38 | All settings discussed here are stored in <path>/etc/conf.d/net</path> unless |
38 | All settings discussed here are stored in <path>/etc/conf.d/net</path> unless |
| 39 | otherwise specified. |
39 | otherwise specified. |
| 40 | </note> |
40 | </note> |
| 41 | |
41 | |
| 42 | <pre caption="Module preference"> |
42 | <pre caption="Module preference"> |
| 43 | <comment># Prefer iproute2 over ifconfig</comment> |
43 | <comment># Prefer ifconfig over iproute2</comment> |
| 44 | modules="iproute2" |
44 | modules="ifconfig" |
| 45 | |
45 | |
| 46 | <comment># You can also specify other modules for an interface |
46 | <comment># You can also specify other modules for an interface |
| 47 | # In this case we prefer pump over dhcpcd</comment> |
47 | # In this case we prefer pump over dhcpcd</comment> |
| 48 | modules_eth0="pump" |
48 | modules_eth0="pump" |
| 49 | |
49 | |
| … | |
… | |
| 63 | We provide two interface handlers presently: <c>ifconfig</c> and |
63 | We provide two interface handlers presently: <c>ifconfig</c> and |
| 64 | <c>iproute2</c>. You need one of these to do any kind of network configuration. |
64 | <c>iproute2</c>. You need one of these to do any kind of network configuration. |
| 65 | </p> |
65 | </p> |
| 66 | |
66 | |
| 67 | <p> |
67 | <p> |
| 68 | <c>ifconfig</c> is the current Gentoo default and it's included in the system |
68 | <c>ifconfig</c> is installed by default (the <c>net-tools</c> package is part of |
| 69 | profile. <c>iproute2</c> is a more powerful and flexible package, but it's not |
69 | the system profile). <c>iproute2</c> is a more powerful and flexible package, |
| 70 | included by default. |
70 | but it's not included by default. |
| 71 | </p> |
71 | </p> |
| 72 | |
72 | |
| 73 | <pre caption="To install iproute2"> |
73 | <pre caption="To install iproute2"> |
| 74 | # <i>emerge sys-apps/iproute2</i> |
74 | # <i>emerge sys-apps/iproute2</i> |
| 75 | |
75 | |
| 76 | <comment># To prefer iproute2 over ifconfig if both are installed</comment> |
76 | <comment># To prefer ifconfig over iproute2 if both are installed as openrc prefers |
| 77 | modules="iproute2" |
77 | # to use iproute2 then</comment> |
|
|
78 | modules="ifconfig" |
| 78 | </pre> |
79 | </pre> |
| 79 | |
80 | |
| 80 | <p> |
81 | <p> |
| 81 | As both <c>ifconfig</c> and <c>iproute2</c> do very similar things we allow |
82 | As both <c>ifconfig</c> and <c>iproute2</c> do very similar things we allow |
| 82 | their basic configuration to work with each other. For example both the below |
83 | their basic configuration to work with each other. For example both the below |