home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Source NAT (many-to-one)

The following figure shows an example of SNAT in which many different “inside” addresses are dynamically translated to a single “outside” address. In this example, all hosts on the 10.0.0.0/24 subnet show the same source address externally.

Figure 1. Source NAT (many-to-one)

To configure NAT in this way, perform the following steps in configuration mode.

Table 1. Configuring source NAT (many-to-one)

Step

Command

Create SNAT rule 10.

vyatta@vyatta# set service nat source rule 10

Apply this rule to packets coming from the 10.0.0.0/24 network and egressing through the eht0 interface.

vyatta@vyatta# set service nat source rule 10 source address 10.0.0.0/24 
vyatta@vyatta# set service nat source rule 10 outbound-interface dp0p1p1

Use 12.34.56.78 as the source address in outgoing packets. Make sure that the translation address is an address defined on the outbound interface if it is part of the connected subnet on that interface. This ensures that the vRouter replies to ARP requests from remote devices for the translation address.

vyatta@vyatta# set service nat source rule 10 translation address 12.34.56.78

Commit the change.

vyatta@vyatta# commit

Show the configuration.

vyatta@vyatta# show nat source rule 10
outbound-interface dp0p1p1
source {
    address 10.0.0.0/24
}
translation {
    address 12.34.56.78
}