/[gentoo]/xml/htdocs/doc/en/handbook/hb-net-advanced.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-net-advanced.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.9 Revision 1.10
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-advanced.xml,v 1.9 2005/12/21 11:49:14 jkt Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-advanced.xml,v 1.10 2005/12/21 12:20:43 jkt Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.3</version> 11<version>1.3</version>
12<date>2005-08-14</date> 12<date>2005-08-14</date>
14<section> 14<section>
15<title>Advanced Configuration</title> 15<title>Advanced Configuration</title>
16<body> 16<body>
17 17
18<p> 18<p>
19The config_eth0 variable is the heart of an interface's configuration. 19The config_eth0 variable is the heart of an interface's configuration. It's a
20It's a high level instruction list for configuring the interface (eth0 in 20high level instruction list for configuring the interface (eth0 in this case).
21this case). Each command in the instruction list is performed sequentially. 21Each command in the instruction list is performed sequentially. The interface is
22The interface is deemed OK if at least one command works. 22deemed OK if at least one command works.
23</p> 23</p>
24 24
25<p> 25<p>
26Here's a list of in-built instructions. 26Here's a list of in-built instructions.
27</p> 27</p>
49<tr> 49<tr>
50 <ti> 50 <ti>
51 dhcp, adsl or apipa (or a custom command from a 3rd party module) 51 dhcp, adsl or apipa (or a custom command from a 3rd party module)
52 </ti> 52 </ti>
53 <ti> 53 <ti>
54 Run the module which provides the command. For example "dhcp" will 54 Run the module which provides the command. For example "dhcp" will run a
55 run a module that provides dhcp which can be one of either dhcpcd, 55 module that provides dhcp which can be one of either dhcpcd, udhcpc,
56 udhcpc, dhclient or pump. 56 dhclient or pump.
57 </ti> 57 </ti>
58</tr> 58</tr>
59</table> 59</table>
60 60
61<p> 61<p>
96</pre> 96</pre>
97 97
98<note> 98<note>
99When using the ifconfig module and adding more than one address, interface 99When using the ifconfig module and adding more than one address, interface
100aliases are created for each extra address. So with the above two examples you 100aliases are created for each extra address. So with the above two examples you
101will get interfaces eth0, eth0:1 and eth0:2. 101will get interfaces eth0, eth0:1 and eth0:2. You cannot do anything special with
102You cannot do anything special with these interfaces as the kernel and other 102these interfaces as the kernel and other programs will just treat eth0:1 and
103programs will just treat eth0:1 and eth0:2 as eth0. 103eth0:2 as eth0.
104</note> 104</note>
105 105
106<impo> 106<impo>
107The fallback order is important! If we did not specify the "null" option then 107The fallback order is important! If we did not specify the "null" option then
108the "apipa" command would only be run if the "noop" command failed. 108the "apipa" command would only be run if the "noop" command failed.
109</impo> 109</impo>
110 110
111<note> 111<note>
112<uri link="?part=4&amp;chap=3#apipa">APIPA</uri> and 112<uri link="?part=4&amp;chap=3#apipa">APIPA</uri> and <uri
113<uri link="?part=4&amp;chap=3#dhcp">DHCP</uri> are discussed later. 113link="?part=4&amp;chap=3#dhcp">DHCP</uri> are discussed later.
114</note> 114</note>
115 115
116</body> 116</body>
117</section> 117</section>
118<section> 118<section>
135 <ti>The net service is always considered up</ti> 135 <ti>The net service is always considered up</ti>
136</tr> 136</tr>
137<tr> 137<tr>
138 <ti>no</ti> 138 <ti>no</ti>
139 <ti> 139 <ti>
140 This basically means that at least one net.* service besides net.lo 140 This basically means that at least one net.* service besides net.lo must be
141 must be up. This can be used by notebook users that have a wifi and 141 up. This can be used by notebook users that have a wifi and a static nic,
142 a static nic, and only wants one up at any given time to have the 142 and only wants one up at any given time to have the net service seen as up.
143 net service seen as up.
144 </ti> 143 </ti>
145</tr> 144</tr>
146<tr> 145<tr>
147 <ti>lo</ti> 146 <ti>lo</ti>
148 <ti> 147 <ti>
149 This is the same as the 'no' option, but net.lo is also counted. 148 This is the same as the 'no' option, but net.lo is also counted. This should
150 This should be useful to people that do not care about any specific 149 be useful to people that do not care about any specific interface being up
151 interface being up at boot. 150 at boot.
152 </ti> 151 </ti>
153</tr> 152</tr>
154<tr> 153<tr>
155 <ti>yes</ti> 154 <ti>yes</ti>
156 <ti> 155 <ti>
157 For this ALL network interfaces MUST be up for the 'net' service to 156 For this ALL network interfaces MUST be up for the 'net' service to be
158 be considered up. 157 considered up.
159 </ti> 158 </ti>
160</tr> 159</tr>
161</table> 160</table>
162 161
163<p> 162<p>
164But what about net.br0 depending on net.eth0 and net.eth1? 163But what about net.br0 depending on net.eth0 and net.eth1? net.eth1 may be a
165net.eth1 may be a wireless or ppp device that needs configuration before it 164wireless or ppp device that needs configuration before it can be added to the
166can be added to the bridge.
167This cannot be done in <path>/etc/init.d/net.br0</path> as that's a symbolic 165bridge. This cannot be done in <path>/etc/init.d/net.br0</path> as that's a
168link to net.lo 166symbolic link to net.lo
169</p> 167</p>
170 168
171<p> 169<p>
172The answer is making your own depend() function in <path>/etc/conf.d/net</path>. 170The answer is making your own depend() function in <path>/etc/conf.d/net</path>.
173</p> 171</p>
178 need net.eth0 net.eth1 176 need net.eth0 net.eth1
179} 177}
180</pre> 178</pre>
181 179
182<p> 180<p>
183For a more detailed discussion about dependency, consult the section 181For a more detailed discussion about dependency, consult the section <uri
184<uri 182link="?part=2&amp;chap=4#doc_chap4">Writing Init Scripts</uri> in the Gentoo
185link="?part=2&amp;chap=4#doc_chap4">Writing 183Handbook.
186Init Scripts</uri> in the Gentoo Handbook.
187</p> 184</p>
188 185
189</body> 186</body>
190</section> 187</section>
191 188

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.20