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

Contents of /xml/htdocs/doc/en/handbook/hb-net-start.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download) (as text)
Tue Jun 14 10:08:50 2005 UTC (9 years, 6 months ago) by swift
Branch: MAIN
Changes since 1.1: +8 -8 lines
File MIME type: application/xml
Remove use of <br/>, add caption for pre, add ending period where necesasry.

1 swift 1.1 <?xml version="1.0" encoding="UTF-8"?>
2     <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3    
4     <!-- The content of this document is licensed under the CC-BY-SA license -->
5 swift 1.2 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 swift 1.1
7     <sections>
8    
9 swift 1.2 <version>1.1</version>
10     <date>2005-06-14</date>
11 swift 1.1
12     <section>
13     <title>Getting started</title>
14     <body>
15    
16     <note>
17     This document assumes that you have correctly configured your kernel, its
18     modules for your hardware and you know the interface name of your hardware.
19     We also assume that you are configuring eth0, but it could also be
20     eth1, wlan0, etc.
21     </note>
22    
23     <note>
24     This document requires you are running baselayout-1.11.11 or better.
25     </note>
26    
27     <p>
28     To get started configuring your network card, you need to tell the Gentoo RC
29     system about it. This is done by creating a symbolic link from <c>net.lo</c>
30     to <c>net.eth0</c> in <path>/etc/init.d</path>
31     </p>
32    
33 swift 1.2 <pre caption="Symlinking net.eth0 to net.lo">
34 swift 1.1 # <i>cd /etc/init.d</i>
35     # <i>ln -s net.lo net.eth0</i>
36     </pre>
37    
38     <p>
39     Gentoo's RC system now knows about that interface. It also needs to know how
40     to configure the new interface. All the network interfaces are configured in
41 swift 1.2 <path>/etc/conf.d/net</path>. Below is a sample configuration for DHCP and
42     static addresses.
43 swift 1.1 </p>
44    
45     <pre caption="Examples for /etc/conf.d/net">
46     <comment># For DHCP</comment>
47     config_eth0=( "dhcp" )
48    
49     <comment># For static IP using CIDR notation</comment>
50     config_eth0=( "192.168.0.7/24" )
51     routes_eth0=( "default via 192.168.0.1" )
52    
53     <comment># For static IP using netmask notation</comment>
54     config_eth0=( "192.168.0.7 netmask 255.255.255.0" )
55     routes_eth0=( "default gw 192.168.0.1" )
56     </pre>
57    
58     <note>
59     If you do not specify a configuration for your interface then DHCP is assumed.
60     </note>
61    
62     <note>
63 swift 1.2 CIDR stands for Classless InterDomain Routing.
64 swift 1.1 Originally, IPv4 addresses were classified as A, B, or C.
65     The early classification system did not envision the massive popularity of the
66     Internet, and is in danger of running out of new unique addresses. CIDR is an
67     addressing scheme that allows one IP address to designate many IP addresses.
68     A CIDR IP address looks like a normal IP address except that it ends with a
69     slash followed by a number; for example, 192.168.0.0/16.
70     CIDR is described in <uri link="http://rfc.net/rfc1519.html">RFC 1519</uri>.
71     </note>
72    
73     <p>
74     Now that we have configured our interface, we can start and stop it using the
75     below commands
76     </p>
77    
78     <pre caption="Starting and stopping network scripts">
79     # <i>/etc/init.d/net.eth0 start</i>
80     # <i>/etc/init.d/net.eth0 stop</i>
81     </pre>
82    
83     <impo>
84     When troubleshooting networking, it is recommended to set RC_VERBOSE="yes"
85     in <path>/etc/conf.d/rc</path> so that you get more information about what's
86 swift 1.2 happening.
87 swift 1.1 </impo>
88    
89     <p>
90     Now that you have successfully started and stopped your network interface, you
91     may wish to get it to start when Gentoo boots. Here's how to do this. The last
92     "rc" command instructs Gentoo to start any scripts in the current runlevel
93     that have not yet been started.
94     </p>
95    
96     <pre caption="Configuring a network interface to load at boot time">
97     # <i>rc-update add net.eth0 default</i>
98     # <i>rc</i>
99     </pre>
100    
101     </body>
102     </section>
103    
104     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20