<commit_before>##<a id="enable"></a>Enable Container-to-Container Networking

Container networking is installed by default when you install Cloud Foundry using `cf-deployment`. For instructions for using `cf-deployment`, see [Deploying Cloud Foundry with cf-deployment](https://docs.cloudfoundry.org/deploying/cf-deployment/index.html).

Container networking has properties that you can configure to change their default behavior. The table below has a list of properties and instructions for editing them. For more information, see [Configuration Information for Operators](https://github.com/cloudfoundry/cf-networking-release/blob/develop/docs/configuration.md).

<table border="1" class="nice">
  <tr>
    <th style="width:35%">Container-to-Container Networking Stub Contents</th>
    <th>Editing Instructions</th>
  </tr>
  <tr>
    <td><pre><code>
properties:
  cf_networking:
    vxlan_policy_agent:
      policy_server_url: [...]
      ca_cert: |
        -----BEGIN CERTIFICATE-----
        REPLACE-WITH-CA-CERTIFICATE
        -----END CERTIFICATE-----
      client_cert: |
        -----BEGIN CERTIFICATE-----
        REPLACE-WITH-CLIENT-CERTIFICATE
        -----END CERTIFICATE-----
      client_key: |
        -----BEGIN EXAMPLE RSA PRIVATE KEY-----
        REPLACE-WITH-CLIENT-KEY
        -----END EXAMPLE RSA PRIVATE KEY-----</code></pre></td>
    <td>Copy in certificates and keys for the policy agent.
        The policy agent communicates with the policy server through TLS.
        See the <a href="../../concepts/understand-cf-networking.html#architecture">Architecture</a> section for more information.
    </td>
  <tr>
    <td><pre><code>
policy_server:
  debug_server_port: REPLACE-WITH-LISTEN-PORT

vxlan_policy_agent:
  debug_server_port: REPLACE-WITH-LISTEN-PORT
</code></pre></td>
    <td>By default, the Policy Server and VXLAN Policy Agent listen on port 22222.<br><br>
    (Optional) Change these port numbers by adding the <code>debug_server_port</code> key pair to the stub file.
    <br>
    Replace <code>REPLACE-WITH-LISTEN-PORT</code> with a port number.<br><br>
    For more information, see <a href="#debug-logging">Manage Debug Logging</a> below.
    </td>
    <tr>
    <td><pre><code>
vxlan_policy_agent:
  iptables_c2c_logging: true
</code></pre></td>
    <td>The default value for <code>iptables_c2c_logging</code> is <code>false</code>.
    <br><br>
    (Optional) Change the value to <code>true</code> to enable logging for Container-to-Container policy iptables rules.
    </td>
  <tr>
    <td><pre><code>
garden_external_networker:
  iptables_asg_logging: true
    </code></pre></td>
    <td>
    The default value for <code>iptables_asg_logging</code> is <code>false</code>.
    <br><br>
    (Optional) Change the value to <code>true</code> to enable
    logging for Application Security Group (ASG) iptables rules.
    </td>
  </tr>
  <tr>
    <td><pre><code>
policy_server:
  uaa_client_secret: REPLACE-WITH-UAA-CLIENT-SECRET
    </code></pre></td>
    <td>Copy in the <code>REPLACE-WITH-UAA-CLIENT-SECRET</code> value you used in the step <a href="#uaa-secret">above</a>.
    </td>
  </tr>
  <tr>
    <td><pre><code>
database:
  type: REPLACE-WITH-DB-TYPE
  username: REPLACE-WITH-USERNAME
  password: <PASSWORD>
  host: REPLACE-WITH-DB-HOSTNAME
  port: REPLACE-WITH-DB-PORT
  name: REPLACE-WITH-DB-NAME
   </code></pre></td>
    <td>
    Supply the details for the database from <a href="#enable">step 1</a>.<br>
    The database type must be <code>postgres</code> or <code>mysql</code>.<br>
    Choose a username and password.
    <br>For <code>host</code>, enter the IP address of the database instance.
    <br>Supply a port. For MySQL, a typical port is <code>3360</code>.
    <br>Supply the name of the database.
    </td>
  </tr>
  <tr>
    <td><pre><code>
  ca_cert: |
    -----BEGIN CERTIFICATE-----
    REPLACE-WITH-CA-CERTIFICATE
    -----END CERTIFICATE-----
  server_cert: |
    -----BEGIN CERTIFICATE-----
    REPLACE-WITH-SERVER-CERT
    -----END CERTIFICATE-----
  server_key: |
    -----BEGIN EXAMPLE RSA PRIVATE KEY-----
    REPLACE-WITH-SERVER-KEY
    -----END EXAMPLE RSA PRIVATE KEY-----
garden_external_networker:
  cni_plugin_dir: /var/vcap/packages/flannel/bin
  cni_config_dir: /var/vcap/jobs/cni-flannel/config/cni
    </code></pre></td>
    <td>
    Copy in the certificates and keys for the policy server. 
    The policy server communicates with the policy agent through TLS. 
    See the <a href="../../concepts/understand-cf-networking.html#architecture">Architecture</a> section for more information.
    </td>
  </tr>
  <tr>
    <td><pre><code>
properties:
  cf_networking:
    network: REPLACE-WITH-OVERLAY-NETWORK-CIDR
    </code></pre></td>
    <td>(Optional) Enter an IP range for the overlay network. The CIDR must specify an RFC 1918 range. If you do not set a custom range, the deployment uses <code>10.255.0.0/16</code>.
<br><br>See <a href="../../concepts/understand-cf-networking.html#app-comm">App Instance Communication</a> for more information.
    </td>
  </tr>
  <tr>
    <td><pre><code>
properties:
  cf_networking:
    mtu: REPLACE-WITH-MTU
    </code></pre></code>
    <td>(Optional) You can manually configure the Maximum Transmission Unit (MTU) value to support additional encapsulation overhead.
    </td>
  </tr>
</table>

To see how container networking works with and without service discovery, see [Cats and Dogs with Service Discovery](https://github.com/cloudfoundry/cf-networking-examples/blob/master/docs/c2c-with-service-discovery.md) in GitHub. In this tutorial, you deploy two apps and create a Container-to-Container Networking policy that allows them to communicate directly with each other.<commit_msg>Added updated table [#155203751]<commit_after>##<a id="enable"></a>Enable Container-to-Container Networking

Container networking is installed by default when you install Cloud Foundry using `cf-deployment`. For instructions for using `cf-deployment`, see [Deploying Cloud Foundry with cf-deployment](https://docs.cloudfoundry.org/deploying/cf-deployment/index.html).

Container networking has properties that you can configure to change their default behavior. The table below has a list of properties and instructions for editing them. For more information, see [Configuration Information for Operators](https://github.com/cloudfoundry/cf-networking-release/blob/develop/docs/configuration.md).

<table border="1" class="nice">
  <tr>
    <th style="width:35%">Container-to-Container Networking Opsfiles</th>
    <th>Description</th>
  </tr>
  <tr>
    <td><pre><code>
    - type: replace
    path: /instance_groups/name=diego-cell/jobs/name=vxlan_policy_agent/properties/iptables_logging?
    value: true
    </code></pre></td>
    <td>
    The default value for <code>iptables_logging</code> is <code>false</code>.
    <br><br>
    (Optional) Change the value to <code>true</code> to enable logging for Container-to-Container policy iptables rules.
    </td>
  </tr>
  <tr>
    <td><pre><code>
    - type: replace
    path: /instance_groups/name=diego-cell/jobs/name=cni/properties/iptables_logging?
    value: true
    </code></pre></td>
    <td>
    The default value for <code>iptables_logging</code> is <code>false</code>.
    <br><br>
    (Optional) Change the value to <code>true</code> to enable
    logging for Application Security Group (ASG) iptables rules.
    </td>
  </tr>
  <tr>
    <td><pre><code>
    - type: replace
    path: /instance_groups/name=diego-cell/jobs/name=silk-controller/properties/network?
    value: REPLACE-WITH-OVERLAY-NETWORK-CIDR
    </code></pre></td>
    <td>
    (Optional) Enter an IP range for the overlay network. The CIDR must specify an RFC 1918 range. If you do not set a custom range, the deployment uses <code>10.255.0.0/16</code>.
    <br><br>
    See <a href="../../concepts/understand-cf-networking.html#app-comm">App Instance Communication</a> for more information.
    </td>
  </tr>
  <tr>
    <td><pre><code>
    - type: replace
    path: /instance_groups/name=diego-cell/jobs/name=cni/properties/mtu?
    value: REPLACE-WITH-MTU
    </code></pre></code>
    <td>
    (Optional) You can manually configure the Maximum Transmission Unit (MTU) value to support additional encapsulation overhead.
    </td>
  </tr>
</table>

To see how container networking works with and without service discovery, see [Cats and Dogs with Service Discovery](https://github.com/cloudfoundry/cf-networking-examples/blob/master/docs/c2c-with-service-discovery.md) in GitHub. In this tutorial, you deploy two apps and create a Container-to-Container Networking policy that allows them to communicate directly with each other.
{'fraction_non_alphanumeric': 0.13737466866428488, 'fraction_numerical': 0.006338596289039991, 'mean_word_length': 3.432073544433095, 'pattern_counts': {'":': 0, '<': 229, '<?xml version=': 0, '>': 229, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3939300', 'n_tokens_mistral': 2859, 'n_tokens_neox': 2734, 'n_words': 778}