<commit_before><?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="5.0"
  xml:id="neutron-network-node">
  <title>Install and configure network node</title>
  <para>The network node primarily handles internal and external routing
    and <glossterm>DHCP</glossterm> services for virtual networks.</para>
  <procedure>
    <title>To configure prerequisites</title>
    <para>Before you install and configure OpenStack Networking, you
      must configure certain kernel networking parameters.</para>
    <step>
      <para>Edit the <filename>/etc/sysctl.conf</filename> file to
        contain the following parameters:</para>
      <programlisting>net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0</programlisting>
    </step>
    <step>
      <para>Implement the changes:</para>
      <screen><prompt>#</prompt> <userinput>sysctl -p</userinput></screen>
    </step>
  </procedure>
  <procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
    <title>To install the Networking components</title>
    <step>
      <screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent \
  neutron-l3-agent neutron-dhcp-agent ipset</userinput></screen>
      <screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch ipset</userinput></screen>
      <screen os="sles;opensuse"><prompt>#</prompt> <userinput>zypper install openstack-neutron-openvswitch-agent openstack-neutron-l3-agent \
  openstack-neutron-dhcp-agent openstack-neutron-metadata-agent ipset</userinput></screen>
      <note os="sles;opensuse">
        <para>SUSE does not use a separate ML2 plug-in package.</para>
      </note>
    </step>
  </procedure>
  <procedure os="debian">
    <title>To install and configure the Networking components</title>
    <step>
      <screen><prompt>#</prompt> <userinput>apt-get install neutron-plugin-openvswitch-agent openvswitch-datapath-dkms \
  neutron-l3-agent neutron-dhcp-agent</userinput></screen>
      <note>
        <para>Debian does not use a separate ML2 plug-in package.</para>
      </note>
    </step>
    <step>
      <para>Respond to prompts for
        <link linkend="debconf-dbconfig-common">database management</link>,
        <link linkend="debconf-keystone_authtoken">Identity service
        credentials</link>,
        <link linkend="debconf-api-endpoints">service endpoint
        registration</link>, and
        <link linkend="debconf-rabbitmq">message broker
        credentials</link>.</para>
    </step>
    <step>
       <para>Select the ML2 plug-in:</para>
       <informalfigure>
        <mediaobject>
          <imageobject>
            <imagedata scale="50"
              fileref="figures/debconf-screenshots/neutron_1_plugin_selection.png"
            />
          </imageobject>
        </mediaobject>
      </informalfigure>
      <note>
        <para>Selecting the ML2 plug-in also populates the
          <option>service_plugins</option> and
          <option>allow_overlapping_ips</option> options in the
          <filename>/etc/neutron/neutron.conf</filename> file with the
          appropriate values.</para>
      </note>
    </step>
  </procedure>
  <procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
    <title>To configure the Networking common components</title>
    <para>The Networking common component configuration includes the
      authentication mechanism, message broker, and plug-in.</para>
    <step>
      <para>Edit the <filename>/etc/neutron/neutron.conf</filename> file
        and complete the following actions:</para>
      <substeps>
        <step>
          <para>In the <literal>[database]</literal> section, comment out
            any <literal>connection</literal> options because network nodes
            do not directly access the database.</para>
        </step>
        <step>
          <para>In the <literal>[DEFAULT]</literal> section, configure
            <application>RabbitMQ</application> message broker access:</para>
          <programlisting language="ini">[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable><PASSWORD></replaceable></programlisting>
          <para>Replace <replaceable>RABBIT_PASS</replaceable> with the
            password you chose for the <literal>guest</literal> account in
            <application>RabbitMQ</application>.</para>
        </step>
        <step>
          <para>In the <literal>[DEFAULT]</literal> and
            <literal>[keystone_authtoken]</literal> sections,
            configure Identity service access:</para>
          <programlisting language="ini">[DEFAULT]
...
auth_strategy = keystone

[keystone_authtoken]
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service
admin_user = neutron
admin_password = <replaceable><PASSWORD></replaceable></programlisting>
          <para>Replace <replaceable>NEUTRON_PASS</replaceable> with the
            password you chose or the <literal>neutron</literal> user in the
            Identity service.</para>
          <note>
            <para>Comment out any <literal>auth_host</literal>,
              <literal>auth_port</literal>, and
              <literal>auth_protocol</literal> options because the
              <literal>identity_uri</literal> option replaces them.</para>
          </note>
        </step>
        <step>
          <para>In the <literal>[DEFAULT]</literal> section, enable the
            Modular Layer 2 (ML2) plug-in, router service, and overlapping
            IP addresses:</para>
          <programlisting language="ini">[DEFAULT]
...
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True</programlisting>
        </step>
        <step>
          <para>(Optional) To assist with troubleshooting,
            enable verbose logging in the <literal>[DEFAULT]</literal>
            section:</para>
          <programlisting language="ini">[DEFAULT]
...
verbose = True</programlisting>
        </step>
      </substeps>
    </step>
  </procedure>
  <procedure>
    <title>To configure the Modular Layer 2 (ML2) plug-in</title>
    <para>The ML2 plug-in uses the
      <glossterm baseform="Open vSwitch">Open vSwitch (OVS)</glossterm>
      mechanism (agent) to build the virtual networking framework for
      instances.</para>
    <step>
      <para>Edit the
        <filename>/etc/neutron/plugins/ml2/ml2_conf.ini</filename>
        file and complete the following actions:</para>
      <substeps>
        <step>
          <para>In the <literal>[ml2]</literal> section, enable the
            <glossterm baseform="flat network">flat</glossterm> and
            <glossterm>generic routing encapsulation (GRE)</glossterm>
            network type drivers, GRE tenant networks, and the OVS
            mechanism driver:</para>
          <programlisting language="ini">[ml2]
...
type_drivers = flat,gre
tenant_network_types = gre
mechanism_drivers = openvswitch</programlisting>
        </step>
        <step>
          <para>In the <literal>[ml2_type_flat]</literal> section, configure
            the external network:</para>
          <programlisting language="ini">[ml2_type_flat]
...
flat_networks = external</programlisting>
        </step>
        <step>
          <para>In the <literal>[ml2_type_gre]</literal> section, configure
            the tunnel identifier (id) range:</para>
          <programlisting language="ini">[ml2_type_gre]
...
tunnel_id_ranges = 1:1000</programlisting>
        </step>
        <step>
          <para>In the <literal>[securitygroup]</literal> section, enable
            security groups, enable <glossterm>ipset</glossterm>, and
            configure the OVS <glossterm>iptables</glossterm> firewall
            driver:</para>
          <programlisting language="ini">[securitygroup]
...
enable_security_group = True
enable_ipset = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver</programlisting>
        </step>
        <step>
          <para>In the <literal>[ovs]</literal> section, configure the
            <glossterm>Open vSwitch (OVS) agent</glossterm>:</para>
          <programlisting language="ini">[ovs]
...
local_ip = <replaceable>INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS</replaceable>
tunnel_type = gre
enable_tunneling = True
bridge_mappings = external:br-ex</programlisting>
          <para>Replace
            <replaceable>INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS</replaceable>
            with the IP address of the instance tunnels network interface
            on your network node.</para>
        </step>
      </substeps>
    </step>
  </procedure>
  <procedure>
    <title>To configure the Layer-3 (L3) agent</title>
    <para>The <glossterm>Layer-3 (L3) agent</glossterm> provides
      routing services for virtual networks.</para>
    <step>
      <para>Edit the <filename>/etc/neutron/l3_agent.ini</filename> file
        and complete the following actions:</para>
      <substeps>
        <step>
          <para>In the <literal>[DEFAULT]</literal> section, configure
            the driver and enable
            <glossterm baseform="network namespace">network
            namespaces</glossterm>:</para>
          <programlisting language="ini">[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces = True</programlisting>
        </step><commit_msg>Add external_network_bridge parameter to the L3 configuration<commit_after><?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
  xmlns:xi="http://www.w3.org/2001/XInclude"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  version="5.0"
  xml:id="neutron-network-node">
  <title>Install and configure network node</title>
  <para>The network node primarily handles internal and external routing
    and <glossterm>DHCP</glossterm> services for virtual networks.</para>
  <procedure>
    <title>To configure prerequisites</title>
    <para>Before you install and configure OpenStack Networking, you
      must configure certain kernel networking parameters.</para>
    <step>
      <para>Edit the <filename>/etc/sysctl.conf</filename> file to
        contain the following parameters:</para>
      <programlisting>net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0</programlisting>
    </step>
    <step>
      <para>Implement the changes:</para>
      <screen><prompt>#</prompt> <userinput>sysctl -p</userinput></screen>
    </step>
  </procedure>
  <procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
    <title>To install the Networking components</title>
    <step>
      <screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent \
  neutron-l3-agent neutron-dhcp-agent ipset</userinput></screen>
      <screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch ipset</userinput></screen>
      <screen os="sles;opensuse"><prompt>#</prompt> <userinput>zypper install openstack-neutron-openvswitch-agent openstack-neutron-l3-agent \
  openstack-neutron-dhcp-agent openstack-neutron-metadata-agent ipset</userinput></screen>
      <note os="sles;opensuse">
        <para>SUSE does not use a separate ML2 plug-in package.</para>
      </note>
    </step>
  </procedure>
  <procedure os="debian">
    <title>To install and configure the Networking components</title>
    <step>
      <screen><prompt>#</prompt> <userinput>apt-get install neutron-plugin-openvswitch-agent openvswitch-datapath-dkms \
  neutron-l3-agent neutron-dhcp-agent</userinput></screen>
      <note>
        <para>Debian does not use a separate ML2 plug-in package.</para>
      </note>
    </step>
    <step>
      <para>Respond to prompts for
        <link linkend="debconf-dbconfig-common">database management</link>,
        <link linkend="debconf-keystone_authtoken">Identity service
        credentials</link>,
        <link linkend="debconf-api-endpoints">service endpoint
        registration</link>, and
        <link linkend="debconf-rabbitmq">message broker
        credentials</link>.</para>
    </step>
    <step>
       <para>Select the ML2 plug-in:</para>
       <informalfigure>
        <mediaobject>
          <imageobject>
            <imagedata scale="50"
              fileref="figures/debconf-screenshots/neutron_1_plugin_selection.png"
            />
          </imageobject>
        </mediaobject>
      </informalfigure>
      <note>
        <para>Selecting the ML2 plug-in also populates the
          <option>service_plugins</option> and
          <option>allow_overlapping_ips</option> options in the
          <filename>/etc/neutron/neutron.conf</filename> file with the
          appropriate values.</para>
      </note>
    </step>
  </procedure>
  <procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
    <title>To configure the Networking common components</title>
    <para>The Networking common component configuration includes the
      authentication mechanism, message broker, and plug-in.</para>
    <step>
      <para>Edit the <filename>/etc/neutron/neutron.conf</filename> file
        and complete the following actions:</para>
      <substeps>
        <step>
          <para>In the <literal>[database]</literal> section, comment out
            any <literal>connection</literal> options because network nodes
            do not directly access the database.</para>
        </step>
        <step>
          <para>In the <literal>[DEFAULT]</literal> section, configure
            <application>RabbitMQ</application> message broker access:</para>
          <programlisting language="ini">[DEFAULT]
...
rpc_backend = rabbit
rabbit_host = <replaceable>controller</replaceable>
rabbit_password = <replaceable><PASSWORD></replaceable></programlisting>
          <para>Replace <replaceable>RABBIT_PASS</replaceable> with the
            password you chose for the <literal>guest</literal> account in
            <application>RabbitMQ</application>.</para>
        </step>
        <step>
          <para>In the <literal>[DEFAULT]</literal> and
            <literal>[keystone_authtoken]</literal> sections,
            configure Identity service access:</para>
          <programlisting language="ini">[DEFAULT]
...
auth_strategy = keystone

[keystone_authtoken]
...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0
identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service
admin_user = neutron
admin_password = <replaceable><PASSWORD></replaceable></programlisting>
          <para>Replace <replaceable>NEUTRON_PASS</replaceable> with the
            password you chose or the <literal>neutron</literal> user in the
            Identity service.</para>
          <note>
            <para>Comment out any <literal>auth_host</literal>,
              <literal>auth_port</literal>, and
              <literal>auth_protocol</literal> options because the
              <literal>identity_uri</literal> option replaces them.</para>
          </note>
        </step>
        <step>
          <para>In the <literal>[DEFAULT]</literal> section, enable the
            Modular Layer 2 (ML2) plug-in, router service, and overlapping
            IP addresses:</para>
          <programlisting language="ini">[DEFAULT]
...
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True</programlisting>
        </step>
        <step>
          <para>(Optional) To assist with troubleshooting,
            enable verbose logging in the <literal>[DEFAULT]</literal>
            section:</para>
          <programlisting language="ini">[DEFAULT]
...
verbose = True</programlisting>
        </step>
      </substeps>
    </step>
  </procedure>
  <procedure>
    <title>To configure the Modular Layer 2 (ML2) plug-in</title>
    <para>The ML2 plug-in uses the
      <glossterm baseform="Open vSwitch">Open vSwitch (OVS)</glossterm>
      mechanism (agent) to build the virtual networking framework for
      instances.</para>
    <step>
      <para>Edit the
        <filename>/etc/neutron/plugins/ml2/ml2_conf.ini</filename>
        file and complete the following actions:</para>
      <substeps>
        <step>
          <para>In the <literal>[ml2]</literal> section, enable the
            <glossterm baseform="flat network">flat</glossterm> and
            <glossterm>generic routing encapsulation (GRE)</glossterm>
            network type drivers, GRE tenant networks, and the OVS
            mechanism driver:</para>
          <programlisting language="ini">[ml2]
...
type_drivers = flat,gre
tenant_network_types = gre
mechanism_drivers = openvswitch</programlisting>
        </step>
        <step>
          <para>In the <literal>[ml2_type_flat]</literal> section, configure
            the external network:</para>
          <programlisting language="ini">[ml2_type_flat]
...
flat_networks = external</programlisting>
        </step>
        <step>
          <para>In the <literal>[ml2_type_gre]</literal> section, configure
            the tunnel identifier (id) range:</para>
          <programlisting language="ini">[ml2_type_gre]
...
tunnel_id_ranges = 1:1000</programlisting>
        </step>
        <step>
          <para>In the <literal>[securitygroup]</literal> section, enable
            security groups, enable <glossterm>ipset</glossterm>, and
            configure the OVS <glossterm>iptables</glossterm> firewall
            driver:</para>
          <programlisting language="ini">[securitygroup]
...
enable_security_group = True
enable_ipset = True
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver</programlisting>
        </step>
        <step>
          <para>In the <literal>[ovs]</literal> section, configure the
            <glossterm>Open vSwitch (OVS) agent</glossterm>:</para>
          <programlisting language="ini">[ovs]
...
local_ip = <replaceable>INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS</replaceable>
tunnel_type = gre
enable_tunneling = True
bridge_mappings = external:br-ex</programlisting>
          <para>Replace
            <replaceable>INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS</replaceable>
            with the IP address of the instance tunnels network interface
            on your network node.</para>
        </step>
      </substeps>
    </step>
  </procedure>
  <procedure>
    <title>To configure the Layer-3 (L3) agent</title>
    <para>The <glossterm>Layer-3 (L3) agent</glossterm> provides
      routing services for virtual networks.</para>
    <step>
      <para>Edit the <filename>/etc/neutron/l3_agent.ini</filename> file
        and complete the following actions:</para>
      <substeps>
        <step>
          <para>In the <literal>[DEFAULT]</literal> section, configure
            the driver and enable
            <glossterm baseform="network namespace">network
            namespaces</glossterm>:</para>
          <programlisting language="ini">[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces = True
external_network_bridge = br-ex</programlisting>
        </step>
{'fraction_non_alphanumeric': 0.12290789608789403, 'fraction_numerical': 0.007033576342540302, 'mean_word_length': 3.0488463936811474, 'pattern_counts': {'":': 0, '<': 603, '<?xml version=': 2, '>': 603, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5444973', 'n_tokens_mistral': 5869, 'n_tokens_neox': 5632, 'n_words': 1241}