Gentoo Archives: gentoo-doc-cvs

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] gentoo commit in xml/htdocs/doc/en/handbook: hb-net-modules.xml
Date: Thu, 15 Aug 2013 08:30:23
Message-Id: 20130815083019.C01892171C@flycatcher.gentoo.org
1 swift 13/08/15 08:30:19
2
3 Modified: hb-net-modules.xml
4 Log:
5 Fix bug #400721 - Fix bonding instructions
6
7 Revision Changes Path
8 1.28 xml/htdocs/doc/en/handbook/hb-net-modules.xml
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/handbook/hb-net-modules.xml?rev=1.28&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/handbook/hb-net-modules.xml?rev=1.28&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/doc/en/handbook/hb-net-modules.xml?r1=1.27&r2=1.28
13
14 Index: hb-net-modules.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-modules.xml,v
17 retrieving revision 1.27
18 retrieving revision 1.28
19 diff -u -r1.27 -r1.28
20 --- hb-net-modules.xml 23 Oct 2011 09:46:14 -0000 1.27
21 +++ hb-net-modules.xml 15 Aug 2013 08:30:19 -0000 1.28
22 @@ -4,7 +4,7 @@
23 <!-- The content of this document is licensed under the CC-BY-SA license -->
24 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
25
26 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-modules.xml,v 1.27 2011/10/23 09:46:14 swift Exp $ -->
27 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-modules.xml,v 1.28 2013/08/15 08:30:19 swift Exp $ -->
28
29 <sections>
30
31 @@ -13,8 +13,8 @@
32 different DHCP clients, setting up bonding, bridging, VLANs and more.
33 </abstract>
34
35 -<version>10</version>
36 -<date>2011-10-23</date>
37 +<version>11</version>
38 +<date>2013-08-15</date>
39
40 <section>
41 <title>Network Modules</title>
42 @@ -312,17 +312,30 @@
43 just one interface but they really use both network cards.
44 </p>
45
46 -<pre caption="bonding configuration in /etc/conf.d/net">
47 -<comment># To bond interfaces together</comment>
48 -slaves_bond0="eth0 eth1 eth2"
49 +<p>
50 +First, clear the configuration of the participating interfaces:
51 +</p>
52
53 -<comment># You may not want to assign an IP to the bonded interface</comment>
54 -config_bond0="null"
55 +<pre caption="Clearing interface configuration in /etc/conf.d/net">
56 +config_eth0="null"
57 +config_eth1="null"
58 +config_eth2="null"
59 +</pre>
60
61 -<comment># Depend on eth0, eth1 and eth2 as they may require extra configuration</comment>
62 -rc_need_bond0="net.eth0 net.eth1 net.eth2"
63 +<p>
64 +Next, define the bonding between the interfaces:
65 +</p>
66 +
67 +<pre caption="Define the bonding">
68 +slaves_bond0="eth0 eth1 eth2"
69 +config_bond0="192.168.100.4/24"
70 </pre>
71
72 +<p>
73 +Remove the <path>net.eth*</path> services from the runlevels, create a
74 +<path>net.bond0</path> one and add that one to the correct runlevel.
75 +</p>
76 +
77 </body>
78 </section>
79 <section>
80 @@ -423,7 +436,8 @@
81 <body>
82
83 <p>
84 -For VLAN support, emerge <c>net-misc/vconfig</c>.
85 +For VLAN support, emerge <c>net-misc/vconfig</c>. Also make sure that you use
86 +iproute2 as configuration module rather than ifconfig.
87 </p>
88
89 <p>
90 @@ -433,19 +447,35 @@
91 network.
92 </p>
93
94 -<pre caption="VLAN configuration in /etc/conf.d/net">
95 -<comment># Specify the VLAN numbers for the interface like so</comment>
96 -<comment># Please ensure your VLAN IDs are NOT zero-padded</comment>
97 +<p>
98 +To configure VLANs, first specify the VLAN numbers in
99 +<path>/etc/conf.d/net</path> like so:
100 +</p>
101 +
102 +<pre caption="Specifying VLAN numbers">
103 vlans_eth0="1 2"
104 +</pre>
105 +
106 +<p>
107 +Next, configure the interface for each VLAN:
108 +</p>
109 +
110 +<pre caption="Interface configuration for each VLAN">
111 +config_eth0_1="172.16.3.1 netmask 255.255.254.0"
112 +routes_eth0_1="default via 172.16.3.254"
113 +
114 +config_eth0_2="172.16.2.1 netmask 255.255.254.0"
115 +routes_eth0_2="default via 172.16.2.254"
116 +</pre>
117 +
118 +<p>
119 +VLAN-specific configurations are handled by <c>vconfig</c> like so:
120 +</p>
121
122 -<comment># You can also configure the VLAN</comment>
123 -<comment># see for vconfig man page for more details</comment>
124 -vconfig_eth0="set_name_type VLAN_PLUS_VID_NO_PAD"
125 -vconfig_vlan1="set_flag 1" "set_egress_map 2 6"
126 -
127 -<comment># Configure the interface as usual</comment>
128 -config_vlan1="172.16.3.1 netmask 255.255.254.0"
129 -config_vlan2="172.16.2.1 netmask 255.255.254.0"
130 +<pre caption="Configuring the VLANs">
131 +vlan1_name="vlan1"
132 +vlan1_ingress="2:6 3:5"
133 +eth0_vlan1_egress="1:2"
134 </pre>
135
136 <impo>