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