|
Lines 8-15
Link Here
|
| 8 |
|
8 |
|
| 9 |
<sections> |
9 |
<sections> |
| 10 |
|
10 |
|
| 11 |
<version>1.4</version> |
11 |
<version>1.5</version> |
| 12 |
<date>2005-09-07</date> |
12 |
<date>2005-12-21</date> |
| 13 |
|
13 |
|
| 14 |
<section> |
14 |
<section> |
| 15 |
<title>Network Modules</title> |
15 |
<title>Network Modules</title> |
|
Lines 50-63
Link Here
|
| 50 |
<body> |
50 |
<body> |
| 51 |
|
51 |
|
| 52 |
<p> |
52 |
<p> |
| 53 |
We provide two interface handlers presently: ifconfig and iproute2. You need one |
53 |
We provide two interface handlers presently: <c>ifconfig</c> and |
| 54 |
of these to do any kind of network configuration. |
54 |
<c>iproute2</c>. You need one of these to do any kind of network configuration. |
| 55 |
</p> |
55 |
</p> |
| 56 |
|
56 |
|
| 57 |
<p> |
57 |
<p> |
| 58 |
ifconfig is the current Gentoo default and it's included in the system profile. |
58 |
<c>ifconfig</c> is the current Gentoo default and it's included in the system |
| 59 |
iproute2 is a more powerful and flexible package, but it's not included by |
59 |
profile. <c>iproute2</c> is a more powerful and flexible package, but it's not |
| 60 |
default. |
60 |
included by default. |
| 61 |
</p> |
61 |
</p> |
| 62 |
|
62 |
|
| 63 |
<pre caption="To install iproute2"> |
63 |
<pre caption="To install iproute2"> |
|
Lines 68-76
Link Here
|
| 68 |
</pre> |
68 |
</pre> |
| 69 |
|
69 |
|
| 70 |
<p> |
70 |
<p> |
| 71 |
As both ifconfig and iproute2 do very similar things we allow their basic |
71 |
As both <c>ifconfig</c> and <c>iproute2</c> do very similar things we allow |
| 72 |
configuration to work with each other. For example both the below code snippets |
72 |
their basic configuration to work with each other. For example both the below |
| 73 |
work regardless of which module you are using. |
73 |
code snippet work regardless of which module you are using. |
| 74 |
</p> |
74 |
</p> |
| 75 |
|
75 |
|
| 76 |
<pre caption="ifconfig and iproute2 examples"> |
76 |
<pre caption="ifconfig and iproute2 examples"> |
|
Lines 93-105
Link Here
|
| 93 |
Gateway, etc) from a DHCP server. This means that if there is a DHCP server |
93 |
Gateway, etc) from a DHCP server. This means that if there is a DHCP server |
| 94 |
running on the network, you just have to tell each client to use DHCP and it |
94 |
running on the network, you just have to tell each client to use DHCP and it |
| 95 |
sets up the network all by itself. Of course, you will have to configure for |
95 |
sets up the network all by itself. Of course, you will have to configure for |
| 96 |
other things like wireless, ppp or other things if required before you can use |
96 |
other things like wireless, PPP or other things if required before you can use |
| 97 |
DHCP. |
97 |
DHCP. |
| 98 |
</p> |
98 |
</p> |
| 99 |
|
99 |
|
| 100 |
<p> |
100 |
<p> |
| 101 |
DHCP can be provided by dhclient, dhcpcd, pump or udhcpc. Each DHCP module has |
101 |
DHCP can be provided by <c>dhclient</c>, <c>dhcpcd</c>, <c>pump</c> or |
| 102 |
its pros and cons - here's a quick run down. |
102 |
<c>udhcpc</c>. Each DHCP module has its pros and cons - here's a quick run down. |
| 103 |
</p> |
103 |
</p> |
| 104 |
|
104 |
|
| 105 |
<table> |
105 |
<table> |
|
Lines 110-117
Link Here
|
| 110 |
<th>Cons</th> |
110 |
<th>Cons</th> |
| 111 |
</tr> |
111 |
</tr> |
| 112 |
<tr> |
112 |
<tr> |
| 113 |
<ti>dhclient</ti> |
113 |
<ti><c>dhclient</c></ti> |
| 114 |
<ti>net-misc/dhcp</ti> |
114 |
<ti><c>net-misc/dhcp</c></ti> |
| 115 |
<ti> |
115 |
<ti> |
| 116 |
Made by ISC, the same people who make the BIND DNS software. Very |
116 |
Made by ISC, the same people who make the BIND DNS software. Very |
| 117 |
configurable |
117 |
configurable |
|
Lines 122-129
Link Here
|
| 122 |
</ti> |
122 |
</ti> |
| 123 |
</tr> |
123 |
</tr> |
| 124 |
<tr> |
124 |
<tr> |
| 125 |
<ti>dhcpcd</ti> |
125 |
<ti><c>dhcpcd</c></ti> |
| 126 |
<ti>net-misc/dhcpcd</ti> |
126 |
<ti><c>net-misc/dhcpcd</c></ti> |
| 127 |
<ti> |
127 |
<ti> |
| 128 |
Long time Gentoo default, no reliance on outside tools |
128 |
Long time Gentoo default, no reliance on outside tools |
| 129 |
</ti> |
129 |
</ti> |
|
Lines 133-140
Link Here
|
| 133 |
</ti> |
133 |
</ti> |
| 134 |
</tr> |
134 |
</tr> |
| 135 |
<tr> |
135 |
<tr> |
| 136 |
<ti>pump</ti> |
136 |
<ti><c>pump</c></ti> |
| 137 |
<ti>net-misc/pump</ti> |
137 |
<ti><c>net-misc/pump</c></ti> |
| 138 |
<ti> |
138 |
<ti> |
| 139 |
Lightweight, no reliance on outside tools |
139 |
Lightweight, no reliance on outside tools |
| 140 |
</ti> |
140 |
</ti> |
|
Lines 144-153
Link Here
|
| 144 |
</ti> |
144 |
</ti> |
| 145 |
</tr> |
145 |
</tr> |
| 146 |
<tr> |
146 |
<tr> |
| 147 |
<ti>udhcpc</ti> |
147 |
<ti><c>udhcpc</c></ti> |
| 148 |
<ti>net-misc/udhcp</ti> |
148 |
<ti><c>net-misc/udhcp</c></ti> |
| 149 |
<ti> |
149 |
<ti> |
| 150 |
Lightweight - smallest dhcp client around, made for embedded systems |
150 |
Lightweight - smallest DHCP client around, made for embedded systems |
| 151 |
</ti> |
151 |
</ti> |
| 152 |
<ti> |
152 |
<ti> |
| 153 |
Unproven - no distro uses it by default, cannot define a timeout beyond 3 |
153 |
Unproven - no distro uses it by default, cannot define a timeout beyond 3 |
|
Lines 158-181
Link Here
|
| 158 |
|
158 |
|
| 159 |
<p> |
159 |
<p> |
| 160 |
If you have more than one DHCP client installed, you need to specify which one |
160 |
If you have more than one DHCP client installed, you need to specify which one |
| 161 |
to use - otherwise we default to dhcpcd if available. |
161 |
to use - otherwise we default to <c>dhcpcd</c> if available. |
| 162 |
</p> |
162 |
</p> |
| 163 |
|
163 |
|
| 164 |
<p> |
164 |
<p> |
| 165 |
To send specific options to the dhcp module, use module_eth0="..." |
165 |
To send specific options to the DHCP module, use <c>module_eth0="..."</c> |
| 166 |
<e>(change module to the DHCP module you're using - ie dhcpcd_eth0)</e> |
166 |
<e>(change module to the DHCP module you're using - ie <c>dhcpcd_eth0</c>)</e> |
| 167 |
</p> |
167 |
</p> |
| 168 |
|
168 |
|
| 169 |
<p> |
169 |
<p> |
| 170 |
We try and make DHCP relatively agnostic - as such we support the following |
170 |
We try and make DHCP relatively agnostic - as such we support the following |
| 171 |
commands using the dhcp_eth0 variable. The default is not to set any of them |
171 |
commands using the <c>dhcp_eth0</c> variable. The default is not to set any of |
|
|
172 |
them: |
| 172 |
</p> |
173 |
</p> |
| 173 |
|
174 |
|
| 174 |
<ul> |
175 |
<ul> |
| 175 |
<li>release - releases the IP address for re-use</li> |
176 |
<li><c>release</c> - releases the IP address for re-use</li> |
| 176 |
<li>nodns - don't overwrite /etc/resolv.conf</li> |
177 |
<li><c>nodns</c> - don't overwrite /etc/resolv.conf</li> |
| 177 |
<li>nontp - don't overwrite /etc/ntp.conf</li> |
178 |
<li><c>nontp</c> - don't overwrite /etc/ntp.conf</li> |
| 178 |
<li>nonis - don't overwrite /etc/yp.conf</li> |
179 |
<li><c>nonis</c> - don't overwrite /etc/yp.conf</li> |
| 179 |
</ul> |
180 |
</ul> |
| 180 |
|
181 |
|
| 181 |
<pre caption="Sample DHCP configuration in /etc/conf.d/net"> |
182 |
<pre caption="Sample DHCP configuration in /etc/conf.d/net"> |
|
Lines 188-195
Link Here
|
| 188 |
</pre> |
189 |
</pre> |
| 189 |
|
190 |
|
| 190 |
<note> |
191 |
<note> |
| 191 |
dhcpcd, udhcpc and pump send the current hostname to the DHCP server by default |
192 |
<c>dhcpcd</c>, <c>udhcpc</c> and <c>pump</c> send the current hostname to the |
| 192 |
so you don't need to specify this anymore. |
193 |
DHCP server by default so you don't need to specify this anymore. |
| 193 |
</note> |
194 |
</note> |
| 194 |
|
195 |
|
| 195 |
</body> |
196 |
</body> |
|
Lines 207-219
Link Here
|
| 207 |
</pre> |
208 |
</pre> |
| 208 |
|
209 |
|
| 209 |
<warn> |
210 |
<warn> |
| 210 |
baselayout-1.11.x supports PPPOE only. Hopefully future versions will support |
211 |
<c>baselayout-1.11.x</c> supports PPPOE only. Hopefully future versions will |
| 211 |
PPPOA. |
212 |
support PPPOA. |
| 212 |
</warn> |
213 |
</warn> |
| 213 |
|
214 |
|
| 214 |
<p> |
215 |
<p> |
| 215 |
Now we need to instruct configure eth0 to be an ADSL interface and enter our |
216 |
Now we need to instruct configure <c>eth0</c> to be an ADSL interface and enter |
| 216 |
username. |
217 |
our username. |
| 217 |
</p> |
218 |
</p> |
| 218 |
|
219 |
|
| 219 |
<pre caption="Configure eth0 for ADSL"> |
220 |
<pre caption="Configure eth0 for ADSL"> |
|
Lines 223-229
Link Here
|
| 223 |
|
224 |
|
| 224 |
<p> |
225 |
<p> |
| 225 |
Finally you need to define your username and password in |
226 |
Finally you need to define your username and password in |
| 226 |
<path>/etc/ppp/pap-secrets</path> |
227 |
<path>/etc/ppp/pap-secrets</path>. |
| 227 |
</p> |
228 |
</p> |
| 228 |
|
229 |
|
| 229 |
<pre caption="sample /etc/ppp/pap-secrets"> |
230 |
<pre caption="sample /etc/ppp/pap-secrets"> |
|
Lines 249-255
Link Here
|
| 249 |
</p> |
250 |
</p> |
| 250 |
|
251 |
|
| 251 |
<p> |
252 |
<p> |
| 252 |
For APIPA support, emerge net-misc/iputils or net-analyzer/arping |
253 |
For APIPA support, emerge <c>net-misc/iputils</c> or <c>net-analyzer/arping</c>. |
| 253 |
</p> |
254 |
</p> |
| 254 |
|
255 |
|
| 255 |
<pre caption="APIPA configuration in /etc/conf.d/net"> |
256 |
<pre caption="APIPA configuration in /etc/conf.d/net"> |
|
Lines 268-274
Link Here
|
| 268 |
<body> |
269 |
<body> |
| 269 |
|
270 |
|
| 270 |
<p> |
271 |
<p> |
| 271 |
For link bonding/trunking emerge net-misc/ifenslave |
272 |
For link bonding/trunking emerge <c>net-misc/ifenslave</c>. |
| 272 |
</p> |
273 |
</p> |
| 273 |
|
274 |
|
| 274 |
<p> |
275 |
<p> |
|
Lines 297-303
Link Here
|
| 297 |
<body> |
298 |
<body> |
| 298 |
|
299 |
|
| 299 |
<p> |
300 |
<p> |
| 300 |
For bridging support emerge net-misc/bridge-utils |
301 |
For bridging support emerge <c>net-misc/bridge-utils</c>. |
| 301 |
</p> |
302 |
</p> |
| 302 |
|
303 |
|
| 303 |
<p> |
304 |
<p> |
|
Lines 328-336
Link Here
|
| 328 |
</pre> |
329 |
</pre> |
| 329 |
|
330 |
|
| 330 |
<impo> |
331 |
<impo> |
| 331 |
For using some bridge setups, you may need to consult the |
332 |
For using some bridge setups, you may need to consult the <uri |
| 332 |
<uri link="?part=4&chap=2#variable_name">variable name</uri> |
333 |
link="?part=4&chap=2#variable_name">variable name</uri> documentation. |
| 333 |
documentation. |
|
|
| 334 |
</impo> |
334 |
</impo> |
| 335 |
|
335 |
|
| 336 |
</body> |
336 |
</body> |
|
Lines 343-349
Link Here
|
| 343 |
You don't need to emerge anything for changing the MAC address of your interface |
343 |
You don't need to emerge anything for changing the MAC address of your interface |
| 344 |
if you change to a specific address. However, if you need to change to a random |
344 |
if you change to a specific address. However, if you need to change to a random |
| 345 |
address or a random address of a given type then you need to emerge |
345 |
address or a random address of a given type then you need to emerge |
| 346 |
net-analyzer/macchanger. |
346 |
<c>net-analyzer/macchanger</c>. |
| 347 |
</p> |
347 |
</p> |
| 348 |
|
348 |
|
| 349 |
<pre caption="MAC Address change example"> |
349 |
<pre caption="MAC Address change example"> |
|
Lines 395-401
Link Here
|
| 395 |
<body> |
395 |
<body> |
| 396 |
|
396 |
|
| 397 |
<p> |
397 |
<p> |
| 398 |
For VLAN support, emerge net-misc/vconfig |
398 |
For VLAN support, emerge <c>net-misc/vconfig</c>. |
| 399 |
</p> |
399 |
</p> |
| 400 |
|
400 |
|
| 401 |
<p> |
401 |
<p> |
|
Lines 421-429
Link Here
|
| 421 |
</pre> |
421 |
</pre> |
| 422 |
|
422 |
|
| 423 |
<impo> |
423 |
<impo> |
| 424 |
For using some VLAN setups, you may need to consult the |
424 |
For using some VLAN setups, you may need to consult the <uri |
| 425 |
<uri link="?part=4&chap=2#variable_name">variable name</uri> |
425 |
link="?part=4&chap=2#variable_name">variable name</uri> documentation. |
| 426 |
documentation. |
|
|
| 427 |
</impo> |
426 |
</impo> |
| 428 |
|
427 |
|
| 429 |
</body> |
428 |
</body> |