6to4 软线
配置 6to4 提供商管理的隧道
配置 6to4 提供商管理的隧道 (PMT) 时,请将任播目标替换为提供商网络中托管中继的地址。
M 系列路由器上的多服务 100、400 和 500 PIC 以及配备多服务 DPC 的 MX 系列路由器支持 6to4 隧道。带有 MS-MPC 或 MS-MIC 的 MX 系列路由器不支持 6to4 隧道。
要配置 6 到 4 PMT:
- 为 6to4 流量配置入口接口。包括用于标识此接口上的输入和输出服务规则的服务集的名称。
[edit interfaces ge-0/2/1] user@host# set unit logical-unit-number family family service input service-set-name user@host# set unit logical-unit-number family family service output service-set-name user@host# set unit logical-unit-number family family address addres
例如:
[edit interfaces ge-0/2/1] user@host# set unit 0 family inet service input service-set v6to4-pmt user@host# set unit 0 family inet service output service-set v6to4-pmt user@host# set unit 0 family inet address 130.130.130.1/24
- 配置出口接口。
[edit interfaces ge-0/2/2] user@host# set unit logical-unit-number family family address address
例如:
[edit interfaces ge-0/2/2] user@host# set unit 0 family inet6 address 4ABC::1/16
- 配置包含传入流量处理规则的服务接口。包括系统日志选项并关联逻辑单元。
[edit interfaces sp-2/0/0] user@host# edit services-options syslog host host-name services any user@host# edit unit logical-unit-number family family user@host# edit unit 0 family family
例如:
[edit interfaces sp-2/0/0] user@host# set services-options syslog host local services any user@host# set unit 0 family inet user@host# set unit 0 family inet6
- 为 6to4 配置软线集中器和软线规则。在 Junos OS 中,6to4 PMT 配置使用与 6rd 相同的选项。
[edit services softwire softwire-concentrator v6rd v6to4] user@host# set softwire-address softwire-addres user@host# set ipv4-prefix ipv4-prefix user@host# set v6rd-prefix v6rd-prefix user@host# set mtu-v4 mtu-v4
例如:
[edit services softwire softwire-concentrator v6rd v6to4] user@host# set softwire-address 192.88.99.1 user@host# set ipv4-prefix 130.130.130.2/32 user@host# set v6rd-prefix 2002::0/16 user@host# set mtu-v4 9192
- 定义将处理入口接口上的流量的软线规则。
[edit services softwire rule v6to4-r1] user@host# set match-direction input user@host# set term term-name then v6rd softwire-concentrator
例如:
[edit services softwire rule v6to4-r1] user@host# set match-direction input user@host# set term t1 then v6rd v6to4
- 定义接受入口接口上所有传入流量的有状态防火墙规则。
[edit services stateful-firewall rule sfw-r1] user@host# set match-direction direction user@host# set term term-name then accept user@host# set term term-name then syslog
例如:
[edit services stateful-firewall rule sfw-r1] user@host# set match-direction input-output user@host# set term t1 then accept user@host# set term t1 then syslog
- 定义要用于 IPv6 NAT 转换的 NAT 池。此池支持将 Anycast 6to4 中继地址转换为提供程序管理的中继上的地址。
[edit services nat pool v6to4-pmt] user@host# set address address user@host# port automatic
例如:
[edit services nat pool v6to4-pmt] user@host# set address 3ABC::1/128 user@host# set port automatic
- 定义用于转换的 NAT 规则。
[edit services nat rule rule-name] user@host# set match-direction input user@host# set term term-name then translated source-pool pool-name user@host# set term t1 then translated translation-type translation-type
例如:
[edit services nat rule v6to4-pmt-r1] user@host# set match-direction input user@host# set term t1 then translated source-pool v6to4-pmt user@host# set term t1 then translated translation-type napt-66
- 定义指定软连线规则和 NAT 规则的服务集。
[edit services service-set v6to4-pmt] user@host# set softwire-rules rule-name user@host# set stateful-firewall-rules rule-name user@host# set nat-rules rule-name user@host# set interface-service service-interface interface-name
例如:
[edit services service-set v6to4-pmt] user@host# set softwire-rules v6to4-r1 user@host# set stateful-firewall-rules sfw-r1 user@host# set nat-rules v6to4-pmt-r1 user@host# set interface-service service-interface sp-2/0/0