1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 | ]>
|
---|
7 |
|
---|
8 | <sect1 id="advanced-network" revision="systemd">
|
---|
9 | <?dbhtml filename="advanced-network.html"?>
|
---|
10 |
|
---|
11 | <sect1info>
|
---|
12 | <othername>$LastChangedBy$</othername>
|
---|
13 | <date>$Date$</date>
|
---|
14 | </sect1info>
|
---|
15 |
|
---|
16 | <title>Advanced Network Setup</title>
|
---|
17 |
|
---|
18 | <sect2 id="network-bridge">
|
---|
19 | <title>Network Bridge</title>
|
---|
20 |
|
---|
21 | <sect3 role="kernel" id="advanced-network-bridge-kernel">
|
---|
22 | <title>Kernel Configuration</title>
|
---|
23 |
|
---|
24 | <para>
|
---|
25 | Enable the following options in the kernel configuration
|
---|
26 | and recompile the kernel if necessary:
|
---|
27 | </para>
|
---|
28 |
|
---|
29 | <screen><literal>Networking support: Y
|
---|
30 | Networking options:
|
---|
31 | 802.1d Ethernet Bridging: M or Y</literal></screen>
|
---|
32 |
|
---|
33 | <indexterm zone="advanced-network advanced-network-bridge-kernel">
|
---|
34 | <primary sortas="d-advanced-network-bridge">Advanced Network Bridge</primary>
|
---|
35 | </indexterm>
|
---|
36 |
|
---|
37 | </sect3>
|
---|
38 |
|
---|
39 | <sect3>
|
---|
40 | <title>Setting up a Network Bridge</title>
|
---|
41 |
|
---|
42 | <para>
|
---|
43 | In this section we are are going to discuss how to set up a network
|
---|
44 | bridge using <command>systemd-networkd</command>. In the examples
|
---|
45 | below, <replaceable>eth0</replaceable> represents the external
|
---|
46 | interface that is being bridged, while <replaceable>br0</replaceable>
|
---|
47 | represents the bridge interface.
|
---|
48 | </para>
|
---|
49 |
|
---|
50 | <para>
|
---|
51 | To create a bridge interface, create the following configuration file
|
---|
52 | by running the following command as the
|
---|
53 | <systemitem class="username">root</systemitem> user:
|
---|
54 | </para>
|
---|
55 |
|
---|
56 | <screen role="root"><userinput>cat > /etc/systemd/network/50-br0.netdev << EOF
|
---|
57 | <literal>[NetDev]
|
---|
58 | Name=<replaceable>br0</replaceable>
|
---|
59 | Kind=bridge</literal>
|
---|
60 | EOF</userinput></screen>
|
---|
61 |
|
---|
62 | <para>
|
---|
63 | To assign a network interface to a bridge, create the following
|
---|
64 | configuration file by running the following command as the
|
---|
65 | <systemitem class="username">root</systemitem> user:
|
---|
66 | </para>
|
---|
67 |
|
---|
68 | <screen role="root"><userinput>cat > /etc/systemd/network/51-eth0.network << EOF
|
---|
69 | <literal>[Match]
|
---|
70 | Name=<replaceable>eth0</replaceable>
|
---|
71 |
|
---|
72 | [Network]
|
---|
73 | Bridge=<replaceable>br0</replaceable></literal>
|
---|
74 | EOF</userinput></screen>
|
---|
75 |
|
---|
76 | <para>
|
---|
77 | Repeat the process for any other interfaces that need to be bridged.
|
---|
78 | Note that it is important that nothing assigns any addresses to the
|
---|
79 | bridged interfaces. If you are using <xref linkend="NetworkManager"/>
|
---|
80 | or <xref linkend="wicd"/>, make sure you configure them to ignore
|
---|
81 | the bridged interfaces, as well as the bridge interface itself.
|
---|
82 | </para>
|
---|
83 |
|
---|
84 | <para>
|
---|
85 | If you are on a network which uses DHCP for assigning ip addresses,
|
---|
86 | create the following configuration file by running the following
|
---|
87 | command as the <systemitem class="username">root</systemitem> user:
|
---|
88 | </para>
|
---|
89 |
|
---|
90 | <screen role="root"><userinput>cat > /etc/systemd/network/60-br0.network << EOF
|
---|
91 | <literal>[Match]
|
---|
92 | Name=<replaceable>br0</replaceable>
|
---|
93 |
|
---|
94 | [Network]
|
---|
95 | DHCP=yes</literal>
|
---|
96 | EOF</userinput></screen>
|
---|
97 |
|
---|
98 | <para>
|
---|
99 | Alternatively, if using a static ip setup, create the following
|
---|
100 | configuration file by running the following command as the
|
---|
101 | <systemitem class="username">root</systemitem> user:
|
---|
102 | </para>
|
---|
103 |
|
---|
104 | <screen role="root"><userinput>cat > /etc/systemd/network/60-br0.network << EOF
|
---|
105 | <literal>[Match]
|
---|
106 | Name=<replaceable>br0</replaceable>
|
---|
107 |
|
---|
108 | [Network]
|
---|
109 | Address=192.168.0.2/24
|
---|
110 | Gateway=192.168.0.1
|
---|
111 | DNS=192.168.0.1</literal>
|
---|
112 | EOF</userinput></screen>
|
---|
113 |
|
---|
114 | <para>
|
---|
115 | To bring up the bridge interface, simply restart the
|
---|
116 | <command>systemd-networkd</command> daemon by running the following
|
---|
117 | command as the <systemitem class="username">root</systemitem> user:
|
---|
118 | </para>
|
---|
119 |
|
---|
120 | <screen role="root"><userinput>systemctl restart systemd-networkd</userinput></screen>
|
---|
121 |
|
---|
122 | </sect3>
|
---|
123 |
|
---|
124 | </sect2>
|
---|
125 |
|
---|
126 | <!-- <sect2 id="network-interface-bonding">
|
---|
127 | <title>Network Interface Bonding</title>
|
---|
128 |
|
---|
129 | <sect3 role="kernel" id="advanced-network-bonding-kernel">
|
---|
130 | <title>Kernel Configuration</title>
|
---|
131 |
|
---|
132 | <para>
|
---|
133 | Enable the following options in the kernel configuration
|
---|
134 | and recompile the kernel if necessary:
|
---|
135 | </para>
|
---|
136 |
|
---|
137 | <screen><literal>Device Drivers:
|
---|
138 | Network device support: Y
|
---|
139 | Bonding driver support: M or Y</literal></screen>
|
---|
140 |
|
---|
141 | <indexterm zone="advanced-network advanced-network-bonding-kernel">
|
---|
142 | <primary sortas="d-advanced-network-bonding">Advanced Network Bonding</primary>
|
---|
143 | </indexterm>
|
---|
144 |
|
---|
145 | </sect3>
|
---|
146 |
|
---|
147 | <sect3>
|
---|
148 | <title>Setting up Network Interface Bonding</title>
|
---|
149 |
|
---|
150 | </sect3>
|
---|
151 |
|
---|
152 | </sect2> -->
|
---|
153 |
|
---|
154 | </sect1>
|
---|