website diff en/doc/handbook/network-config.html @ rev 350
en: Edits and typos
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Wed Apr 01 17:56:04 2009 +0000 (2009-04-01) |
parents | 5ea4a83c8f7a |
children | fa2c5bed2417 |
line diff
1.1 --- a/en/doc/handbook/network-config.html Sun Mar 22 19:54:20 2009 +0000 1.2 +++ b/en/doc/handbook/network-config.html Wed Apr 01 17:56:04 2009 +0000 1.3 @@ -6,7 +6,7 @@ 1.4 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> 1.5 <meta name="description" content="slitaz English handbook network config pppoe ppp eth dhcp" /> 1.6 <meta name="expires" content="never" /> 1.7 - <meta name="modified" content="2009-03-22 18:30:00" /> 1.8 + <meta name="modified" content="2009-03-23 19:30:00" /> 1.9 <meta name="publisher" content="www.slitaz.org" /> 1.10 <meta name="author" content="Paul Issot, Christophe Lincoln"/> 1.11 <link rel="shortcut icon" href="favicon.ico" /> 1.12 @@ -34,12 +34,16 @@ 1.13 <li><a href="#about">About the Network.</a></li> 1.14 <li><a href="#netbox">Netbox</a> - Configure the network.</li> 1.15 <li><a href="#wifibox">Wifibox</a> - Configure wireless networks.</li> 1.16 - <li><a href="#driver">Install network card driver</a> - Find and load 1.17 - Kernel modules.</li> 1.18 <li><a href="#hostname">/etc/hostname</a> - Hostname.</li> 1.19 + <li><a href="#network.conf">/etc/network.conf</a> - Network 1.20 + configuration file.</li> 1.21 + <li><a href="#dynamicIP">Dynamic IP</a> - Client DHCP udhcpc.</li> 1.22 + <li><a href="#staticIP">Static IP</a> - Using a specific address.</li> 1.23 <li><a href="#pppoe">PPPoE kernel-mode</a> - Dial-up modem connection 1.24 in Kernel mode.</li> 1.25 <li><a href="#rp-pppoe">PPPoE with rp-pppoe</a> - Dial-up modem.</li> 1.26 + <li><a href="#driver">Install network card driver</a> - Find and load 1.27 + Kernel modules.</li> 1.28 <li><a href="#firewall">Firewall</a> - Manage the Firewall (Iptables).</li> 1.29 </ul> 1.30 1.31 @@ -126,27 +130,6 @@ 1.32 installed via the Windows driver manager (tazndis).</li> 1.33 </ol> 1.34 1.35 -<a name="driver"></a> 1.36 -<h3>Install network card driver</h3> 1.37 -<p> 1.38 -In case you need a network card driver and don't know the driver name, you can 1.39 -use the command <code>lspci</code> to find your card and then <code>modprobe</code> 1.40 -to load a module. In Live mode you can use the SliTaz boot option 1.41 -<code>modprobe=modules</code> to automatically load Kernel modules. To get a 1.42 -list of all available network card drivers, display PCI eth cards and load a 1.43 -module: 1.44 -</p> 1.45 -<pre> 1.46 - # modprobe -l | grep drivers/net 1.47 - # lspci | grep [Ee]th 1.48 - # modprobe -v module_name 1.49 -</pre> 1.50 -<p> 1.51 -On an installed system you just need to add the module_name to the variable 1.52 -<code>LOAD_MODULES </code> in <code>/etc/rcS.conf</code> to load your module 1.53 -on each boot. 1.54 -</p> 1.55 - 1.56 <a name="hostname"></a> 1.57 <h3>/etc/hostname - The hostname</h3> 1.58 <p> 1.59 @@ -166,6 +149,62 @@ 1.60 # echo "kayam" > /etc/hostname 1.61 </pre> 1.62 1.63 +<a name="network.conf"></a> 1.64 +<h3>/etc/network.conf</h3> 1.65 +<p> 1.66 +/etc/network.conf is the SliTaz system network configuration file. It's syntax 1.67 +is simple and you can edit its contents with a text editor such as Nano. 1.68 +/etc/network.conf is used by the script /etc/init.d/network.sh to configure the 1.69 +network interface at boot time. 1.70 +</p> 1.71 + 1.72 +<a name="dynamicIP"></a> 1.73 +<h3>Dynamic IP - DHCP client udhcpc</h3> 1.74 +<p> 1.75 +The DHCP client udhcpc supplied with Busybox uses the 1.76 +/usr/share/udhcpc/default.script to get an IP address dynamically at 1.77 +boot. It supports various options which you can view with the 1.78 +<code>--help</code> option: 1.79 +</p> 1.80 +<pre> # udhcpc --help 1.81 +</pre> 1.82 +<p> 1.83 +To disable udhcpc on eth0 or modify the interface (eg eth1), you must 1.84 +edit the /etc/network.conf file and place the value "no" in the variable DHCP=: 1.85 +</p> 1.86 +<pre class="script"> 1.87 +# Dynamic IP address. 1.88 +# Enable/disable DHCP client at boot time. 1.89 +DHCP="no" 1.90 +</pre> 1.91 + 1.92 +<a name="staticIP"></a> 1.93 +<h3>Static IP - Using a specific address</h3> 1.94 +<p> 1.95 +You can specify a fixed IP address to configure at boot time by using 1.96 +the value "yes" in the variable STATIC=: 1.97 +</p> 1.98 +<pre class="script"> 1.99 +# Static IP address. 1.100 +# Enable/disable static IP at boot time. 1.101 +STATIC="yes" 1.102 +</pre> 1.103 +<p> 1.104 +For the configuration to work, you must specify an IP address, its subnet 1.105 +mask, a default gateway (gateway) and DNS server to use. Example: 1.106 +</p> 1.107 +<pre class="script"> 1.108 +# Set IP address, and netmask for a static IP. 1.109 +IP="192.168.0.6" 1.110 +NETMASK="255.255.255.0" 1.111 + 1.112 +# Set route gateway for a static IP. 1.113 +GATEWAY="192.168.0.1" 1.114 + 1.115 +# Set DNS server. for a static IP. 1.116 +DNS_SERVER="192.168.0.1" 1.117 +</pre> 1.118 + 1.119 <a name="pppoe"></a> 1.120 <h3>PPPoE connection kernel-mode</h3> 1.121 <p> 1.122 @@ -255,6 +294,27 @@ 1.123 <code>pppoe-stop</code>. 1.124 </p> 1.125 1.126 +<a name="driver"></a> 1.127 +<h3>Install network card driver</h3> 1.128 +<p> 1.129 +In case you need a network card driver and don't know the driver name, you can 1.130 +use the command <code>lspci</code> to find your card and then <code>modprobe</code> 1.131 +to load a module. In Live mode you can use the SliTaz boot option 1.132 +<code>modprobe=modules</code> to automatically load Kernel modules. To get a 1.133 +list of all available network card drivers, display PCI eth cards and load a 1.134 +module: 1.135 +</p> 1.136 +<pre> 1.137 + # modprobe -l | grep drivers/net 1.138 + # lspci | grep [Ee]th 1.139 + # modprobe -v module_name 1.140 +</pre> 1.141 +<p> 1.142 +On an installed system you just need to add the module_name to the variable 1.143 +<code>LOAD_MODULES </code> in <code>/etc/rcS.conf</code> to load your module 1.144 +on each boot. 1.145 +</p> 1.146 + 1.147 <a name="firewall"></a> 1.148 <h3>Manage the Firewall (<em>firewall</em>) using Iptables</h3> 1.149 <p> 1.150 @@ -352,7 +412,6 @@ 1.151 iptables -A OUTPUT -i $INTERFACE -p tcp --sport 21 -j ACCEPT 1.152 1.153 } 1.154 - 1.155 </pre> 1.156 1.157 <!-- End of content -->