Merge lp:~powersj/serverguide/network-revamp-18.04 into lp:serverguide/trunk
- network-revamp-18.04
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Doug Smythies |
Approved revision: | 363 |
Merged at revision: | 358 |
Proposed branch: | lp:~powersj/serverguide/network-revamp-18.04 |
Merge into: | lp:serverguide/trunk |
Diff against target: |
1128 lines (+326/-369) 1 file modified
serverguide/C/network-config.xml (+326/-369) |
To merge this branch: | bzr merge lp:~powersj/serverguide/network-revamp-18.04 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Doug Smythies | Approve | ||
Mathieu Trudel-Lapierre | Approve | ||
David Britton (community) | Approve | ||
Review via email: mp+345788@code.launchpad.net |
Commit message
Update networking for 18.04 LTS (Bionic)
With the release of Bionic /etc/network/
This updates the guide to show how to use netplan to configure networking.
It also updates many references to older commands to updated ones:
* ifconfig -> ip
* resolvconf -> systemd-resolved
* dhclient -> systemd-networkd.
Drive-by: editor found numerous extra white spaces throughout document
Fixes LP: #1769007
Description of the change
David Britton (dpb) wrote : | # |
- 359. By Joshua Powers
-
Fix spacing and escape < and >
Joshua Powers (powersj) wrote : | # |
Here is how to make the PDF in container:
$ sudo apt update && sudo apt install -y bzr xsltproc docbook-xsl fop build-essential;
$ bzr branch lp:~powersj/serverguide/network-revamp-18.04 && cd network-
$ LN=C make serverguide-pdf
I've attached the built PDF.
Joshua Powers (powersj) wrote : | # |
David Britton (dpb) wrote : | # |
Some cleanups. After each of these, one last scrub of the doc for:
'resolvconf' (replaced by systemd-resolved) and 'dhclient' (replaced by systemd-networkd, or netplan.io for configuration) should be done.
David Britton (dpb) : | # |
Doug Smythies (dsmythies) wrote : | # |
Thanks very much for taking on the bug report and re-doing this section.
> Drive-bys: editor found numerous extra white spaces
There isn't a tab verses spaces rule in the serverguide. Making massive white space changes makes it difficult to focus on the changes. However, this command (from "bzr help diff") reduces the difference listing by about 1/2:
bzr diff --using /usr/bin/diff --diff-options -wu
Joshua Powers (powersj) wrote : | # |
@david one question below
- 360. By Joshua Powers
-
Changes from David and Doug.
Also went through and removed refrences to resolveconf and dhclient as
they have been replaced by systemd-resolved and systemd-networkd
Joshua Powers (powersj) wrote : | # |
Pushed updates from both reviews, thank you!
David Britton (dpb) wrote : | # |
On Fri, May 18, 2018 at 02:45:08PM -0000, Joshua Powers wrote:
> ip a will show all devices, whether or not they have an IP address, therefore should this change still occur?
You are right, disregard my comments in this vein.
--
David Britton <email address hidden>
David Britton (dpb) wrote : | # |
Nice cleanup. I think some things could be made better, but this is very much better than what is there, so +1
Mathieu Trudel-Lapierre (cyphermox) wrote : | # |
+1
Maybe add a mention of 'ip link set dev X up' / 'ip link set dev X down' for how to activate/deactivate an interface when it's already configured in netplan?
- 361. By Joshua Powers
-
Add ip link set info
Joshua Powers (powersj) wrote : | # |
I added a brief section for ip link set dev
Ryan Harper (raharper) wrote : | # |
Couple of fixes inline below.
- 362. By Joshua Powers
-
Fixes from rharper
Doug Smythies (dsmythies) wrote : | # |
For this line:
+ The <ulink url="http://
The hard coding of "xenial" is a problem, because non-one will remember to change it in the future.
Using "manpages.
- 363. By Joshua Powers
-
Update link to version independent link
Joshua Powers (powersj) wrote : | # |
Updated the link to use a version independent link.
I have also started looking into how to update the man page website to point to bionic as the default release as well. That will be done independent of this merge.
Doug Smythies (dsmythies) wrote : | # |
O.K. thanks. Let's go ahead and merge and publish this.If something got missed we'll fix it with subsequent updates.
Preview Diff
1 | === modified file 'serverguide/C/network-config.xml' |
2 | --- serverguide/C/network-config.xml 2018-04-24 14:55:32 +0000 |
3 | +++ serverguide/C/network-config.xml 2018-05-21 14:38:40 +0000 |
4 | @@ -1,5 +1,5 @@ |
5 | <?xml version="1.0" encoding="UTF-8"?> |
6 | -<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" |
7 | +<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" |
8 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ |
9 | <!ENTITY % globalent SYSTEM "../../libs/global.ent"> |
10 | %globalent; |
11 | @@ -10,49 +10,60 @@ |
12 | <chapter id="networking" status="review"> |
13 | <title>Networking</title> |
14 | <para> |
15 | - Networks consist of two or more devices, such as computer systems, printers, |
16 | - and related equipment which are connected by either physical cabling or |
17 | - wireless links for the purpose of sharing and distributing information among |
18 | - the connected devices. |
19 | + Networks consist of two or more devices, such as computer systems, printers, |
20 | + and related equipment which are connected by either physical cabling or |
21 | + wireless links for the purpose of sharing and distributing information among |
22 | + the connected devices. |
23 | </para> |
24 | <para> |
25 | This section provides general and specific information pertaining |
26 | - to networking, including an overview of network concepts and detailed |
27 | + to networking, including an overview of network concepts and detailed |
28 | discussion of popular network protocols. |
29 | </para> |
30 | |
31 | <sect1 id="network-configuration" status="review"> |
32 | <title>Network Configuration</title> |
33 | <para> |
34 | - Ubuntu ships with a number of graphical utilities to configure your |
35 | - network devices. This document is geared toward server administrators |
36 | + Ubuntu ships with a number of graphical utilities to configure your |
37 | + network devices. This document is geared toward server administrators |
38 | and will focus on managing your network on the command line. |
39 | </para> |
40 | |
41 | <sect2 id="ethernet-interfaces" status="review"> |
42 | <title>Ethernet Interfaces</title> |
43 | <para> |
44 | - Ethernet interfaces are identified by the system using the naming convention of |
45 | - <emphasis role="italix">ethX</emphasis>, where <emphasis role="italic">X</emphasis> |
46 | - represents a numeric value. The first Ethernet interface is typically identified |
47 | - as <emphasis role="italic">eth0</emphasis>, the second as |
48 | - <emphasis role="italic">eth1</emphasis>, and all others should move up in |
49 | - numerical order. |
50 | + Ethernet interfaces are identified by the system using predictable network |
51 | + interface names. These names can appear as <emphasis role="italix">eno1</emphasis> |
52 | + or <emphasis role="italix">enp0s25</emphasis>. However, in some cases an |
53 | + interface may still use the kernel <emphasis role="italix">eth#</emphasis> |
54 | + style of naming. |
55 | </para> |
56 | |
57 | <sect3 id="identify-ethernet-interfaces" status="review"> |
58 | <title>Identify Ethernet Interfaces</title> |
59 | <para> |
60 | - To quickly identify all available Ethernet interfaces, you can use the |
61 | - <application>ifconfig</application> command as shown below. |
62 | + To quickly identify all available Ethernet interfaces, you can use the |
63 | + <application>ip</application> command as shown below. |
64 | </para> |
65 | <screen> |
66 | -<command>ifconfig -a | grep eth</command> |
67 | -<computeroutput>eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a</computeroutput> |
68 | +<command>ip a</command><computeroutput> |
69 | +1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 |
70 | + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 |
71 | + inet 127.0.0.1/8 scope host lo |
72 | + valid_lft forever preferred_lft forever |
73 | + inet6 ::1/128 scope host |
74 | + valid_lft forever preferred_lft forever |
75 | +2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 |
76 | + link/ether 00:16:3e:e2:52:42 brd ff:ff:ff:ff:ff:ff link-netnsid 0 |
77 | + inet 10.102.66.200/24 brd 10.102.66.255 scope global dynamic eth0 |
78 | + valid_lft 3257sec preferred_lft 3257sec |
79 | + inet6 fe80::216:3eff:fee2:5242/64 scope link |
80 | + valid_lft forever preferred_lft forever</computeroutput> |
81 | </screen> |
82 | <para> |
83 | - Another application that can help identify all network interfaces available to your system |
84 | - is the <application>lshw</application> command. In the example below, <application>lshw</application> |
85 | + Another application that can help identify all network interfaces available to your system |
86 | + is the <application>lshw</application> command. This command provides greater details around the |
87 | + hardware capabilities of specific adapters. In the example below, <application>lshw</application> |
88 | shows a single Ethernet interface with the logical name of <emphasis role="italic">eth0</emphasis> |
89 | along with bus information, driver details and all supported capabilities. |
90 | </para> |
91 | @@ -60,96 +71,78 @@ |
92 | <command>sudo lshw -class network</command> |
93 | <computeroutput> *-network |
94 | description: Ethernet interface |
95 | - product: BCM4401-B0 100Base-TX |
96 | - vendor: Broadcom Corporation |
97 | + product: MT26448 [ConnectX EN 10GigE, PCIe 2.0 5GT/s] |
98 | + vendor: Mellanox Technologies |
99 | physical id: 0 |
100 | - bus info: pci@0000:03:00.0 |
101 | - logical name: eth0 |
102 | - version: 02 |
103 | - serial: 00:15:c5:4a:16:5a |
104 | - size: 10MB/s |
105 | - capacity: 100MB/s |
106 | - width: 32 bits |
107 | + bus info: pci@0004:01:00.0 |
108 | + logical name: eth4 |
109 | + version: b0 |
110 | + serial: e4:1d:2d:67:83:56 |
111 | + slot: U78CB.001.WZS09KB-P1-C6-T1 |
112 | + size: 10Gbit/s |
113 | + capacity: 10Gbit/s |
114 | + width: 64 bits |
115 | clock: 33MHz |
116 | - capabilities: (snipped for brevity) |
117 | - configuration: (snipped for brevity) |
118 | - resources: irq:17 memory:ef9fe000-ef9fffff</computeroutput> |
119 | + capabilities: pm vpd msix pciexpress bus_master cap_list ethernet physical fibre 10000bt-fd |
120 | + configuration: autonegotiation=off broadcast=yes driver=mlx4_en driverversion=4.0-0 duplex=full firmware=2.9.1326 ip=192.168.1.1 latency=0 link=yes multicast=yes port=fibre speed=10Gbit/s |
121 | + resources: iomemory:24000-23fff irq:481 memory:3fe200000000-3fe2000fffff memory:240000000000-240007ffffff</computeroutput> |
122 | </screen> |
123 | </sect3> |
124 | |
125 | <sect3 id="ethernet-interface-names" status="review"> |
126 | <title>Ethernet Interface Logical Names</title> |
127 | <para> |
128 | - Interface logical names are configured in the file |
129 | - <filename>/etc/udev/rules.d/70-persistent-net.rules.</filename> If you would |
130 | - like control which interface receives a particular logical name, find the line |
131 | - matching the interfaces physical MAC address and modify the value of |
132 | - <emphasis role="italic">NAME=ethX</emphasis> to the desired logical name. |
133 | - Reboot the system to commit your changes. |
134 | + Interface logical names can also be configured via a netplan configuration. If you would |
135 | + like control which interface receives a particular logical name use the |
136 | + <emphasis role="italic">match</emphasis> and <emphasis role="italic">set-name</emphasis> keys. |
137 | + The match key is used to find an adapter based on some criteria like MAC address, driver, etc. |
138 | + Then the set-name key can be used to change the device to the desired logial name. |
139 | </para> |
140 | - </sect3> |
141 | |
142 | +<screen> |
143 | +<computeroutput>network: |
144 | + version: 2 |
145 | + renderer: networkd |
146 | + ethernets: |
147 | + eth_lan0: |
148 | + dhcp4: true |
149 | + match: |
150 | + macaddress: 00:11:22:33:44:55 |
151 | + set-name: eth_lan0</computeroutput> |
152 | +</screen> |
153 | +</sect3> |
154 | <sect3 id="ethernet-interface-settings" status="review"> |
155 | <title>Ethernet Interface Settings</title> |
156 | <para> |
157 | - <application>ethtool</application> is a program that displays and changes Ethernet |
158 | - card settings such as auto-negotiation, port speed, duplex mode, and Wake-on-LAN. It |
159 | - is not installed by default, but is available for installation in the repositories. |
160 | - </para> |
161 | -<screen> |
162 | -<command>sudo apt install ethtool</command> |
163 | -</screen> |
164 | - <para> |
165 | - The following is an example of how to view supported features and configured |
166 | + <application>ethtool</application> is a program that displays and changes Ethernet |
167 | + card settings such as auto-negotiation, port speed, duplex mode, and Wake-on-LAN. |
168 | + The following is an example of how to view supported features and configured |
169 | settings of an Ethernet interface. |
170 | </para> |
171 | <screen> |
172 | -<command>sudo ethtool eth0</command> |
173 | -<computeroutput>Settings for eth0: |
174 | - Supported ports: [ TP ] |
175 | - Supported link modes: 10baseT/Half 10baseT/Full |
176 | - 100baseT/Half 100baseT/Full |
177 | - 1000baseT/Half 1000baseT/Full |
178 | - Supports auto-negotiation: Yes |
179 | - Advertised link modes: 10baseT/Half 10baseT/Full |
180 | - 100baseT/Half 100baseT/Full |
181 | - 1000baseT/Half 1000baseT/Full |
182 | - Advertised auto-negotiation: Yes |
183 | - Speed: 1000Mb/s |
184 | - Duplex: Full |
185 | - Port: Twisted Pair |
186 | - PHYAD: 1 |
187 | - Transceiver: internal |
188 | - Auto-negotiation: on |
189 | - Supports Wake-on: g |
190 | - Wake-on: d |
191 | - Current message level: 0x000000ff (255) |
192 | - Link detected: yes</computeroutput> |
193 | +<command>sudo ethtool eth4</command> |
194 | +<computeroutput>Settings for eth4: |
195 | + Supported ports: [ FIBRE ] |
196 | + Supported link modes: 10000baseT/Full |
197 | + Supported pause frame use: No |
198 | + Supports auto-negotiation: No |
199 | + Supported FEC modes: Not reported |
200 | + Advertised link modes: 10000baseT/Full |
201 | + Advertised pause frame use: No |
202 | + Advertised auto-negotiation: No |
203 | + Advertised FEC modes: Not reported |
204 | + Speed: 10000Mb/s |
205 | + Duplex: Full |
206 | + Port: FIBRE |
207 | + PHYAD: 0 |
208 | + Transceiver: internal |
209 | + Auto-negotiation: off |
210 | + Supports Wake-on: d |
211 | + Wake-on: d |
212 | + Current message level: 0x00000014 (20) |
213 | + link ifdown |
214 | + Link detected: yes</computeroutput> |
215 | </screen> |
216 | - <para> |
217 | - Changes made with the <application>ethtool</application> command are temporary |
218 | - and will be lost after a reboot. If you would like to retain settings, simply add |
219 | - the desired <application>ethtool</application> command to a <emphasis role="italic">pre-up</emphasis> |
220 | - statement in the interface configuration file <filename>/etc/network/interfaces</filename>. |
221 | - </para> |
222 | - <para> |
223 | - The following is an example of how the interface identified as <emphasis role="italic">eth0</emphasis> |
224 | - could be permanently configured with a port speed of 1000Mb/s running in full duplex mode. |
225 | - </para> |
226 | -<programlisting> |
227 | -auto eth0 |
228 | -iface eth0 inet static |
229 | -pre-up /sbin/ethtool -s eth0 speed 1000 duplex full |
230 | -</programlisting> |
231 | - <note> |
232 | - <para> |
233 | - Although the example above shows the interface configured to use the |
234 | - <emphasis role="italic">static</emphasis> method, it actually works with other |
235 | - methods as well, such as DHCP. The example is meant to demonstrate only proper |
236 | - placement of the <emphasis role="italic">pre-up</emphasis> statement in relation |
237 | - to the rest of the interface configuration. |
238 | - </para> |
239 | - </note> |
240 | </sect3> |
241 | </sect2> |
242 | |
243 | @@ -164,63 +157,65 @@ |
244 | <sect3 id="temp-ip-assignment" status="review"> |
245 | <title>Temporary IP Address Assignment</title> |
246 | <para> |
247 | - For temporary network configurations, you can use standard commands |
248 | - such as <application>ip</application>, <application>ifconfig</application> |
249 | - and <application>route</application>, which are also found on most other |
250 | - GNU/Linux operating systems. These commands allow you to configure settings |
251 | - which take effect immediately, however they are not persistent and will |
252 | - be lost after a reboot. |
253 | + For temporary network configurations, you can use the |
254 | + <application>ip</application> command which is also found on most other |
255 | + GNU/Linux operating systems. The <application>ip</application> command |
256 | + allows you to configure settings which take effect immediately, however |
257 | + they are not persistent and will be lost after a reboot. |
258 | </para> |
259 | <para> |
260 | - To temporarily configure an IP address, you can use the <application>ifconfig</application> |
261 | - command in the following manner. Just modify the IP address and subnet mask to match your |
262 | + To temporarily configure an IP address, you can use the <application>ip</application> |
263 | + command in the following manner. Modify the IP address and subnet mask to match your |
264 | network requirements. |
265 | </para> |
266 | <screen> |
267 | -<command>sudo ifconfig eth0 10.0.0.100 netmask 255.255.255.0</command> |
268 | -</screen> |
269 | - <para> |
270 | - To verify the IP address configuration of <application>eth0</application>, |
271 | - you can use the <application>ifconfig</application> command in the following manner. |
272 | - </para> |
273 | -<screen> |
274 | -<command>ifconfig eth0</command> |
275 | -<computeroutput>eth0 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a |
276 | - inet addr:10.0.0.100 Bcast:10.0.0.255 Mask:255.255.255.0 |
277 | - inet6 addr: fe80::215:c5ff:fe4a:165a/64 Scope:Link |
278 | - UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
279 | - RX packets:466475604 errors:0 dropped:0 overruns:0 frame:0 |
280 | - TX packets:403172654 errors:0 dropped:0 overruns:0 carrier:0 |
281 | - collisions:0 txqueuelen:1000 |
282 | - RX bytes:2574778386 (2.5 GB) TX bytes:1618367329 (1.6 GB) |
283 | - Interrupt:16</computeroutput> |
284 | -</screen> |
285 | - <para> |
286 | - To configure a default gateway, you can use the <application>route</application> |
287 | - command in the following manner. Modify the default gateway address to match |
288 | +<command>sudo ip addr add 10.102.66.200/24 dev enp0s25</command> |
289 | +</screen> |
290 | + <para> |
291 | + The <application>ip</application> can then be used to set the link up or down. |
292 | + </para> |
293 | +<screen> |
294 | +<command>ip link set dev enp0s25 up</command> |
295 | +<command>ip link set dev enp0s25 down</command> |
296 | +</screen> |
297 | + <para> |
298 | + To verify the IP address configuration of <application>enp0s25</application>, |
299 | + you can use the <application>ip</application> command in the following manner. |
300 | + </para> |
301 | +<screen> |
302 | +<command>ip address show dev enp0s25</command> |
303 | +<computeroutput>10: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 |
304 | + link/ether 00:16:3e:e2:52:42 brd ff:ff:ff:ff:ff:ff link-netnsid 0 |
305 | + inet 10.102.66.200/24 brd 10.102.66.255 scope global dynamic eth0 |
306 | + valid_lft 2857sec preferred_lft 2857sec |
307 | + inet6 fe80::216:3eff:fee2:5242/64 scope link |
308 | + valid_lft forever preferred_lft forever6</computeroutput> |
309 | +</screen> |
310 | + <para> |
311 | + To configure a default gateway, you can use the <application>ip</application> |
312 | + command in the following manner. Modify the default gateway address to match |
313 | your network requirements. |
314 | </para> |
315 | <screen> |
316 | -<command>sudo route add default gw 10.0.0.1 eth0</command> |
317 | +<command>sudo ip route add default via 10.102.66.1</command> |
318 | </screen> |
319 | <para> |
320 | - To verify your default gateway configuration, you can use the <application>route</application> |
321 | + To verify your default gateway configuration, you can use the <application>ip</application> |
322 | command in the following manner. |
323 | </para> |
324 | <screen> |
325 | -<command>route -n</command> |
326 | -<computeroutput>Kernel IP routing table |
327 | -Destination Gateway Genmask Flags Metric Ref Use Iface |
328 | -10.0.0.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 |
329 | -0.0.0.0 10.0.0.1 0.0.0.0 UG 0 0 0 eth0</computeroutput> |
330 | +<command>ip route show</command> |
331 | +<computeroutput>default via 10.102.66.1 dev eth0 proto dhcp src 10.102.66.200 metric 100 |
332 | +10.102.66.0/24 dev eth0 proto kernel scope link src 10.102.66.200 |
333 | +10.102.66.1 dev eth0 proto dhcp scope link src 10.102.66.200 metric 100 </computeroutput> |
334 | </screen> |
335 | <para> |
336 | If you require DNS for your temporary network configuration, you can add DNS server |
337 | IP addresses in the file <filename>/etc/resolv.conf</filename>. In general, editing |
338 | <filename>/etc/resolv.conf</filename> directly is not recommanded, but this is a |
339 | - temporary and non-persistent configuration. The example below |
340 | - shows how to enter two DNS servers to <filename>/etc/resolv.conf</filename>, which |
341 | - should be changed to servers appropriate for your network. A more lengthy description |
342 | + temporary and non-persistent configuration. The example below |
343 | + shows how to enter two DNS servers to <filename>/etc/resolv.conf</filename>, which |
344 | + should be changed to servers appropriate for your network. A more lengthy description |
345 | of the proper persistent way to do DNS client configuration is in a following section. |
346 | </para> |
347 | <programlisting> |
348 | @@ -230,17 +225,17 @@ |
349 | <para> |
350 | If you no longer need this configuration and wish to purge all IP configuration from |
351 | an interface, you can use the <application>ip</application> command with the flush option |
352 | - as shown below. |
353 | + as shown below. |
354 | </para> |
355 | <screen> |
356 | <command>ip addr flush eth0</command> |
357 | </screen> |
358 | <note> |
359 | <para> |
360 | - Flushing the IP configuration using the <application>ip</application> command does not clear the |
361 | + Flushing the IP configuration using the <application>ip</application> command does not clear the |
362 | contents of <filename>/etc/resolv.conf</filename>. You must remove or modify those entries manually, |
363 | - or re-boot which should also cause <filename>/etc/resolv.conf</filename>, which is actually now a |
364 | - symlink to <filename>/run/resolvconf/resolv.conf</filename>, to be re-written. |
365 | + or re-boot which should also cause <filename>/etc/resolv.conf</filename>, which is a |
366 | + symlink to <filename>/run/systemd/resolve/stub-resolv.conf</filename>, to be re-written. |
367 | </para> |
368 | </note> |
369 | </sect3> |
370 | @@ -248,65 +243,57 @@ |
371 | <sect3 id="dynamic-ip-addressing" status="review"> |
372 | <title>Dynamic IP Address Assignment (DHCP Client)</title> |
373 | <para> |
374 | - To configure your server to use DHCP for dynamic address assignment, add the |
375 | - <emphasis role="italic">dhcp</emphasis> method to the inet address family statement |
376 | - for the appropriate interface in the file <filename>/etc/network/interfaces</filename>. |
377 | - The example below assumes you are configuring your first Ethernet interface identified as |
378 | - <emphasis role="italic">eth0</emphasis>. |
379 | + To configure your server to use DHCP for dynamic address assignment, create a netplan |
380 | + configuration in the file <filename>/etc/netplan/99_config.yaml</filename>. |
381 | + The example below assumes you are configuring your first Ethernet interface identified as |
382 | + <emphasis role="italic">enp3s0</emphasis>. |
383 | </para> |
384 | <programlisting> |
385 | -auto eth0 |
386 | -iface eth0 inet dhcp |
387 | +network: |
388 | + version: 2 |
389 | + renderer: networkd |
390 | + ethernets: |
391 | + enp3s0: |
392 | + dhcp4: true |
393 | </programlisting> |
394 | <para> |
395 | - By adding an interface configuration as shown above, you can manually enable the |
396 | - interface through the <application>ifup</application> command which initiates the |
397 | - DHCP process via <application>dhclient</application>. |
398 | - </para> |
399 | -<screen> |
400 | -<command>sudo ifup eth0</command> |
401 | -</screen> |
402 | - <para> |
403 | - To manually disable the interface, you can use the <application>ifdown</application> |
404 | - command, which in turn will initiate the DHCP release process and shut down the |
405 | - interface. |
406 | - </para> |
407 | -<screen> |
408 | -<command>sudo ifdown eth0</command> |
409 | + The configuration can then be applied using the |
410 | + <application>netplan</application> command. |
411 | + </para> |
412 | +<screen> |
413 | +<command>sudo netplan apply</command> |
414 | </screen> |
415 | </sect3> |
416 | |
417 | <sect3 id="static-ip-addressing" status="review"> |
418 | <title>Static IP Address Assignment</title> |
419 | <para> |
420 | - To configure your system to use a static IP address assignment, add the |
421 | - <emphasis role="italic">static</emphasis> method to the inet address family statement |
422 | - for the appropriate interface in the file <filename>/etc/network/interfaces</filename>. |
423 | - The example below assumes you are configuring your first Ethernet interface identified as |
424 | - <emphasis role="italic">eth0</emphasis>. Change the <emphasis role="italic">address</emphasis>, |
425 | - <emphasis role="italic">netmask</emphasis>, and <emphasis role="italic">gateway</emphasis> |
426 | + To configure your system to use static address assignment, create a netplan |
427 | + configuration in the file <filename>/etc/netplan/99_config.yaml</filename>. |
428 | + The example below assumes you are configuring your first Ethernet interface identified as |
429 | + <emphasis role="italic">eth0</emphasis>. Change the <emphasis role="italic">addresses</emphasis>, |
430 | + <emphasis role="italic">gateway4</emphasis>, and <emphasis role="italic">nameservers</emphasis> |
431 | values to meet the requirements of your network. |
432 | </para> |
433 | <programlisting> |
434 | -auto eth0 |
435 | -iface eth0 inet static |
436 | -address 10.0.0.100 |
437 | -netmask 255.255.255.0 |
438 | -gateway 10.0.0.1 |
439 | +network: |
440 | + version: 2 |
441 | + renderer: networkd |
442 | + ethernets: |
443 | + eth0: |
444 | + addresses: |
445 | + - 10.10.10.2/24 |
446 | + gateway4: 10.10.10.1 |
447 | + nameservers: |
448 | + search: [mydomain, otherdomain] |
449 | + addresses: [10.10.10.1, 1.1.1.1] |
450 | </programlisting> |
451 | <para> |
452 | - By adding an interface configuration as shown above, you can manually enable the |
453 | - interface through the <application>ifup</application> command. |
454 | - </para> |
455 | -<screen> |
456 | -<command>sudo ifup eth0</command> |
457 | -</screen> |
458 | - <para> |
459 | - To manually disable the interface, you can use the <application>ifdown</application> |
460 | - command. |
461 | - </para> |
462 | -<screen> |
463 | -<command>sudo ifdown eth0</command> |
464 | + The configuration can then be applied using the |
465 | + <application>netplan</application> command. |
466 | + </para> |
467 | +<screen> |
468 | +<command>sudo netplan apply</command> |
469 | </screen> |
470 | </sect3> |
471 | |
472 | @@ -314,29 +301,17 @@ |
473 | <title>Loopback Interface</title> |
474 | <para> |
475 | The loopback interface is identified by the system as <emphasis role="italic">lo</emphasis> |
476 | - and has a default IP address of 127.0.0.1. It can be viewed using the ifconfig command. |
477 | + and has a default IP address of 127.0.0.1. It can be viewed using the ip command. |
478 | </para> |
479 | <screen> |
480 | -<command>ifconfig lo</command> |
481 | -<computeroutput>lo Link encap:Local Loopback |
482 | - inet addr:127.0.0.1 Mask:255.0.0.0 |
483 | - inet6 addr: ::1/128 Scope:Host |
484 | - UP LOOPBACK RUNNING MTU:16436 Metric:1 |
485 | - RX packets:2718 errors:0 dropped:0 overruns:0 frame:0 |
486 | - TX packets:2718 errors:0 dropped:0 overruns:0 carrier:0 |
487 | - collisions:0 txqueuelen:0 |
488 | - RX bytes:183308 (183.3 KB) TX bytes:183308 (183.3 KB)</computeroutput> |
489 | +<command>ip address show lo</command> |
490 | +<computeroutput>1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 |
491 | + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 |
492 | + inet 127.0.0.1/8 scope host lo |
493 | + valid_lft forever preferred_lft forever |
494 | + inet6 ::1/128 scope host |
495 | + valid_lft forever preferred_lft forever</computeroutput> |
496 | </screen> |
497 | - <para> |
498 | - By default, there should be two lines in <filename>/etc/network/interfaces</filename> |
499 | - responsible for automatically configuring your loopback interface. It is recommended that you |
500 | - keep the default settings unless you have a specific purpose for changing them. An example of |
501 | - the two default lines are shown below. |
502 | - </para> |
503 | -<programlisting> |
504 | -auto lo |
505 | -iface lo inet loopback |
506 | -</programlisting> |
507 | </sect3> |
508 | </sect2> |
509 | |
510 | @@ -344,7 +319,7 @@ |
511 | <sect2 id="name-resolution" status="review"> |
512 | <title>Name Resolution</title> |
513 | <para> |
514 | - Name resolution as it relates to IP networking is the process of mapping IP addresses |
515 | + Name resolution as it relates to IP networking is the process of mapping IP addresses |
516 | to hostnames, making it easier to identify resources on a network. The following section |
517 | will explain how to properly configure your system for name resolution using DNS and static |
518 | hostname records. |
519 | @@ -354,40 +329,38 @@ |
520 | <title>DNS Client Configuration</title> |
521 | <para> |
522 | Traditionally, the file <filename>/etc/resolv.conf</filename> was a static configuration file that rarely |
523 | - needed to be changed or automatically changed via DCHP client hooks. Nowadays, a computer can switch from |
524 | - one network to another quite often and the <emphasis>resolvconf</emphasis> framework is now being used to track |
525 | - these changes and update the resolver's configuration automatically. It acts as an intermediary between programs |
526 | - that supply nameserver information and applications that need nameserver information. Resolvconf gets populated with information |
527 | - by a set of hook scripts related to network interface configuration. The most notable difference for the |
528 | - user is that any change manually done to <filename>/etc/resolv.conf</filename> will be lost as it gets overwritten each time |
529 | - something triggers resolvconf. Instead, resolvconf uses DHCP client hooks, and <filename>/etc/network/interfaces</filename> to |
530 | - generate a list of nameservers and domains to put in <filename>/etc/resolv.conf</filename>, which is now a symlink: |
531 | + needed to be changed or automatically changed via DCHP client hooks. Systemd-resolved handles name server configuration, |
532 | + and it should be interacted with through the <command>systemd-resolve</command> command. Netplan configures |
533 | + systemd-resolved to generate a list of nameservers and domains to put in <filename>/etc/resolv.conf</filename>, which is a symlink: |
534 | |
535 | <programlisting> |
536 | -/etc/resolv.conf -> ../run/resolvconf/resolv.conf |
537 | +/etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf |
538 | </programlisting> |
539 | |
540 | To configure the resolver, add the IP addresses of the nameservers that |
541 | - are appropriate for your network in the file <filename>/etc/network/interfaces</filename>. You can also |
542 | - add an optional DNS suffix search-lists to match your network domain names. For each other valid |
543 | - resolv.conf configuration option, you can include, in the stanza, one line beginning with that |
544 | - option name with a <emphasis role="bold">dns-</emphasis> prefix. The resulting file might look like the following: |
545 | + are appropriate for your network to the netplan configuration file. You can also |
546 | + add an optional DNS suffix search-lists to match your network domain names. The resulting file might look like the following: |
547 | </para> |
548 | |
549 | <programlisting> |
550 | -iface eth0 inet static |
551 | - address 192.168.3.3 |
552 | - netmask 255.255.255.0 |
553 | - gateway 192.168.3.1 |
554 | - dns-search example.com |
555 | - dns-nameservers 192.168.3.45 192.168.8.10 |
556 | +network: |
557 | + version: 2 |
558 | + renderer: networkd |
559 | + ethernets: |
560 | + enp0s25: |
561 | + addresses: |
562 | + - 192.168.0.100/24 |
563 | + gateway4: 192.168.0.1 |
564 | + nameservers: |
565 | + search: [mydomain, otherdomain] |
566 | + addresses: [1.1.1.1, 8.8.8.8, 4.4.4.4] |
567 | </programlisting> |
568 | |
569 | <para> |
570 | - The <emphasis role="italic">search</emphasis> option can also be used with multiple domain names |
571 | - so that DNS queries will be appended in the order in which they are entered. For example, your |
572 | + The <emphasis role="italic">search</emphasis> option can also be used with multiple domain names |
573 | + so that DNS queries will be appended in the order in which they are entered. For example, your |
574 | network may have multiple sub-domains to search; a parent domain of <emphasis role="italic">example.com</emphasis>, |
575 | - and two sub-domains, <emphasis role="italic">sales.example.com</emphasis> and <emphasis role="italic">dev.example.com</emphasis>. |
576 | + and two sub-domains, <emphasis role="italic">sales.example.com</emphasis> and <emphasis role="italic">dev.example.com</emphasis>. |
577 | </para> |
578 | |
579 | <para> |
580 | @@ -395,16 +368,21 @@ |
581 | </para> |
582 | |
583 | <programlisting> |
584 | -iface eth0 inet static |
585 | - address 192.168.3.3 |
586 | - netmask 255.255.255.0 |
587 | - gateway 192.168.3.1 |
588 | - dns-search example.com sales.example.com dev.example.com |
589 | - dns-nameservers 192.168.3.45 192.168.8.10 |
590 | +network: |
591 | + version: 2 |
592 | + renderer: networkd |
593 | + ethernets: |
594 | + enp0s25: |
595 | + addresses: |
596 | + - 192.168.0.100/24 |
597 | + gateway4: 192.168.0.1 |
598 | + nameservers: |
599 | + search: [example.com, sales.example.com, dev.example.com] |
600 | + addresses: [1.1.1.1, 8.8.8.8, 4.4.4.4] |
601 | </programlisting> |
602 | |
603 | <para> |
604 | - If you try to ping a host with the name of <emphasis role="italic">server1</emphasis>, your system |
605 | + If you try to ping a host with the name of <emphasis role="italic">server1</emphasis>, your system |
606 | will automatically query DNS for its Fully Qualified Domain Name (FQDN) in the following order: |
607 | </para> |
608 | |
609 | @@ -426,7 +404,7 @@ |
610 | </listitem> |
611 | </orderedlist> |
612 | <para> |
613 | - If no matches are found, the DNS server will provide a result of |
614 | + If no matches are found, the DNS server will provide a result of |
615 | <emphasis role="italic">notfound</emphasis> and the DNS query will fail. |
616 | </para> |
617 | </sect3> |
618 | @@ -437,11 +415,11 @@ |
619 | Static hostnames are locally defined hostname-to-IP mappings located in the file <filename>/etc/hosts</filename>. |
620 | Entries in the <filename>hosts</filename> file will have precedence over DNS by default. This means that if your |
621 | system tries to resolve a hostname and it matches an entry in /etc/hosts, it will not attempt to look up the |
622 | - record in DNS. In some configurations, especially when Internet access is not required, servers that |
623 | + record in DNS. In some configurations, especially when Internet access is not required, servers that |
624 | communicate with a limited number of resources can be conveniently set to use static hostnames instead of DNS. |
625 | </para> |
626 | <para> |
627 | - The following is an example of a <filename>hosts</filename> file where a number of local servers |
628 | + The following is an example of a <filename>hosts</filename> file where a number of local servers |
629 | have been identified by simple hostnames, aliases and their equivalent Fully Qualified Domain Names (FQDN's). |
630 | </para> |
631 | <programlisting> |
632 | @@ -454,11 +432,11 @@ |
633 | </programlisting> |
634 | <note> |
635 | <para> |
636 | - In the above example, notice that each of the servers have been given aliases in addition to their |
637 | - proper names and FQDN's. <emphasis role="italic">Server1</emphasis> has been mapped to the name |
638 | - <emphasis role="italic">vpn</emphasis>, <emphasis role="italic">server2</emphasis> is referred |
639 | - to as <emphasis role="italic">mail</emphasis>, <emphasis role="italic">server3</emphasis> as |
640 | - <emphasis role="italic">www</emphasis>, and <emphasis role="italic">server4</emphasis> as |
641 | + In the above example, notice that each of the servers have been given aliases in addition to their |
642 | + proper names and FQDN's. <emphasis role="italic">Server1</emphasis> has been mapped to the name |
643 | + <emphasis role="italic">vpn</emphasis>, <emphasis role="italic">server2</emphasis> is referred |
644 | + to as <emphasis role="italic">mail</emphasis>, <emphasis role="italic">server3</emphasis> as |
645 | + <emphasis role="italic">www</emphasis>, and <emphasis role="italic">server4</emphasis> as |
646 | <emphasis role="italic">file</emphasis>. |
647 | </para> |
648 | </note> |
649 | @@ -469,9 +447,9 @@ |
650 | <para> |
651 | The order in which your system selects a method of resolving hostnames to IP addresses is |
652 | controlled by the Name Service Switch (NSS) configuration file <filename>/etc/nsswitch.conf</filename>. |
653 | - As mentioned in the previous section, typically static hostnames defined in the systems |
654 | - <filename>/etc/hosts</filename> file have precedence over names resolved from DNS. The following |
655 | - is an example of the line responsible for this order of hostname lookups in the file |
656 | + As mentioned in the previous section, typically static hostnames defined in the systems |
657 | + <filename>/etc/hosts</filename> file have precedence over names resolved from DNS. The following |
658 | + is an example of the line responsible for this order of hostname lookups in the file |
659 | <filename>/etc/nsswitch.conf</filename>. |
660 | </para> |
661 | <programlisting> |
662 | @@ -481,7 +459,7 @@ |
663 | <itemizedlist> |
664 | <listitem> |
665 | <para> |
666 | - <emphasis role="bold">files</emphasis> first tries to resolve static hostnames located in |
667 | + <emphasis role="bold">files</emphasis> first tries to resolve static hostnames located in |
668 | <filename>/etc/hosts</filename>. |
669 | </para> |
670 | </listitem> |
671 | @@ -492,9 +470,9 @@ |
672 | </listitem> |
673 | <listitem> |
674 | <para> |
675 | - <emphasis role="bold">[NOTFOUND=return]</emphasis> means that any response of |
676 | - <emphasis role="italic">notfound</emphasis> by the preceding |
677 | - <emphasis role="italic">mdns4_minimal</emphasis> process should be treated as |
678 | + <emphasis role="bold">[NOTFOUND=return]</emphasis> means that any response of |
679 | + <emphasis role="italic">notfound</emphasis> by the preceding |
680 | + <emphasis role="italic">mdns4_minimal</emphasis> process should be treated as |
681 | authoritative and that the system should not try to continue hunting for an answer. |
682 | </para> |
683 | </listitem> |
684 | @@ -512,9 +490,9 @@ |
685 | |
686 | <para> |
687 | To modify the order of the above mentioned name resolution methods, you can |
688 | - simply change the <emphasis role="italic">hosts:</emphasis> string to the value |
689 | - of your choosing. For example, if you prefer to use legacy Unicast DNS versus |
690 | - Multicast DNS, you can change the string in <filename>/etc/nsswitch.conf</filename> |
691 | + simply change the <emphasis role="italic">hosts:</emphasis> string to the value |
692 | + of your choosing. For example, if you prefer to use legacy Unicast DNS versus |
693 | + Multicast DNS, you can change the string in <filename>/etc/nsswitch.conf</filename> |
694 | as shown below. |
695 | </para> |
696 | <programlisting> |
697 | @@ -527,41 +505,26 @@ |
698 | <title>Bridging</title> |
699 | |
700 | <para> |
701 | - Bridging multiple interfaces is a more advanced configuration, but is very useful in multiple scenarios. |
702 | + Bridging multiple interfaces is a more advanced configuration, but is very useful in multiple scenarios. |
703 | One scenario is setting up a bridge with multiple network interfaces, then using a firewall to filter traffic |
704 | between two network segments. Another scenario is using bridge on a system with one interface to allow virtual |
705 | machines direct access to the outside network. The following example covers the latter scenario. |
706 | </para> |
707 | |
708 | <para> |
709 | - Before configuring a bridge you will need to install the <application>bridge-utils</application> package. To install the |
710 | - package, in a terminal enter: |
711 | - </para> |
712 | - |
713 | -<screen> |
714 | -<command>sudo apt install bridge-utils</command> |
715 | -</screen> |
716 | - |
717 | - <para> |
718 | - Next, configure the bridge by editing <filename>/etc/network/interfaces</filename>: |
719 | + Configure the bridge by editing your netplan configuration found |
720 | + in <filename>/etc/netplan/</filename>: |
721 | </para> |
722 | |
723 | <programlisting> |
724 | -auto lo |
725 | -iface lo inet loopback |
726 | - |
727 | -auto br0 |
728 | -iface br0 inet static |
729 | - address 192.168.0.10 |
730 | - network 192.168.0.0 |
731 | - netmask 255.255.255.0 |
732 | - broadcast 192.168.0.255 |
733 | - gateway 192.168.0.1 |
734 | - bridge_ports eth0 |
735 | - bridge_fd 9 |
736 | - bridge_hello 2 |
737 | - bridge_maxage 12 |
738 | - bridge_stp off |
739 | +network: |
740 | + version: 2 |
741 | + renderer: networkd |
742 | + bridges: |
743 | + br0: |
744 | + dhcp4: yes |
745 | + interfaces: |
746 | + - enp3s0 |
747 | </programlisting> |
748 | |
749 | <note> |
750 | @@ -571,63 +534,60 @@ |
751 | </note> |
752 | |
753 | <para> |
754 | - Now bring up the bridge: |
755 | + Now apply the configuration to enable the bridge: |
756 | </para> |
757 | |
758 | <screen> |
759 | -<command>sudo ifup br0</command> |
760 | +<command>sudo netplan apply</command> |
761 | </screen> |
762 | <para> |
763 | The new bridge interface should now be up and running. The <application>brctl</application> provides useful information |
764 | - about the state of the bridge, controls which interfaces are part of the bridge, etc. See <command>man brctl</command> |
765 | - for more information. |
766 | + about the state of the bridge, controls which interfaces are part of the bridge, etc. See <command>man brctl</command> |
767 | + for more information. |
768 | </para> |
769 | |
770 | </sect2> |
771 | <sect2 id="network-config-resources" status="review"> |
772 | <title>Resources</title> |
773 | - |
774 | + |
775 | <para> |
776 | - |
777 | + |
778 | </para> |
779 | |
780 | <itemizedlist> |
781 | <listitem> |
782 | <para> |
783 | - The <ulink url="https://help.ubuntu.com/community/Network">Ubuntu Wiki Network page</ulink> has |
784 | + The <ulink url="https://help.ubuntu.com/community/Network">Ubuntu Wiki Network page</ulink> has |
785 | links to articles covering more advanced network configuration. |
786 | </para> |
787 | </listitem> |
788 | <listitem> |
789 | <para> |
790 | - The <ulink url="http://manpages.ubuntu.com/manpages/man8/resolvconf.8.html">resolvconf man page</ulink> has |
791 | - more information on resolvconf. |
792 | - </para> |
793 | - </listitem> |
794 | - <listitem> |
795 | - <para> |
796 | - The <ulink url="http://manpages.ubuntu.com/manpages/man5/interfaces.5.html">interfaces man page</ulink> has |
797 | - details on more options for <filename>/etc/network/interfaces</filename>. |
798 | - </para> |
799 | - </listitem> |
800 | - <listitem> |
801 | - <para> |
802 | - The <ulink url="http://manpages.ubuntu.com/manpages/man8/dhclient.8.html">dhclient man page</ulink> has |
803 | - details on more options for configuring DHCP client settings. |
804 | - </para> |
805 | - </listitem> |
806 | - <listitem> |
807 | - <para> |
808 | - For more information on DNS client configuration see the |
809 | - <ulink url="http://manpages.ubuntu.com/manpages/man5/resolver.5.html">resolver man page</ulink>. Also, Chapter |
810 | - 6 of O'Reilly's <ulink url="http://oreilly.com/catalog/linag2/book/ch06.html">Linux Network Administrator's Guide</ulink> is |
811 | - a good source of resolver and name service configuration information. |
812 | - </para> |
813 | - </listitem> |
814 | - <listitem> |
815 | - <para> |
816 | - For more information on <emphasis>bridging</emphasis> see the |
817 | - <ulink url="http://manpages.ubuntu.com/manpages/man8/brctl.8.html">brctl man page</ulink> and the Linux Foundation's |
818 | + The <ulink url="https://netplan.io">netplan website</ulink> has additional examples and documentation. |
819 | + </para> |
820 | + </listitem> |
821 | + <listitem> |
822 | + <para> |
823 | + The <ulink url="http://manpages.ubuntu.com/manpages/man8/netplan.8.html">netplan man page</ulink> has |
824 | + more information on netplan. |
825 | + </para> |
826 | + </listitem> |
827 | + <listitem> |
828 | + <para> |
829 | + The <ulink url="http://manpages.ubuntu.com/manpages/man1/systemd-resolve.1.html">systemd-resolve man page</ulink> has |
830 | + details on systemd-resolve command. |
831 | + </para> |
832 | + </listitem> |
833 | + <listitem> |
834 | + <para> |
835 | + The <ulink url="http://manpages.ubuntu.com/manpages/man8/systemd-resolved.8.html">systemd-resolved man page</ulink> has |
836 | + more information on systemd-resolved service. |
837 | + </para> |
838 | + </listitem> |
839 | + <listitem> |
840 | + <para> |
841 | + For more information on <emphasis>bridging</emphasis> see the |
842 | + <ulink url="https://netplan.io/examples">netplan.io examples page</ulink> and the Linux Foundation's |
843 | <ulink url="http://www.linuxfoundation.org/collaborate/workgroups/networking/bridge">Networking-Bridge</ulink> page. |
844 | </para> |
845 | </listitem> |
846 | @@ -638,34 +598,34 @@ |
847 | <sect1 id="tcpip" status="review"> |
848 | <title>TCP/IP</title> |
849 | <para> |
850 | - The Transmission Control Protocol and Internet Protocol (TCP/IP) is a standard |
851 | - set of protocols developed in the late 1970s by the Defense Advanced Research |
852 | - Projects Agency (DARPA) as a means of communication between different types of |
853 | - computers and computer networks. TCP/IP is the driving force of the Internet, |
854 | - and thus it is the most popular set of network protocols on Earth. |
855 | + The Transmission Control Protocol and Internet Protocol (TCP/IP) is a standard |
856 | + set of protocols developed in the late 1970s by the Defense Advanced Research |
857 | + Projects Agency (DARPA) as a means of communication between different types of |
858 | + computers and computer networks. TCP/IP is the driving force of the Internet, |
859 | + and thus it is the most popular set of network protocols on Earth. |
860 | </para> |
861 | <sect2 id="tcpip-introduction" status="review"> |
862 | - <title>TCP/IP Introduction</title> |
863 | + <title>TCP/IP Introduction</title> |
864 | <para> |
865 | The two protocol components of TCP/IP deal with different aspects of computer networking. |
866 | - <emphasis>Internet Protocol</emphasis>, the "IP" of TCP/IP is a |
867 | - connectionless protocol which deals only with network packet routing using the <emphasis |
868 | - role="italics">IP Datagram</emphasis> as the basic unit of networking information. The |
869 | + <emphasis>Internet Protocol</emphasis>, the "IP" of TCP/IP is a |
870 | + connectionless protocol which deals only with network packet routing using the <emphasis |
871 | + role="italics">IP Datagram</emphasis> as the basic unit of networking information. The |
872 | IP Datagram consists of a header followed by a message. The <emphasis> |
873 | - Transmission Control Protocol</emphasis> is the "TCP" of TCP/IP and enables network hosts |
874 | - to establish connections which may be used to exchange data streams. TCP also guarantees |
875 | - that the data between connections is delivered and that it arrives at one network host in |
876 | + Transmission Control Protocol</emphasis> is the "TCP" of TCP/IP and enables network hosts |
877 | + to establish connections which may be used to exchange data streams. TCP also guarantees |
878 | + that the data between connections is delivered and that it arrives at one network host in |
879 | the same order as sent from another network host. |
880 | </para> |
881 | </sect2> |
882 | <sect2 id="tcpip-configuration" status="review"> |
883 | <title>TCP/IP Configuration</title> |
884 | <para> |
885 | - The TCP/IP protocol configuration consists of several elements which must be set by |
886 | - editing the appropriate configuration files, or deploying solutions such as the Dynamic |
887 | - Host Configuration Protocol (DHCP) server which in turn, can be configured to provide the |
888 | - proper TCP/IP configuration settings to network clients automatically. These |
889 | - configuration values must be set correctly in order to facilitate the proper network |
890 | + The TCP/IP protocol configuration consists of several elements which must be set by |
891 | + editing the appropriate configuration files, or deploying solutions such as the Dynamic |
892 | + Host Configuration Protocol (DHCP) server which in turn, can be configured to provide the |
893 | + proper TCP/IP configuration settings to network clients automatically. These |
894 | + configuration values must be set correctly in order to facilitate the proper network |
895 | operation of your Ubuntu system. |
896 | </para> |
897 | <para> |
898 | @@ -697,7 +657,7 @@ |
899 | <emphasis role="bold">Network Address</emphasis> The Network Address represents the |
900 | bytes comprising the network portion of an IP address. For example, the host 12.128.1.2 |
901 | in a Class A network would use 12.0.0.0 as the network address, where twelve (12) |
902 | - represents the first byte of the IP address, (the network part) and zeroes (0) |
903 | + represents the first byte of the IP address, (the network part) and zeroes (0) |
904 | in all of the remaining three bytes to represent the potential host values. A network |
905 | host using the private IP address 192.168.1.100 |
906 | would in turn use a Network Address of 192.168.1.0, which specifies the first three |
907 | @@ -714,28 +674,28 @@ |
908 | every host on the Internet because routers block it. A more appropriate broadcast address |
909 | is set to match a specific subnetwork. For example, on the private Class C IP network, |
910 | 192.168.1.0, the broadcast address is 192.168.1.255. Broadcast messages are |
911 | - typically produced by network protocols such as the Address Resolution Protocol (ARP) and the |
912 | - Routing Information Protocol (RIP). |
913 | + typically produced by network protocols such as the Address Resolution Protocol (ARP) and the |
914 | + Routing Information Protocol (RIP). |
915 | </para> |
916 | </listitem> |
917 | <listitem> |
918 | <para> |
919 | <emphasis role="bold">Gateway Address</emphasis> A Gateway Address is the IP address through which |
920 | a particular network, or host on a network, may be reached. If one network host wishes to communicate |
921 | - with another network host, and that host is not located on the same network, then a |
922 | + with another network host, and that host is not located on the same network, then a |
923 | <emphasis>gateway</emphasis> must be used. In many cases, the Gateway Address will be that |
924 | of a router on the same network, which will in turn pass traffic on to other networks or hosts, such as |
925 | Internet hosts. The value of the Gateway Address setting must be correct, or your system will not be able |
926 | - to reach any hosts beyond those on the same network. |
927 | + to reach any hosts beyond those on the same network. |
928 | </para> |
929 | </listitem> |
930 | <listitem> |
931 | <para> |
932 | <emphasis role="bold">Nameserver Address</emphasis> Nameserver Addresses represent the IP addresses of |
933 | Domain Name Service (DNS) systems, which resolve network hostnames into IP addresses. There are three levels of |
934 | - Nameserver Addresses, which may be specified in order of precedence: The |
935 | + Nameserver Addresses, which may be specified in order of precedence: The |
936 | <emphasis>Primary</emphasis> |
937 | - Nameserver, the <emphasis>Secondary</emphasis> Nameserver, and the |
938 | + Nameserver, the <emphasis>Secondary</emphasis> Nameserver, and the |
939 | <emphasis>Tertiary</emphasis> |
940 | Nameserver. In order for your system to be able to resolve network hostnames into their |
941 | corresponding IP addresses, you must specify valid Nameserver Addresses which you are authorized to use |
942 | @@ -771,18 +731,18 @@ |
943 | to direct the forwarding of network data packets from their source to the destination, often |
944 | via many intermediary network nodes known as <emphasis>routers</emphasis>. |
945 | There are two primary forms of |
946 | - IP routing: <emphasis>Static Routing</emphasis> and |
947 | + IP routing: <emphasis>Static Routing</emphasis> and |
948 | <emphasis>Dynamic Routing.</emphasis> |
949 | </para> |
950 | <para> |
951 | Static routing involves manually adding IP routes to the system's routing table, and this is usually |
952 | done by manipulating the routing table with the <application>route</application> command. Static routing enjoys |
953 | - many advantages over dynamic routing, such as simplicity of implementation on smaller networks, |
954 | - predictability (the routing table is always computed in advance, and thus the route is precisely the |
955 | + many advantages over dynamic routing, such as simplicity of implementation on smaller networks, |
956 | + predictability (the routing table is always computed in advance, and thus the route is precisely the |
957 | same each time it is used), and low overhead on other routers and network links due to the lack of a |
958 | dynamic routing protocol. However, static routing does present some disadvantages as well. For example, |
959 | static routing is limited to small networks and does not scale well. Static routing also fails completely |
960 | - to adapt to network outages and failures along the route due to the fixed nature of the route. |
961 | + to adapt to network outages and failures along the route due to the fixed nature of the route. |
962 | </para> |
963 | <para> |
964 | Dynamic routing depends on large networks with multiple possible IP routes from a source to a destination |
965 | @@ -805,7 +765,7 @@ |
966 | determines when the flow of a data stream needs to be stopped, and previously sent data |
967 | packets should to be re-sent due to problems such as <emphasis>collisions</emphasis>, |
968 | for example, thus ensuring complete and accurate delivery of the data. TCP is typically |
969 | - used in the exchange of important information such as database transactions. |
970 | + used in the exchange of important information such as database transactions. |
971 | </para> |
972 | <para> |
973 | The User Datagram Protocol (UDP), on the other hand, is a <emphasis>connectionless</emphasis> |
974 | @@ -823,7 +783,7 @@ |
975 | in the Request For Comments (RFC) #792 and supports network packets containing control, error, and |
976 | informational messages. ICMP is used by such network applications as the <application>ping</application> |
977 | utility, which can determine the availability of a network host or device. Examples of some error messages |
978 | - returned by ICMP which are useful to both network hosts and devices such as routers, include |
979 | + returned by ICMP which are useful to both network hosts and devices such as routers, include |
980 | <emphasis>Destination Unreachable</emphasis> and <emphasis>Time Exceeded</emphasis>. |
981 | </para> |
982 | </sect2> |
983 | @@ -833,9 +793,9 @@ |
984 | Daemons are special system applications which typically execute continuously in the background and |
985 | await requests for the functions they provide from other applications. Many daemons are network-centric; that is, |
986 | a large number of daemons executing in the background on an Ubuntu system may provide network-related functionality. |
987 | - Some examples of such network daemons include the <emphasis>Hyper Text Transport Protocol Daemon</emphasis> |
988 | + Some examples of such network daemons include the <emphasis>Hyper Text Transport Protocol Daemon</emphasis> |
989 | (httpd), which provides web server functionality; the <emphasis>Secure SHell Daemon</emphasis> (sshd), which |
990 | - provides secure remote login shell and file transfer capabilities; and the <emphasis>Internet Message Access |
991 | + provides secure remote login shell and file transfer capabilities; and the <emphasis>Internet Message Access |
992 | Protocol Daemon</emphasis> (imapd), which provides E-Mail services. |
993 | </para> |
994 | </sect2> |
995 | @@ -867,10 +827,10 @@ |
996 | <sect1 id="dhcp" status="review"> |
997 | <title>Dynamic Host Configuration Protocol (DHCP)</title> |
998 | <para> |
999 | - The Dynamic Host Configuration Protocol (DHCP) is a network service that enables |
1000 | + The Dynamic Host Configuration Protocol (DHCP) is a network service that enables |
1001 | host computers to be automatically assigned settings from a server as opposed to |
1002 | manually configuring each network host. Computers configured to be DHCP clients have |
1003 | - no control over the settings they receive from the DHCP server, and the |
1004 | + no control over the settings they receive from the DHCP server, and the |
1005 | configuration is transparent to the computer's user. |
1006 | </para> |
1007 | <para> |
1008 | @@ -908,8 +868,8 @@ |
1009 | The advantage of using DHCP is that changes to the network, for example a change |
1010 | in the address of the DNS server, need only be changed at the DHCP server, and all |
1011 | network hosts will be reconfigured the next time their DHCP clients poll the |
1012 | - DHCP server. As an added advantage, it is also easier to integrate new computers |
1013 | - into the network, as there is no need to check for the availability of an IP |
1014 | + DHCP server. As an added advantage, it is also easier to integrate new computers |
1015 | + into the network, as there is no need to check for the availability of an IP |
1016 | address. Conflicts in IP address allocation are also reduced. |
1017 | </para> |
1018 | <para> |
1019 | @@ -924,7 +884,7 @@ |
1020 | of each network card connected to the network and then continually |
1021 | supplying a constant configuration each time the DHCP client makes a |
1022 | request to the DHCP server using that network device. This ensures that |
1023 | - a particular address is assigned automatically to that network card, |
1024 | + a particular address is assigned automatically to that network card, |
1025 | based on it's MAC address. |
1026 | </para> |
1027 | </listitem> |
1028 | @@ -934,13 +894,13 @@ |
1029 | <listitem> |
1030 | <para> |
1031 | In this method, the DHCP server will assign an IP address from a pool of addresses |
1032 | - (sometimes also called a range or scope) for a period of time or lease, that is |
1033 | - configured on the server or until the client informs the server that it doesn't |
1034 | + (sometimes also called a range or scope) for a period of time or lease, that is |
1035 | + configured on the server or until the client informs the server that it doesn't |
1036 | need the address anymore. This way, the clients will be receiving their configuration |
1037 | properties dynamically and on a "first come, first served" basis. When a DHCP client |
1038 | - is no longer on the network for a specified period, the configuration is expired and |
1039 | + is no longer on the network for a specified period, the configuration is expired and |
1040 | released back to the address pool for use by other DHCP Clients. This way, an address |
1041 | - can be leased or used for a period of time. After this period, the client has to |
1042 | + can be leased or used for a period of time. After this period, the client has to |
1043 | renegociate the lease with the server to maintain use of the address. |
1044 | </para> |
1045 | </listitem> |
1046 | @@ -950,7 +910,7 @@ |
1047 | <listitem> |
1048 | <para> |
1049 | Using this method, the DHCP automatically assigns an IP address permanently to a device, |
1050 | - selecting it from a pool of available addresses. Usually DHCP is used to assign a |
1051 | + selecting it from a pool of available addresses. Usually DHCP is used to assign a |
1052 | temporary address to a client, but a DHCP server can allow an infinite lease time. |
1053 | </para> |
1054 | </listitem> |
1055 | @@ -962,12 +922,9 @@ |
1056 | is in how long the IP address is leased, in other words whether a client's address varies |
1057 | over time. |
1058 | |
1059 | - Ubuntu is shipped with both DHCP server and client. The server is |
1060 | - <application>dhcpd</application> (dynamic host configuration protocol daemon). |
1061 | - The client provided with Ubuntu is <application>dhclient</application> and should |
1062 | - be installed on all computers required to be automatically configured. Both |
1063 | - programs are easy to install and configure and will be automatically started at |
1064 | - system boot. |
1065 | + The DHCP server Ubuntu makes available is |
1066 | + <application>dhcpd</application> (dynamic host configuration protocol daemon), |
1067 | + which is easy to install and configure and will be automatically started at system boot. |
1068 | </para> |
1069 | <sect2 id="dhcp-installation" status="review"> |
1070 | <title>Installation</title> |
1071 | @@ -1011,15 +968,15 @@ |
1072 | option routers 192.168.1.254; |
1073 | option domain-name-servers 192.168.1.1, 192.168.1.2; |
1074 | option domain-name "mydomain.example"; |
1075 | -} |
1076 | +} |
1077 | </programlisting> |
1078 | <para> |
1079 | This will result in the DHCP server giving clients an IP address from the range |
1080 | 192.168.1.150-192.168.1.200. It will lease an IP |
1081 | - address for 600 seconds if the client doesn't ask for a specific time frame. |
1082 | - Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also |
1083 | - "advise" the client to use 192.168.1.254 as the default-gateway and |
1084 | - 192.168.1.1 and 192.168.1.2 as its DNS servers. |
1085 | + address for 600 seconds if the client doesn't ask for a specific time frame. |
1086 | + Otherwise the maximum (allowed) lease will be 7200 seconds. The server will also |
1087 | + "advise" the client to use 192.168.1.254 as the default-gateway and |
1088 | + 192.168.1.1 and 192.168.1.2 as its DNS servers. |
1089 | </para> |
1090 | <para> |
1091 | After changing the config file you have to restart the |
1092 | @@ -1040,7 +997,7 @@ |
1093 | </listitem> |
1094 | <listitem> |
1095 | <para> |
1096 | - For more <filename>/etc/dhcp/dhcpd.conf</filename> options see the |
1097 | + For more <filename>/etc/dhcp/dhcpd.conf</filename> options see the |
1098 | <ulink url="http://manpages.ubuntu.com/manpages/&distro-short-codename;/en/man5/dhcpd.conf.5.html">dhcpd.conf man page</ulink>. |
1099 | </para> |
1100 | </listitem> |
1101 | @@ -1057,10 +1014,10 @@ |
1102 | <sect1 id="NTP" status="review"> |
1103 | <title>Time Synchronization</title> |
1104 | <para> |
1105 | -NTP is a TCP/IP protocol for synchronizing time over a network. Basically a client requests the current time from a server, and uses it to set its own clock. |
1106 | +NTP is a TCP/IP protocol for synchronizing time over a network. Basically a client requests the current time from a server, and uses it to set its own clock. |
1107 | </para> |
1108 | <para> |
1109 | -Behind this simple description, there is a lot of complexity - there are tiers of NTP servers, with the tier one NTP servers connected to atomic clocks, and tier two and three servers spreading the load of actually handling requests across the Internet. Also the client software is a lot more complex than you might think - it has to factor out communication delays, and adjust the time in a way that does not upset all the other processes that run on the server. But luckily all that complexity is hidden from you! |
1110 | +Behind this simple description, there is a lot of complexity - there are tiers of NTP servers, with the tier one NTP servers connected to atomic clocks, and tier two and three servers spreading the load of actually handling requests across the Internet. Also the client software is a lot more complex than you might think - it has to factor out communication delays, and adjust the time in a way that does not upset all the other processes that run on the server. But luckily all that complexity is hidden from you! |
1111 | </para> |
1112 | <para> |
1113 | Ubuntu by default uses <emphasis>timedatectl / timesyncd</emphasis> to synchronize time and users can optionally use chrony to <xref linkend="timeservers"/>. |
1114 | @@ -1573,10 +1530,10 @@ |
1115 | Network devices using kernel driver |
1116 | =================================== |
1117 | 0000:02:00.0 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=eth0 drv=tg3 unused=uio_pci_generic *Active* |
1118 | -0000:02:00.1 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=eth1 drv=tg3 unused=uio_pci_generic |
1119 | -0000:02:00.2 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=eth2 drv=tg3 unused=uio_pci_generic |
1120 | -0000:02:00.3 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=eth3 drv=tg3 unused=uio_pci_generic |
1121 | -0000:04:00.1 'Ethernet Controller 10-Gigabit X540-AT2' if=eth5 drv=ixgbe unused=uio_pci_generic |
1122 | +0000:02:00.1 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=eth1 drv=tg3 unused=uio_pci_generic |
1123 | +0000:02:00.2 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=eth2 drv=tg3 unused=uio_pci_generic |
1124 | +0000:02:00.3 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=eth3 drv=tg3 unused=uio_pci_generic |
1125 | +0000:04:00.1 'Ethernet Controller 10-Gigabit X540-AT2' if=eth5 drv=ixgbe unused=uio_pci_generic |
1126 | |
1127 | Other network devices |
1128 | ===================== |
Thanks for this Josh, I didn't review the content yet, but I did get a number of parse errors in XML. I think you need to look at your escaping, and then run `LN=C make serverguide-html` to test.