/[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.7 - (hide annotations) (download) (as text)
Sat Oct 28 09:17:55 2006 UTC (7 years, 11 months ago) by neysx
Branch: MAIN
Changes since 1.6: +6 -1 lines
File MIME type: application/xml
Moved chapter abstracts into shared chapters
No content change, hence no bump

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

  ViewVC Help
Powered by ViewVC 1.1.20