Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions docs/vpp/configuration/nat/nat44.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

NAT44 has two main use cases:

* **Source NAT (SNAT)**: Enabling Internet access for hosts in private networks using dynamic or static address translation

Check warning on line 13 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=123
* **Destination NAT (DNAT)**: Providing external access to internal services through static port forwarding rules

Check warning on line 14 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=113

VyOS supports both dynamic translation using address pools and static mappings for predictable address translation requirements.

Check warning on line 16 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=128

Configuration of NAT44 involves few steps:

Expand All @@ -23,15 +23,39 @@
Dynamic and Static Operations
=============================

NAT44 configuration can be done in one of two ways or in both ways simultaneously:

Check warning on line 26 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=82

1. Dynamically performing NAT using a pool of public IP addresses.
2. Statically mapping private IP addresses to public IP addresses.

To configure dynamic NAT, you need to define a pool of public IP addresses that will be used for translation. This offers an easy way to provide Internet access to internal users.

Check warning on line 31 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=179

Static rules are more suitable for scenarios where you need to provide consistent and predictable mappings between private and public IP addresses, also they are the only way to configure DNAT.

Check warning on line 33 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=193

NAT Rule Processing and Traffic Flow
------------------------------------

This section explains how different combinations of NAT rules affect traffic handling on a router. There are three possible combinations of NAT rules configurations:

Check warning on line 38 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=165

1. **Dynamic NAT Only**

* **All** traffic received on the "in" interface is processed by dynamic NAT rules without exceptions.

Check warning on line 42 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=105

2. **Dynamic + Static NAT**

* **All** traffic received on the "in" interface is first matched against static NAT rules.

Check warning on line 46 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=94
* If no match is found, it is then processed by dynamic NAT rules.

3. **Static NAT Only**

* **All** traffic on the "in" interface is checked against static NAT rules.
* If no match is found, the traffic is routed **without NAT**.

.. important::

* If **dynamic NAT rules** are present, **all** traffic received on "in" interfaces is subject to NAT processing.

Check warning on line 56 in docs/vpp/configuration/nat/nat44.rst

View workflow job for this annotation

GitHub Actions / lint-doc / doc-lint

Line too long: len=116
* If **only static NAT rules** are configured, traffic that does not match any static rule is routed unchanged.

Interfaces Configuration
========================

Expand Down Expand Up @@ -554,24 +578,6 @@
# Increase session limit for high-capacity deployment
set vpp settings nat44 session-limit 100000

Forwarding Behavior
-------------------

By default, VyOS NAT44 forwards packets that don't match any NAT rules according to the routing table. This behavior can be controlled:

.. cfgcmd:: set vpp settings nat44 no-forwarding

Disable forwarding of packets that don't match existing NAT translations. When enabled, only packets that match static or dynamic NAT rules will be processed; all other traffic will be dropped.

.. important::

This is a significant difference from traditional NAT solutions. By default, VyOS NAT44 allows non-NAT traffic to be forwarded normally. Using ``no-forwarding`` creates a pure NAT-only device that drops any traffic not covered by NAT rules.

**Use cases for no-forwarding:**

* **Pure NAT gateway**: When the router should only handle NAT traffic and drop everything else
* **Security isolation**: Preventing any non-NAT traffic from traversing the device

Worker Assignment
-----------------

Expand Down
Loading