ON THIS PAGE
Example: Configuring the DNS ALG Application on MX-SPC3 service card
This example shows how to configure the translation type as basic-nat-pt. You must configure the DNS ALG application, the NAT pools and rules, a service set with a service interface.
Requirements
This example uses the following hardware and software components:
- MX240, MX480, and MX960 with MX-SPC3
- Junos OS Release 21.1R1
Configuration
To configure the DNS ALG application on the MX-SPC3 service card, perform these tasks:
-
Set the application.
[edit] user@host# set application application-name application-protocol protocol-name
-
Configuring service set.
[edit] user@host# set services service-set ss1 syslog mode event
user@host# set services service-set ss1 syslog mode event
-
3. Configure a service set using the NAT rule.
[edit] user@host# set services service-set ss1 nat-rule-sets src_nat_rule_set1
user@host# set services service-set ss1 nat-rule-sets dst_nat_rule_set1
user@host# set services service-set ss1 interface-service service-interface vms-2/0/0.0
-
Specify NAT pool and rule information.
[edit] user@host# set services nat source pool source_pool1 address 100.0.0.0/24
user@host# set services nat source rule-set src_nat_rule_set1 rule source_nat_rule1 match source-address 2000::/64
user@host# set services nat source rule-set src_nat_rule_set1 rule source_nat_rule1 match destination-address 0.0.0.0/0
user@host# set services nat source rule-set src_nat_rule_set1 rule source_nat_rule1 match application dns_alg
user@host# set services nat source rule-set src_nat_rule_set1 rule source_nat_rule1 then source-nat pool source_pool1
user@host# set services nat source rule-set src_nat_rule_set1 rule source_nat_rule1 then syslog
user@host# set services nat source rule-set src_nat_rule_set1 match-direction input
user@host# set services nat destination rule-set dst_nat_rule_set1 rule dst_nat_rule1 match source-address 2000::/64
user@host# set services nat destination rule-set dst_nat_rule_set1 rule dst_nat_rule1 match destination-address 6000::/96
user@host# set services nat destination rule-set dst_nat_rule_set1 rule dst_nat_rule1 match application dns_alg
user@host# set services nat destination rule-set dst_nat_rule_set1 rule dst_nat_rule1 then destination-nat destination-prefix 6000::/96
user@host# set services nat destination rule-set dst_nat_rule_set1 rule dst_nat_rule1 then syslog
user@host# set services nat destination rule-set dst_nat_rule_set1 match-direction input
-
Configure the interfaces.
[edit] user@host# set interfaces vms-2/0/0 unit 0 family inet
user@host# set interfaces vms-2/0/0 unit 0 family inet6
Result
[edit] user@host# show services service-set ss1 { syslog { mode event; local-category all; } nat-rule-sets src_nat_rule_set1; nat-rule-sets dst_nat_rule_set1; interface-service { service-interface vms-2/0/0.0; } } nat { source { pool source_pool1 { address { 100.0.0.0/24; } } rule-set src_nat_rule_set1 { rule source_nat_rule1 { match { source-address 2000::/64; destination-address 0.0.0.0/0; application dns_alg; } then { source-nat { pool { source_pool1; } } syslog; } } match-direction input; } } destination { rule-set dst_nat_rule_set1 { rule dst_nat_rule1 { match { source-address 2000::/64; destination-address 6000::/96; application dns_alg } then { destination-nat { destination-prefix 6000::/96; } syslog; } } match-direction input; } } }