Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Configuring NAT in Mixed IPv4 and IPv6 Networks

The following example shows NAT configuration in a network that combines IPv4 and IPv6 addressing.

interfaces {sp-2/0/0 {traceoptions {flag all;}services-options {syslog {host local {services any;log-prefix IPV6-SS;}}inactivity-timeout 200;}unit 0 {family inet;family inet6;}unit 1 {family inet;family inet6;}unit 1001 {family inet;family inet6;}}so-2/1/0 {description "services-art1 201/1";encapsulation ppp;sonet-options {fcs 32;}unit 0 {family inet {address 192.168.1.1/30;}family inet6 {service {input {service-set ss-ipv6;}output {service-set ss-ipv6;}}address 3ffe::1:1/64;}}}so-2/1/3 {description "services-art1 201/2";encapsulation ppp;sonet-options {fcs 32;}unit 0 {family inet {address 192.168.1.1/30;}family inet6 {address 4ffe::1:1/64;}}}}routing-options {rib inet6.0 {static {route 5ffe::0:0/64 next-hop 3ffe::1:1;route 6ffe::0:0/64 next-hop 4ffe::1:1;route 192::168:1:0/112 next-hop 4ffe::1:2;}}}services {service-set ss-ipv6 {stateful-firewall-rules test-ipv6;nat-rules src-nat;nat-rules src-nat-v6;interface-service {service-interface sp-2/0/0;}}stateful-firewall {rule test-ipv6 {match-direction input-output;term 1 {from {source-address {any-unicast;}}then {accept;}}}}nat {pool dst_pool {address 192.168.1.2/32;}pool src_pool {address 192.168.1.0/27;port automatic;}pool dst_pool_v6 {address 192::168:1:2/128;}pool src_pool_v6 {address 192::168:1:2/100;}rule src-nat {match-direction input;term t1 {from {source-address {3ffe::0:0/96;}destination-address {4ffe::1:2/128;}}then {translated {source-pool src_pool;destination-pool dst_pool;translation-type {source dynamic;destination static;}}}}}rule src-nat-v6 {match-direction input;term t1 {from {source-address {5ffe::0:0/96;}destination-address {6ffe::1:2/128;}}then {translated {source-pool src_pool_v6;destination-pool dst_pool_v6;translation-type {source static;destination static;}}}}}}}

Published: 2012-11-28

Supported Platforms

Published: 2012-11-28