You might need to configure the Inline NAT interface style due to the hardware limitations and support of your FPC.
NOTE:Only static NAT is supported. Port translation, dynamic NAT, and ALGs are not supported. Hence, applications such as SIP or FTP Active Mode which require advanced processing for NAT do not function. An MS-MPC, MS-MIC, MS-DPC, or MS-PIC is still needed for any stateful-firewall processing, ALG support, and dynamic port translation.
Inline NAT does not support sampling or logging of packets.
Due to hardware limitations, only Inline NAT is supported on the FPC.
Here is an example configuration for this:
Topology example:
In this example, an MX Series device with an MPC line card provides inline source NAT services to traffic flowing between two end hosts.
As shown in the figure, host H1 sends traffic towards server S1. The MX Series device performs source NAT to translate H1’s source IP address from 10.1.1.2 to 192.0.2.2. Server S1 then sends return traffic to host H1 using the destination IP address 192.0.2.2, and the MX Series device reverts H1’s IP address back to 10.1.1.2.
The following configuration elements are used in this scenario:
si-
Interface-Based Inline Source NAT
[edit chassis fpc 0 pic 0] user@MX# set inline-services bandwidth 1g
NOTE: The FPC and PIC settings here must match the settings defined above.[edit interfaces si-0/0/0]
user@MX# set unit 0 family inet
p1
[edit services nat] user@MX# set rule SRC-NAT1 match-direction input user@MX# set rule SRC-NAT1 term r1 from source-address 10.1.1.0/24 user@MX# set rule SRC-NAT1 term r1 then translated translation-type basic-nat44 user@MX# set rule SRC-NAT1 term r1 then translated source-pool p1
[edit services nat] user@MX# set pool p1 address 192.0.2.0/24
nat-rules
interface-service
[edit services] user@MX# set service-set INT-STYLE-SS-NAT1 nat-rules SRC-NAT1 user@MX# set service-set INT-STYLE-SS-NAT1 interface-service service-interface si-0/0/0.0
[edit interfaces] user@MX# set xe-0/0/0 unit 0 family inet address 10.1.1.1/24 user@MX# set xe-0/0/0 description INSIDE user@MX# set xe-1/0/0 unit 0 family inet address 192.168.1.1/24 user@MX# set xe-1/0/0 description OUTSIDE
[edit interfaces xe-0/0/0 unit 0] user@MX# set family inet service input service-set INT-STYLE-SS-NAT1 user@MX# set family inet service output service-set INT-STYLE-SS-NAT1
chassis { fpc 0 { pic 0 { inline-services { bandwidth 1g; } } } } services { service-set INT-STYLE-SS-NAT1 { nat-rules SRC-NAT1; interface-service { service-interface si-0/0/0.0; } } nat { pool p1 { address 192.0.2.0/24; } rule SRC-NAT1 { match-direction input; term r1 { from { source-address { 10.1.1.0/24; } } then { translated { source-pool p1; translation-type { basic-nat44; } } } } } } } interfaces { si-0/0/0 { unit 0 { family inet; } } xe-0/0/0 { description INSIDE; unit 0 { family inet { service { input { service-set INT-STYLE-SS-NAT1; } output { service-set INT-STYLE-SS-NAT1; } } address 10.1.1.1/24; } } } xe-1/0/0 { description OUTSIDE; unit 0 { family inet { address 192.168.1.1/24; } } } }
On the MX device, verify that the inline NAT configuration details have been applied correctly.user@MX> show services inline nat pool
Interface: si-0/0/0, Service set: INT-STYLE-SS-NAT1 NAT pool: p1, Translation type: BASIC NAT44 Address range: 192.0.2.0-192.0.2.255 NATed packets: 5, deNATed packets: 5, Errors: 0
Note: The NAT pool cannot use an outgoing interface address facing server S1 and an separate address block is required, otherwise the traffic returned from the server S1 cannot distinguish packets.