/[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.2 Revision 1.3
1<?xml version="1.0" encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
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.0 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.0 -->
6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-advanced.xml,v 1.3 2005/06/09 18:31:59 fox2mike Exp $ -->
6 8
7<sections> 9<sections>
8 10
9<version>1.1</version> 11<version>1.1</version>
10<date>2005-06-09</date> 12<date>2005-06-09</date>
177 need net.eth0 net.eth1 179 need net.eth0 net.eth1
178} 180}
179</pre> 181</pre>
180 182
181<p> 183<p>
182For a more detailed discussion about dependency, 184For a more detailed discussion about dependency, consult the section
183<uri link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=4#doc_chap4"> 185<uri link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=4#doc_chap4">
184consult the Gentoo Handbook</uri> 186 "Writing Init Scripts"</uri> in the Gentoo Handbook.
185</p> 187</p>
186 188
187</body> 189</body>
188</section> 190</section>
189 191
190<section id="variable_name"> 192<section id="variable_name">
191<title>Variable names and values</title> 193<title>Variable names and values</title>
192<body> 194<body>
193 195
194<p> 196<p>
195Variable names are dynamic. They are normally follow the structure of 197Variable names are dynamic. They normally follow the structure of
196<c>variable_${interface|mac|essid|apmac}</c>. For example, the variable 198<c>variable_${interface|mac|essid|apmac}</c>. For example, the variable
197<c>dhcpcd_eth0</c> holds the value for dhcpcd options for eth0 and 199<c>dhcpcd_eth0</c> holds the value for dhcpcd options for eth0 and
198<c>dhcpcd_essid</c> holds the value for dhcpcd options when any interface 200<c>dhcpcd_essid</c> holds the value for dhcpcd options when any interface
199connects to the essid "essid". 201connects to the essid "essid".
200</p> 202</p>
201 203
202<p> 204<p>
203However, there is no hard and fast rule that states interface names must be 205However, there is no hard and fast rule that states interface names must be
204ethx. Infact, many wireless interfaces have names wlanx, rax as well as ethx. 206ethx. In fact, many wireless interfaces have names like wlanx, rax as well as ethx.
205Also, some user defined interfaces such as bridges can be given any name, such 207Also, some user defined interfaces such as bridges can be given any name, such
206has foo. To life more interesting, wireless Access Points can have names with 208as foo. To make life more interesting, wireless Access Points can have names with
207non alpha-numeric characters in - this is important because you can configure 209non alpha-numeric characters in them - this is important because you can configure
208networking parameters per ESSID. 210networking parameters per ESSID.
209</p> 211</p>
210 212
211<p> 213<p>
212The downside of all this is that Gentoo uses bash variables for networking - 214The downside of all this is that Gentoo uses bash variables for networking -
214this limitation we change every character that is not an English alpha-numeric 216this limitation we change every character that is not an English alpha-numeric
215into a _ character. 217into a _ character.
216</p> 218</p>
217 219
218<p> 220<p>
219Another downside of bash is the content of variables - some character need to 221Another downside of bash is the content of variables - some characters need to
220be escaped. This can be achived by placing the \ character in front of the 222be escaped. This can be achived by placing the \ character in front of the
221character that needs to be escaped. Below is a list of characters that need 223character that needs to be escaped. Below is a list of characters that need
222to be escaped in this way. 224to be escaped in this way.
223</p> 225</p>
224 226
237 239
238<pre caption="variable name example"> 240<pre caption="variable name example">
239<comment># This does work, but the domain is invalid</comment> 241<comment># This does work, but the domain is invalid</comment>
240dns_domain_My____NET="My \"\\ NET" 242dns_domain_My____NET="My \"\\ NET"
241 243
242<comment># The above sets the dns domain to My \" NET when a wireless card 244<comment># The above sets the dns domain to My "\ NET when a wireless card
243# connects to an AP whose ESSID is My \" NET</comment> 245# connects to an AP whose ESSID is My "\ NET</comment>
244</pre> 246</pre>
245 247
246</body> 248</body>
247</section> 249</section>
248 250

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20