Examples: Configuring 6rd Softwires
This topic consists of the following sections:
Configuring a 6rd Concentrator for IPv6 Internet Connectivity
This example describes how a 6rd concentrator can be configured for a 6rd domain, D1, to provide IPv6 Internet connectivity.
- Configure the softwire concentrator and softwire rule.[edit services]softwire-concentrator {v6rd v6rd-dom1 {softwire-address 30.30.30.1;ipv4-prefix 10.10.10.0/24;v6rd-prefix 3040::0/16;mtu-v4 9192;}}rule v6rd-dom1-r1 {match-direction input;term t1 {then {v6rd v6rd-dom1;}}}
Here, softwire-address 30.30.30.1 is the softwire concentrator IPv4 address, 10.10.10.0/24 is the IPv4 prefix of the CE WAN side, and 3040::0/16 is the IPv6 prefix of the 6rd domain D1.
- Define a stateful firewall rule.[edit services stateful-firewall]rule r1 {match-direction input-output;term t1 {then {accept;}}}
You must configure a stateful-firewall rule that accepts all traffic in both the input and output direction in order for 6rd to work; however, this is not enforced through the CLI. This is because in IPv6, gratuitous IPv6 packets are expected (due to anycast) and should not be dropped. The service PIC can handle reverse traffic without seeing forward traffic all. This can also happen in the case of service PIC switchover in the middle of a session. By default, the stateful firewall on the service PIC will drop all traffic unless a rule is configured explicitly to allow it.
Configuring 6rd and DS-Lite in the Same Service Set
This example describes how 6rd can be configured with DS-Lite on the same PIC and in the same service set.
- Configure the ingress interface.[edit interfaces]ge-1/2/0 {unit 0 {family inet {service {input {service-set v6rd-dslite-service-set;}output {service-set v6rd-dslite-service-set;}}address 10.10.10.1/24;}family inet6 {service {input {service-set v6rd-dslite-service-set;}output {service-set v6rd-dslite-service-set;}}address 2001::1/16;}}}
Here the service set is applied on the inet (IPv4) and inet6 (IPv6) families of subunit 0. Both DS-Lite IPv6 traffic and 6rd IPv4 traffic hits the service filter and is sent to the services PIC.
- Configure the egress interface (IPv6 internet).[edit interfaces]ge-1/2/2 {unit 0 {family inet {address 200.200.200.1/24;}family inet6 {address 3ABC::1/16;}}}
The IPv4 server that the DS-Lite clients are trying to reach is at 200.200.200.2/24 and the IPv6 server is at 3ABC::2/16.
- Configure the services PIC.[edit interfaces}sp-3/0/0 {unit 0 {family inet;family inet6;}}
- Configure the service set.[edit services]service-set v6rd-dslite-service-set {softwire-rules v6rd-r1;softwire-rules dslite-r1;stateful-firewall-rules r1;nat-rules dslite-nat-r1;interface-service {service-interface sp-3/0/0;}}
This service set has a stateful firewall rule and 6rd rule for 6rd service. The service set also includes a softwire rule for DS-Lite and a NAT rule to perform address translation for all the DS-Lite traffic. The NAT rule performs NAPT translation in the forward direction on the source address and port of the DS-Lite traffic.
- Configure the softwire concentrators.[edit services softwire-concentrators]softwire-concentrator {ds-lite ds1 {softwire-address 1001::1;mtu-v6 9192;}v6rd v6rd-dom1 {softwire-address 30.30.30.1;ipv4-prefix 10.10.10.0/24;v6rd-prefix 3040::0/16;mtu-v4 9192;}}
- Edit the softwire rules.[edit services softwire]rule v6rd-r1 {match-direction input;term t1 {then {v6rd v6rd-dom1;}}}rule v6rd-r1 {match-direction input;term t1 {then {v6rd v6rd-dom1;}}}rule dslite-r1 {match-direction input;term dslite-t1 {then {ds-lite ds1;}}
The following routes are added by the services pic daemon on the Routing Engine.
user@router# run show route 30.30.30.1inet.0: 43 destinations, 46 routes (42 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 30.30.30.1/32 *[Static/786432] 00:24:11 Service to v6rd-dslite-service-set [edit] user@router# run show route 3040::0/16 inet6.0: 23 destinations, 33 routes (23 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 3040::/16 *[Static/786432] 00:24:39 Service to v6rd-dslite-service-setuser@router# run show route 1001::1inet6.0: 33 destinations, 43 routes (33 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 1001::1/128 *[Static/1] 1w2d 22:05:41 Service to v6rd-dslite-service-set - Configure a stateful firewall rule.[edit services stateful-firewall]rule r1 {match-direction input-output;term t1 {then {accept;}}}
- Configure NAT for DS-Lite.[edit services nat]pool dslite-pool {address-range low 33.33.33.1 high 33.33.33.32;port {automatic;}}rule dslite-nat-r1 {match-direction input;term dslite-nat-t1 {from {source-address {20.20.0.0/16;}}then {translated {source-pool dslite-pool;translation-type {source dynamic;}}}}}
Because of this NAT rule, the following NAT routes are installed for the reverse DS-Lite traffic.
user@router# user@router# run show route 33.33.33.0/24 show route 33.33.33.0/24inet.0: 48 destinations, 52 routes (47 active, 0 holddown, 1 hidden) + = Active Route, - = Last Active, * = Both 33.33.33.1/32 *[Static/1] 1w2d 23:08:38 Service to v6rd-dslite-service-set 33.33.33.2/31 *[Static/1] 1w2d 23:08:38 Service to v6rd-dslite-service-set 33.33.33.4/30 *[Static/1] 1w2d 23:08:38 Service to v6rd-dslite-service-set 33.33.33.8/29 *[Static/1] 1w2d 23:08:38 Service to v6rd-dslite-service-set 33.33.33.16/28 *[Static/1] 1w2d 23:08:38 Service to v6rd-dslite-service-set 33.33.33.32/32 *[Static/1] 1w2d 23:08:38 Service to v6rd-dslite-service-set The NAT rule will do NAPT the traffic coming from 20.20.0.0/16 to public address range 33.33.33.1 to 33.33.33.32