Pathfinder Applications
Note: † Internal applications are hidden from customers and partners. This is visible to you because you have logged into HPEs internal network.
Navigation
Table of Contents
Guide That Contains This Content
[+] Expand All
[-] Collapse All
Example: NAT 44 CGN Configurations
This example describes how to implement several NAT configurations.
Hardware and Software Requirements
This example requires the following hardware:
- An MX Series 3D Universal Edge router with a Services DPC or an M Series Multiservice Edge router with a services PIC
- A domain name server (DNS)
This example uses the following software:
- Junos OS Release 11.4 or higher
Overview
This example shows a complete CGN NAT44 configuration and advanced options.
Basic NAT44 Configuration
CLI Quick Configuration
Chassis Configuration
Step-by-Step Procedure
To configure the service PIC (FPC 5 Slot 0) with the Layer 3 service package:
- Go to the [edit chassis] hierarchy level.user@host# edit chassis
- Configure the Layer 3 service package.[edit chassis]user@host# set fpc 5 pic 0 adaptive-services service-package layer-3
Configuring the Interfaces
Step-by-Step Procedure
To configure interfaces to the private network and the public Internet:
- Define the interface to the private network.user@host# edit interfaces ge-1/3/5[edit interfaces ge-1/3/5]user@host# set description “Private”user@host# edit unit 0 family inet[edit interfaces ge-1/3/5 unit 0 family inet]user@host# set service input service-set ss2user@host# set service output service-set ss2user@host# set address 9.0.0.1/24
- Define the interface to the public Internet.user@host# edit interfaces ge-1/3/6[edit interfaces ge-1/3/6]user@host# set description “Public”user@host# set unit 0 family inet address 128.0.0.1/24
- Define the service interface for NAT processing.user@host# edit interfaces sp-5/0/0[edit interfaces sp-5/0/0]user@host# set unit 0 family inet
Results
user@host# show interfaces ge-1/3/5description Private;
unit 0 {
family inet {
service {
input {
service-set sset2;
}
output {
service-set sset2;
}
}
address 9.0.0.1/24;
}
}
}user@host# show interfaces ge-1/3/6description Public:;
unit 0 {
family inet {
address 128.0.0.1/24;
}
}user@host# show interfaces sp-5/0/0unit 0 {
family inet;
}Configuring NAT with Port Translation
Step-by-Step Procedure
To configure source-only dynamic NAT with port translation:
- Configure the NAT pool.user@host# edit services nat[edit services nat]user@host# set pool p1 address 129.0.0.0/24user@host# set pool p1 port automatic random-allocation
- Configure the NAT rule.
[edit services nat]host# edit rule r1host# set match-direction inputhost# set term t1 from source-address 10.0.0.0/16host# set term t1 from source-address 10.1.0.0/16host# set term t1 then translated source-pool p1 translation-type dynamic-nat44
Results
user@host# show services natpool p1 {
address 129.0.0.0/24;
}
rule r1 {
match-direction input;
term t1 {
from {
source-address {
10.0.0.0/16;
10.1.0.0/16;
}
}
then {
translated {
source-pool p1;
translation-type {
dynamic-nat44;
}
}
}
}
}
Configuring the Service Set
Step-by-Step Procedure
To configure the service set:
- Configure a service set.user@host# edit services service-set ss2
- Specify the NAT rule to be used.[edit services service-set ss2]host# set nat-rules r1
- Specify the interface service.[edit services service-set ss2]host# set interface-service service-interface sp-5/0/0
Results
user@host# show services service-sets sset2
nat-rules r1;
interface-service {
service-interface sp-5/0/0;
}