]>
Commit | Line | Data |
---|---|---|
94eab754 MT |
1 | <?xml version="1.0"?> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS/DTD DocBook XML V4.2//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | ||
5 | <refentry id="network"> | |
6 | <refentryinfo> | |
7 | <title>network-quick-start</title> | |
8 | <productname>network</productname> | |
9 | ||
10 | <authorgroup> | |
11 | <author> | |
12 | <contrib>Developer</contrib> | |
13 | <firstname>Michael</firstname> | |
14 | <surname>Tremer</surname> | |
15 | <email>michael.tremer@ipfire.org</email> | |
16 | </author> | |
17 | </authorgroup> | |
18 | </refentryinfo> | |
19 | ||
20 | <refmeta> | |
21 | <refentrytitle>network-quick-start</refentrytitle> | |
22 | <manvolnum>8</manvolnum> | |
23 | </refmeta> | |
24 | ||
25 | <refnamediv> | |
26 | <refname>network-quick-start</refname> | |
27 | <refpurpose>Network Configuration Control Program</refpurpose> | |
28 | </refnamediv> | |
29 | ||
30 | <refsect1> | |
31 | <title>Quick Start Guide</title> | |
32 | ||
33 | <para> | |
34 | The <command>network</command> is a very powerful command that allows | |
35 | you to configure the entire networking stack. Unfortunately that makes | |
36 | it quite complicated to use as well. | |
37 | This guide tries to be a good starting point to set up basic networking | |
38 | with the <command>network</command> command. | |
39 | </para> | |
40 | </refsect1> | |
41 | ||
42 | <refsect1> | |
43 | <title>Add an uplink zone</title> | |
44 | ||
45 | <para> | |
46 | The first step is to create a new uplink zone with name | |
47 | <replaceable>upl0</replaceable>. | |
48 | This zone will be of the <replaceable>bridge</replaceable> type which is | |
49 | the default for all local networks. | |
50 | </para> | |
51 | ||
52 | <programlisting># network zone new <replaceable>upl0</replaceable> <replaceable>bridge</replaceable></programlisting> | |
53 | ||
54 | <para> | |
55 | The zone will be created and brought up immediately. | |
56 | </para> | |
57 | </refsect1> | |
58 | ||
59 | <refsect1> | |
60 | <title>Attaching ports</title> | |
61 | ||
62 | <para> | |
63 | To connect the zone to the physical world outside of our box we will need | |
64 | to attach ports to the zone. | |
65 | That is done with a single command. | |
66 | To execute this command, we will need to know which ports are available. | |
67 | One of the easiest way to find out about that is to use the auto-completion | |
68 | feature of the shell like this: | |
69 | </para> | |
70 | ||
71 | <programlisting># network zone <replaceable>upl0</replaceable> port attach [TAB] [TAB]</programlisting> | |
72 | ||
73 | <para> | |
74 | That will list all not yet attached ports. | |
75 | The following command will actually attach the port | |
76 | (which is <replaceable>p0</replaceable> in this example). | |
77 | </para> | |
78 | ||
79 | <programlisting># network zone <replaceable>upl0</replaceable> port attach <replaceable>p0</replaceable></programlisting> | |
80 | ||
81 | <para> | |
82 | You can as well get a list of all detected devices, | |
83 | zones and ports by running: | |
84 | </para> | |
85 | ||
86 | <programlisting># network device list</programlisting> | |
87 | ||
88 | <para> | |
89 | To a zone of the <replaceable>bridge</replaceable> type you may attach more | |
90 | than just one port if you wish so. | |
91 | </para> | |
92 | </refsect1> | |
93 | ||
94 | <refsect1> | |
95 | <title>IP connectivity</title> | |
96 | ||
97 | <para> | |
98 | After a zone has been created and ports have been attached, you are now | |
99 | able to add IP connectivity. | |
100 | The easiest way to do that is using DHCP which can be enabled by this | |
101 | simple command: | |
102 | </para> | |
103 | ||
104 | <programlisting># network zone <replaceable>upl0</replaceable> config new <replaceable>ipv6-dhcp</replaceable></programlisting> | |
105 | ||
106 | <para> | |
107 | And for IPv4: | |
108 | </para> | |
109 | ||
110 | <programlisting># network zone <replaceable>upl0</replaceable> config new <replaceable>ipv4-dhcp</replaceable></programlisting> | |
111 | </refsect1> | |
112 | ||
113 | <refsect1> | |
114 | <title>Debugging</title> | |
115 | ||
116 | <para> | |
117 | You may see the current status of the network by running this command: | |
118 | </para> | |
119 | ||
120 | <programlisting># network status</programlisting> | |
121 | ||
122 | <para> | |
123 | The entire network can be restarted by running: | |
124 | </para> | |
125 | ||
126 | <programlisting># network restart</programlisting> | |
127 | </refsect1> | |
128 | ||
129 | <refsect1> | |
130 | <title>See Also</title> | |
131 | ||
132 | <para> | |
133 | <citerefentry> | |
134 | <refentrytitle>network</refentrytitle> | |
135 | <manvolnum>8</manvolnum> | |
136 | </citerefentry>, | |
137 | <citerefentry> | |
138 | <refentrytitle>network-config</refentrytitle> | |
139 | <manvolnum>8</manvolnum> | |
140 | </citerefentry>, | |
141 | <citerefentry> | |
142 | <refentrytitle>network-device</refentrytitle> | |
143 | <manvolnum>8</manvolnum> | |
144 | </citerefentry>, | |
145 | <citerefentry> | |
146 | <refentrytitle>network-port</refentrytitle> | |
147 | <manvolnum>8</manvolnum> | |
148 | </citerefentry>, | |
149 | <citerefentry> | |
150 | <refentrytitle>network-zone</refentrytitle> | |
151 | <manvolnum>8</manvolnum> | |
152 | </citerefentry> | |
153 | </para> | |
154 | </refsect1> | |
155 | </refentry> |