2
1

Junos(SRX)でDS-Liteを使用してみる ver 2023

Posted at

以前、Junos 22.2R1で実装されたIPv4 over IPv6機能を用いてJuniper SRXシリーズでDS-Liteを使う際の設定を紹介しました。

Junos 23.2R1において、さらにFQDNでトンネル接続先アドレスを指定したり、トンネルソースアドレスを指定したインターフェイスから取得する機能をサポートしました(ドキュメント)。

今回はこの機能を使用したDS-Liteの設定例を紹介しようと思います。

DS-Liteの設定例

主な設定としては以前と同様ですが、source-interfaceおよびdestination-hostnameを使用することでアドレス変更に自動的に追従することが可能となりました。ホスト名やインターフェイス名からはアドレスファミリーを一意に定めることができないため、encap-typeでアドレスファミリ(ipv4/ipv6)を明示的に指定する必要があります。

set interfaces ge-0/0/0 unit 0 family inet6 address 2001:db8:1000::2/64
set interfaces ip-0/0/0 unit 0 tunnel encap-type ipv6
set interfaces ip-0/0/0 unit 0 tunnel source-interface ge-0/0/0.0
set interfaces ip-0/0/0 unit 0 tunnel destination-hostname aftr.example.net
set interfaces ip-0/0/0 unit 0 family inet
set routing-options rib inet6.0 static route ::/0 next-hop 2001:db8:1000::1
set routing-options static route 0.0.0.0/0 next-hop ip-0/0/0.0

RAでアドレスを取得する場合は以下のようになります。

set interfaces ge-0/0/0 unit 0 family inet6 dhcpv6-client client-type autoconfig
set interfaces ge-0/0/0 unit 0 family inet6 dhcpv6-client client-ia-type ia-na
set interfaces ge-0/0/0 unit 0 family inet6 dhcpv6-client client-identifier duid-type duid-ll
set interfaces ge-0/0/0 unit 0 family inet6 dhcpv6-client update-server
set interfaces ip-0/0/0 unit 0 tunnel encap-type ipv6
set interfaces ip-0/0/0 unit 0 tunnel source-interface ge-0/0/0.0
set interfaces ip-0/0/0 unit 0 tunnel destination-hostname gw.example.jp
set interfaces ip-0/0/0 unit 0 family inet
set protocols router-advertisement interface ge-0/0/0.0 passive-mode
set routing-options static route 0.0.0.0/0 next-hop ip-0/0/0.0

このように、IPv6アドレスの変動やDS-Lite AFTRのアドレス変更等にも追従できるようになり、利用できるシーンが広がりました。

試してはいませんが、似たような設定で固定IPサービスについても対応できると思います。固定IPサービスの場合、ip-0/0/0.0に使用するIPアドレスを指定したり、定期的にHTTPリクエストを叩いたりする設定が必要になると思われます。定期的なHTTPリクエストはevent-optionsないしrpmにて構成することが可能です。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1