SR-TTE (SR-TEではなく) という技術を使ったトラフィック輻輳回避の説明がJuniperのTechPostにあったので、その内容をネットワークシミュレータを用いて実際に動作させてみました。
※自分で調べた内容をもとにまとめています。誤りが含まれている可能性がありますので、参考程度にご覧いただき、正確な情報は公式ドキュメント等をご確認ください!
SR-TTE の内容と特徴
-
SR-TTE(Segment Routing Tactical Traffic Engineering)とは
- 一時的なトラフィック輻輳をリアルタイムで解消するソリューション
- ルーター内部で動作し、外部コントローラーに依存しない
主な特徴
-
リアルタイム輻輳検出と対応
- トラフィック急増など一時的な輻輳に対しリアルタイム対応
- データプレーンでの輻輳を検出
- 輻輳解消後、自動的に通常経路へ戻す
-
シンプルかつ効率的
- 事前のトンネル設定不要、外部コントローラー不要
- 追加ラベルやオーバーヘッドなし
- 輻輳時の迂回先は、TI-LFA の SR のバックアップパスを利用
- TI-LFA は超ざっくり言うと、Segment Routingのネットワークで、あらかじめバックアップルートを準備して、停止時に高速切替してくれる仕組み
ChatGPTさんに教えてもらった SR-TE との比較は以下のとおりです
項目 | SR-TE | SR-TTE |
---|---|---|
制御方式 | プロアクティブ(事前設定) | リアクティブ(反応的) |
誰が決める | コントローラ | ルータ自律 |
対象 | 事前に決めたポリシー | その場の輻輳対応 |
今回の環境
ネットワークシュミレータ上では以下のような構成にしました。
イメージとして以下のような構成です
ざっくりと以下の内容となります
- P ルータなしの PEルータ2台の構成
- IGP に ISIS を利用した MPLS の Segment Routing
- テスター間を L2 で接続するため、EVPN で L2VPN を構成
- PE ルータ間を複数本接続して、複数経路をつくる
- PE ルータとして vJunos-Router を利用
- version 24.2R1-S2.5
- 輻輳させるためのトラフィックを流すためテスターとして Ixia-c を利用
vJunos-Router については、EVE-NGの場合は以下のサイトを参考にしてください
Ixia-c については、過去記事参考にしてください
構築手順
vJunos-Router のコンフィグ
コンフィグについて、ISISのSR-MPLSは以下のサイトを参考にしながら設定しました
まずは、SR-MPLSとEVPNまで設定します、TI-LFAについては、この後で別途設定します。
以下の構成で設定しました
全体のコンフィグは以下のとおりです。
vJunosRouter-1
# 0.基本設定 rootパスワードは仮で root123 にしてます
set version 24.2R1-S2.5
set system host-name vJunosRouter-1
set system root-authentication encrypted-password "$6$A7p8bCxI$DIXeNbvC/onERCe9x41n7RFdMeXgT.ugGVuXsK3vX9loVBL0z8leqseLQq/g80opuKJDMFgadTyRHGuqQaQ8d."
set system syslog file interactive-commands interactive-commands any
set system syslog file messages any notice
set system syslog file messages authorization info
set policy-options policy-statement LOAD_BALANCE then load-balance per-flow
set routing-options forwarding-table export LOAD_BALANCE
# 1.IF関連設定 わざと帯域を小さく見せるため10M-IF設定、また、ISISとMPLSを利用するIFのため、 family に iso と mpls 設定、router-id は loopbak のアドレスを利用
set interfaces ge-0/0/1 speed 10m
set interfaces ge-0/0/1 unit 0 family inet address 10.91.0.0/31
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 speed 10m
set interfaces ge-0/0/2 unit 0 family inet address 10.92.0.0/31
set interfaces ge-0/0/2 unit 0 family iso
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.0.1/32
set interfaces lo0 unit 0 family iso address 49.0001.0100.0000.0001.00
set routing-options router-id 10.0.0.1
# 2.ISIS関連 ge-0/0/1のが優先になるようにmetricに差をつける
set protocols isis interface ge-0/0/1.0 level 2 metric 100
set protocols isis interface ge-0/0/1.0 point-to-point
set protocols isis interface ge-0/0/2.0 level 2 metric 200
set protocols isis interface ge-0/0/2.0 point-to-point
set protocols isis interface lo0.0 passive
set protocols isis level 1 disable
set protocols isis level 2 wide-metrics-only
# 3.SR-MPLS関連 SRGBを16000~23999(8000個)に変更、vJunosRouterではSRGBを変えるためにはenhanced-ipの設定要、Node-SIDはvJunosRouter-1:16001(16000+ipv4-index 1)、vJunosRouter-2:16002(16000+ipv4-index 2)に設定
set chassis network-services enhanced-ip
set protocols isis source-packet-routing srgb start-label 16000
set protocols isis source-packet-routing srgb index-range 8000
set protocols isis source-packet-routing node-segment ipv4-index 1
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
# 4.EVPN関連 2台でお互いネイバー接続しEVPNのシグナリングさせる、次にテスター側のIFにVLAN;100を設定、EVPNのL2VPN用のVRF(routing-instances)を作成してテスター間をL2VPNでつなげる
set routing-options autonomous-system 65000
set protocols bgp group MP_BGP_EVPN type internal
set protocols bgp group MP_BGP_EVPN local-address 10.0.0.1
set protocols bgp group MP_BGP_EVPN family evpn signaling
set protocols bgp group MP_BGP_EVPN neighbor 10.0.0.2
set interfaces ge-0/0/0 flexible-vlan-tagging
set interfaces ge-0/0/0 encapsulation flexible-ethernet-services
set interfaces ge-0/0/0 unit 100 encapsulation vlan-bridge
set interfaces ge-0/0/0 unit 100 vlan-id 100
set routing-instances EVPN_L2VPN_VLAN100 instance-type evpn
set routing-instances EVPN_L2VPN_VLAN100 protocols evpn control-word
set routing-instances EVPN_L2VPN_VLAN100 interface ge-0/0/0.100
set routing-instances EVPN_L2VPN_VLAN100 route-distinguisher 10.0.0.1:100
set routing-instances EVPN_L2VPN_VLAN100 vrf-target target:65001:100
vJunosRouter-2
# 0.基本設定 rootパスワードは仮で root123 にしてます
set version 24.2R1-S2.5
set system host-name vJunosRouter-2
set system root-authentication encrypted-password "$6$A7p8bCxI$DIXeNbvC/onERCe9x41n7RFdMeXgT.ugGVuXsK3vX9loVBL0z8leqseLQq/g80opuKJDMFgadTyRHGuqQaQ8d."
set system syslog file interactive-commands interactive-commands any
set system syslog file messages any notice
set system syslog file messages authorization info
set policy-options policy-statement LOAD_BALANCE then load-balance per-flow
set routing-options forwarding-table export LOAD_BALANCE
# 1.IF関連設定 わざと帯域を小さく見せるため10M-IF設定、また、ISISとMPLSを利用するIFのため、 family に iso と mpls 設定、router-id は loopbak のアドレスを利用
set interfaces ge-0/0/1 speed 10m
set interfaces ge-0/0/1 unit 0 family inet address 10.91.0.1/31
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 speed 10m
set interfaces ge-0/0/2 unit 0 family inet address 10.92.0.1/31
set interfaces ge-0/0/2 unit 0 family iso
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.0.2/32
set interfaces lo0 unit 0 family iso address 49.0001.0100.0000.0002.00
set routing-options router-id 10.0.0.2
# 2.ISIS関連 ge-0/0/1のが優先になるようにmetricに差をつける
set protocols isis interface ge-0/0/1.0 level 2 metric 100
set protocols isis interface ge-0/0/1.0 point-to-point
set protocols isis interface ge-0/0/2.0 level 2 metric 200
set protocols isis interface ge-0/0/2.0 point-to-point
set protocols isis interface lo0.0 passive
set protocols isis level 1 disable
set protocols isis level 2 wide-metrics-only
# 3.SR-MPLS関連 SRGBを16000~23999(8000個)に変更、vJunosRouterではSRGBを変えるためにはenhanced-ipの設定要、Node-SIDはvJunosRouter-1:16001(16000+ipv4-index 1)、vJunosRouter-2:16002(16000+ipv4-index 2)に設定
set chassis network-services enhanced-ip
set protocols isis source-packet-routing srgb start-label 16000
set protocols isis source-packet-routing srgb index-range 8000
set protocols isis source-packet-routing node-segment ipv4-index 2
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
# 4.EVPN関連 2台でお互いネイバー接続しEVPNのシグナリングさせる、次にテスター側のIFにVLAN;100を設定、EVPNのL2VPN用のVRF(routing-instances)を作成してテスター間をL2VPNでつなげる
set routing-options autonomous-system 65000
set protocols bgp group MP_BGP_EVPN type internal
set protocols bgp group MP_BGP_EVPN local-address 10.0.0.2
set protocols bgp group MP_BGP_EVPN family evpn signaling
set protocols bgp group MP_BGP_EVPN neighbor 10.0.0.1
set interfaces ge-0/0/0 flexible-vlan-tagging
set interfaces ge-0/0/0 encapsulation flexible-ethernet-services
set interfaces ge-0/0/0 unit 100 encapsulation vlan-bridge
set interfaces ge-0/0/0 unit 100 vlan-id 100
set routing-instances EVPN_L2VPN_VLAN100 instance-type evpn
set routing-instances EVPN_L2VPN_VLAN100 protocols evpn control-word
set routing-instances EVPN_L2VPN_VLAN100 interface ge-0/0/0.100
set routing-instances EVPN_L2VPN_VLAN100 route-distinguisher 10.0.0.2:100
set routing-instances EVPN_L2VPN_VLAN100 vrf-target target:65001:100
今回のSR-TTEの動作確認のために以下の2点を設定してます
①トラフィック輻輳させるため、IF速度をわざと小さく設定(10M-IF)
set interfaces ge-0/0/1 speed 10m
set interfaces ge-0/0/2 speed 10m
②ge-0/0/1.0
を優先的に通すため、メトリックをge-0/0/1.0
とge-0/0/2.0
で差をつけて設定
set protocols isis interface ge-0/0/1.0 level 2 metric 100
set protocols isis interface ge-0/0/2.0 level 2 metric 200
動作確認
1.まずは普通の設定で疎通確認
テスターの準備
まずは、テスター間で疎通する確認します。
以下の過去記事と同じ手順で、以下の手順でトラフィックを流す python スクリプト作成します
今回用に変更した部分の抜粋は以下となります。
# 測定時間は、双方向とも60秒間
flow1.duration.fixed_seconds.seconds = 60
flow2.duration.fixed_seconds.seconds = 60
# 送信レートは、 vJunosRouter-1 → vJunosRouter-2 の方向は150kbps、反対方向は、ルーターにMACアドレス学習させるために 1pps で流す
flow1.rate.kbps = 150
flow2.rate.pps = 1
# VLAN 100 の CoS 0
vlan1.id.value = 100
vlan1.priority.value = 0
vlan2.id.value = 100
vlan2.priority.value = 0
# MACアドレスとUDPポート番号は固定
eth1.src.value = '00:00:00:00:00:aa'
eth1.dst.value = '00:00:00:00:00:bb'
udp1.src_port.value = 50000
udp1.dst_port.value = 60000
eth2.src.value = '00:00:00:00:00:bb'
eth2.dst.value = '00:00:00:00:00:aa'
udp2.src_port.value = 60000
udp2.dst_port.value = 50000
# IP アドレスは vJunosRouter-1 → vJunosRouter-2 の方向だけ送信元IPアドレスを100個でインクリメント
ip1.src.increment.start = '192.168.99.1'
ip1.src.increment.step = '0.0.0.1'
ip1.src.increment.count = 100
ip1.dst.value = '192.168.99.254'
ip2.src.value = '192.168.99.254'
ip2.dst.value = '192.168.99.1'
全体のスクリプト内容は以下の通りです。
traffic-vlan100-1.py
import snappi # snappiライブラリをインポート(OTG APIを使うため)
import time # 時間管理用の標準ライブラリをインポート
# OTG サーバ(Ixia-c CE)への接続を初期化(証明書検証は無効)
api = snappi.api(location='https://localhost:8443', verify=False)
# 新しいコンフィグを作成
cfg = api.config()
# ポート定義:ポートp1とp2をローカルの特定ポート番号に割り当てる
p1 = cfg.ports.port(name='p1', location='localhost:5555')[-1]
p2 = cfg.ports.port(name='p2', location='localhost:5556')[-1]
#---------------------------
# フロー1を作成(p1→p2の通信)
#---------------------------
flow1 = cfg.flows.flow(name='p1-p2')[-1]
flow1.tx_rx.port.tx_name = p1.name # 送信元ポートをp1に設定
flow1.tx_rx.port.rx_names = [p2.name] # 受信先ポートをp2に設定
flow1.duration.fixed_seconds.seconds = 60 # 送信時間で測定を止める
flow1.rate.kbps = 150 # 送信速度:kbps
flow1.size.fixed = 500 # パケットサイズ
flow1.metrics.enable = True # メトリクス(統計情報)を有効化
flow1.metrics.loss = False # パケット損失計測は無効
flow1.metrics.timestamps = False # タイムスタンプ計測は無効
# パケットの構造定義
eth1, vlan1, ip1, udp1 = flow1.packet.ethernet().vlan().ipv4().udp()
eth1.src.value = '00:00:00:00:00:aa' # 送信元MACアドレス
eth1.dst.value = '00:00:00:00:00:bb' # 宛先MACアドレス
vlan1.id.value = 100 # VLAN (VLAN-ID)
vlan1.priority.value = 0 # VLAN (Priority:CoS)
#ip1.src.value = '192.168.99.1'
ip1.src.increment.start = '192.168.99.1' # 送信元IPアドレス、スタートするアドレス
ip1.src.increment.step = '0.0.0.1' # 送信元IPアドレス、増加量を指定(いくつずつ増やすか)
ip1.src.increment.count = 100 # 送信元IPアドレス、いくつのアドレスを生成するか(繰り返す数)を指定
ip1.dst.value = '192.168.99.254' # 宛先IPアドレス
udp1.src_port.value = 50000 # 送信元UDPポート
udp1.dst_port.value = 60000 # 宛先UDPポート
#---------------------------
# フロー2を作成(p2→p1の通信)
#---------------------------
flow2 = cfg.flows.flow(name='p2-p1')[-1]
flow2.tx_rx.port.tx_name = p2.name
flow2.tx_rx.port.rx_names = [p1.name]
flow2.duration.fixed_seconds.seconds = 60 # 送信時間で測定を止める
flow2.rate.pps = 1
flow2.size.fixed = 500
flow2.metrics.enable = True
flow2.metrics.loss = False
flow2.metrics.timestamps = False
# パケット構造(flow1と逆方向の通信)
eth2, vlan2, ip2, udp2 = flow2.packet.ethernet().vlan().ipv4().udp()
eth2.src.value = '00:00:00:00:00:bb'
eth2.dst.value = '00:00:00:00:00:aa'
vlan2.id.value = 100
vlan2.priority.value = 0
ip2.src.value = '192.168.99.254'
ip2.dst.value = '192.168.99.1'
udp2.src_port.value = 60000
udp2.dst_port.value = 50000
#---------------------------
# コンフィグ内容をOTGサーバに送信して適用
#---------------------------
api.set_config(cfg)
# トラフィック送信を開始する関数
def start_traffic():
ctrl = api.control_state()
ctrl.choice = ctrl.TRAFFIC
ctrl.traffic.choice = ctrl.traffic.FLOW_TRANSMIT
ctrl.traffic.flow_transmit.state = ctrl.traffic.flow_transmit.START
api.set_control_state(ctrl)
# トラフィック送信を停止する関数
def stop_traffic():
ctrl = api.control_state()
ctrl.choice = ctrl.TRAFFIC
ctrl.traffic.choice = ctrl.traffic.FLOW_TRANSMIT
ctrl.traffic.flow_transmit.state = ctrl.traffic.flow_transmit.STOP
api.set_control_state(ctrl)
# メトリクス取得のためのリクエストオブジェクトを作成
mreq = api.metrics_request()
mreq.flow.flow_names = [flow1.name, flow2.name] # 対象フローを指定
# トラフィックの送信を開始
start_traffic()
print('--- Traffic started. Press Ctrl+C to stop; metrics will update below. ---')
# コンソールにリアルタイムでメトリクスを表示(上書き更新方式)# コンソールにリアルタイムでメトリクスを表示(上書き更新方式)
prev_lines = 0
try:
while True:
metrics = api.get_metrics(mreq) # メトリクスを取得
# 前回表示した行数分、カーソルを上に戻して上書き
if prev_lines:
print(f"\033[{prev_lines}A", end='')
# 出力内容を構築
output_lines = []
#output_lines.append(f"Time: {time.strftime('%H:%M:%S')}") # 現在時刻
for fm in metrics.flow_metrics:
output_lines.append(
f"Flow {fm.name}: "
f"tx_frames={fm.frames_tx} ({fm.frames_tx_rate:.0f}pps), "
f"rx_frames={fm.frames_rx} ({fm.frames_rx_rate:.0f}pps)"
)
# 出力&行数カウント
for line in output_lines:
print(line)
prev_lines = len(output_lines)
time.sleep(1) # 1秒ごとに更新
except KeyboardInterrupt:
# Ctrl+Cで停止時の処理
print('Stopping traffic...')
stop_traffic()
print('Traffic stopped.')
流してみる
テスターの Ixia-c からトラフィックを以下の通り流すとFlow p1-p2
の Flow で送受信ができているのでEVPNのL2VPNを経由してトラフィックが流せていることが確認できます。
# python3 ./traffic-vlan100-1.py
2025-05-03 07:15:54 [snappi.snappi] [WARNING] Certificate verification is disabled
--- Traffic started. Press Ctrl+C to stop; metrics will update below. ---
Flow p1-p2: tx_frames=182 (36pps), rx_frames=182 (36pps)
Flow p2-p1: tx_frames=6 (1pps), rx_frames=6 (1pps)
この状態で、vJunosRouter-1 で送受信レートを確認、2本のポートのうちge-0/0/1
からすべて送信されていることを確認。(ISISのメトリックがge-0/0/2
よりge-0/0/1
のほうが小さいため)
root@vJunosRouter-1> show interfaces ge-0/0/[0-2] | match "Physical interface|rate"
Physical interface: ge-0/0/0, Enabled, Physical link is Up
Input rate : 142408 bps (35 pps) <---- テスターとの接続ポート ge-0/0/0 で入力がある
Output rate : 3896 bps (0 pps)
Physical interface: ge-0/0/1, Enabled, Physical link is Up
Input rate : 3960 bps (0 pps)
Output rate : 143648 bps (35 pps) <---- vJunosRouter-2 向けは ge-0/0/1 から出力される
Physical interface: ge-0/0/2, Enabled, Physical link is Up
Input rate : 0 bps (0 pps)
Output rate : 96 bps (0 pps) <---- vJunosRouter-2 向けは ge-0/0/2 から出力されない
root@vJunosRouter-1>
EVPNのルートをみても、MACアドレスが00:00:00:00:00:bb
向けについてはge-0/0/1.0
向けであることが確認できます
root@vJunosRouter-1> show route table EVPN_L2VPN_VLAN100.evpn.0
EVPN_L2VPN_VLAN100.evpn.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2:10.0.0.1:100::0::00:00:00:00:00:aa/304 MAC/IP
*[EVPN/170] 00:01:02
Indirect
2:10.0.0.2:100::0::00:00:00:00:00:bb/304 MAC/IP <--- MAC 00:00:00:00:00:bb 向けルート
*[BGP/170] 00:01:02, localpref 100, from 10.0.0.2
AS path: I, validation-state: unverified
> to 10.91.0.1 via ge-0/0/1.0, Push 257 <--- ★ ge-0/0/1.0 向けとなっている
3:10.0.0.1:100::0::10.0.0.1/248 IM
*[EVPN/170] 00:05:26
Indirect
3:10.0.0.2:100::0::10.0.0.2/248 IM
*[BGP/170] 00:04:46, localpref 100, from 10.0.0.2
AS path: I, validation-state: unverified
> to 10.91.0.1 via ge-0/0/1.0
root@vJunosRouter-1>
2.TI-LFA の設定をいれてバックアップルートを確認
次に、以下の TI-LFA のを追加してルートを確認
set protocols isis backup-spf-options use-post-convergence-lfa
set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa
set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa
EVPNのルートを確認すると、バックアップルートとしてge-0/0/2.0
が追加されていることがわかります
root@vJunosRouter-1> show route table EVPN_L2VPN_VLAN100.evpn.0
EVPN_L2VPN_VLAN100.evpn.0: 4 destinations, 4 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2:10.0.0.1:100::0::00:00:00:00:00:aa/304 MAC/IP
*[EVPN/170] 00:03:00
Indirect
2:10.0.0.2:100::0::00:00:00:00:00:bb/304 MAC/IP <--- MAC 00:00:00:00:00:bb 向けルート
*[BGP/170] 00:03:00, localpref 100, from 10.0.0.2
AS path: I, validation-state: unverified
> to 10.91.0.1 via ge-0/0/1.0, Push 257
to 10.92.0.1 via ge-0/0/2.0, Push 257 <--- ★ ge-0/0/2.0 向けがバックアップルートとして追加
3:10.0.0.1:100::0::10.0.0.1/248 IM
*[EVPN/170] 00:07:24
Indirect
3:10.0.0.2:100::0::10.0.0.2/248 IM
*[BGP/170] 00:06:44, localpref 100, from 10.0.0.2
AS path: I, validation-state: unverified
> to 10.91.0.1 via ge-0/0/1.0
to 10.92.0.1 via ge-0/0/2.0
root@vJunosRouter-1>
この状態で正常時はge-0/0/1.0
で流して、ge-0/0/1.0
が停止時にge-0/0/2.0
を利用することなります
3.SR-TTE のトラフィック輻輳保護設定を入れて輻輳時の動作確認
以下の設定で、SR-TTE のトラフィック輻輳保護が動作するようになります。
# トラフィック輻輳保護設定 ISIS のセグメントルーティングで設定
set protocols isis source-packet-routing traffic-statistics congestion-protection
# トラフィック輻輳閾値のテンプレート作成、今回は、動作開始閾値:1% 、復旧閾値:0.1%
set routing-options congestion-protection template CP1 high-threshold bandwidth 1
set routing-options congestion-protection template CP1 low-threshold bandwidth 0.1
# 作成したテンプレートをインターフェースに反映させる
set routing-options congestion-protection interface ge-0/0/1.0 template CP1
set routing-options congestion-protection interface ge-0/0/2.0 template CP1
今回は、シュミレーター環境で大きなトラフィックは流せないのでIF速度の 1%で動作として、10M-IFしているので、100 kbps (10Mの1%) で動作するようにしています。
トラフィック迂回動作の確認
この状態でさっきと同じトラフィックを Ixia-c から流します。150 kbps で流すので、ge-0/0/1.0
で閾値の 100 kbps を超えた分が、ge-0/0/2.0
に流れ込むか確認します。
show congestion-protection interface detail
で確認すると以下のとおり、'ge-0/0/1.0'のトラフィックがge-0/0/2.0
へ迂回していることが確認できました。
root@vJunosRouter-1> show congestion-protection interface detail
Interface State Template Last Status Change
ge-0/0/2.0 active CP1 04:09:08
Currently between thresholds, 0.76% output utilization
ge-0/0/1.0 active CP1 04:09:08
Currently between thresholds, 0.98% output utilization
(シュミレーター環境だからか、迂回するまでに30秒くらいかかったり、値に揺れがあったりしました)
(参考) 1フローのトラフィック時
先ほどのトラフィックは送信元IPアドレスを100個でインクリメントさせて複数フローに見立てて流してトラフィック輻輳時の迂回を確認しましたが、参考に送信元のIPアドレスを1つに固定して1フローでやった場合は、トラフィック輻輳させて閾値を超えても迂回しませんでした。
今回の設定だと複数フローのうちの一部をバックアップルートに迂回させているようです。
root@vJunosRouter-1> show congestion-protection interface detail
Interface State Template Last Status Change
ge-0/0/2.0 active CP1 04:10:35
Currently below low threshold, 0.00% output utilization
ge-0/0/1.0 active CP1 04:14:30
Currently above high threshold, 1.72% output utilization
4.ルーター間を 2本 → 3本 に増やして動作確認
最後に、さらにルーター間のインターフェースge-0/0/3
を増やして第3優先となるようにmetric設定を行い、ge-0/0/1
とge-0/0/2
が両方ともトラフィック輻輳した場合の動作を確認してみました。
set interfaces ge-0/0/3 speed 10m
set interfaces ge-0/0/3 unit 0 family inet address 10.93.0.0/31
set interfaces ge-0/0/3 unit 0 family iso
set interfaces ge-0/0/3 unit 0 family mpls
set protocols isis interface ge-0/0/3.0 level 2 post-convergence-lfa
set protocols isis interface ge-0/0/3.0 level 2 metric 200
set protocols isis interface ge-0/0/3.0 point-to-point
set protocols mpls interface ge-0/0/3.0
set routing-options congestion-protection interface ge-0/0/3.0 template CP1
set interfaces ge-0/0/3 speed 10m
set interfaces ge-0/0/3 unit 0 family inet address 10.93.0.1/31
set interfaces ge-0/0/3 unit 0 family iso
set interfaces ge-0/0/3 unit 0 family mpls
set protocols isis interface ge-0/0/3.0 level 2 metric 200
set protocols isis interface ge-0/0/3.0 point-to-point
set protocols mpls interface ge-0/0/3.0
この状態で、150 kbpsから 400 kbps にトラフィックを増やして、第2優先も閾値を超えるようにしてトラフィックを流してみます。
root@vJunosRouter-1> show congestion-protection interface detail
Interface State Template Last Status Change
ge-0/0/3.0 inactive CP1 04:35:44
Currently below low threshold, 0.00% output utilization
ge-0/0/2.0 active CP1 04:40:19
Currently above high threshold, 2.08% output utilization
ge-0/0/1.0 active CP1 04:40:09
Currently above high threshold, 2.53% output utilization
結果的には第2優先のge-0/0/2.0
を超えた場合はge-0/0/3.0
に迂回することはありませんでした。
想定ですが、今回のトラフィック輻輳を回避する場合の回避先は TI-LFA のバックアップパスを利用するので、第2優先ge-0/0/2
からみたバックアップパスは、第1優先ge-0/0/1
がリンクダウン等で停止しない限り metric での計算でge-0/0/1
がバックアップパスになるので、ge-0/0/3.0
に迂回しないと想定しています。
root@vJunosRouter-1> show route table mpls.0 protocol isis
:
20 *[L-ISIS/14] 00:10:58, metric 0
> to 10.92.0.1 via ge-0/0/2.0, Pop <--- ★ ge-0/0/2 のバックアップパスは ge-0/0/1 となっている
to 10.91.0.1 via ge-0/0/1.0, Pop <--- ★
:
root@vJunosRouter-1>
最後に
今回、SR-TTEのトラフィック輻輳回避を行ってみました。シンプルな設定で動作させることが可能あるため、シンプルな冗長ルートをもったネットワーク構成でれば有用であると感じました。
ただ、最後に確認したとおり複数の異なるメトリックで迂回ルートがある場合には、いい具合にすべての迂回ルートを活用して迂回とはいかなかったで、今回のSR-TTEにすべてを委ねないで別の対処も必要だと思いました。
(今回のネットワークシュミレーター環境依存や設定が足りないなど実は対応ができるかもしれないです)
もしくは第2優先のルートはトラフィック輻輳してもしょうがないという「割り切り」もありかなと思いました。
参考に今回の最終的なコンフィグを以下に記載します
vJunosRouter-1
set version 24.2R1-S2.5
set system host-name vJunosRouter-1
set system root-authentication encrypted-password "$6$A7p8bCxI$DIXeNbvC/onERCe9x41n7RFdMeXgT.ugGVuXsK3vX9loVBL0z8leqseLQq/g80opuKJDMFgadTyRHGuqQaQ8d."
set system syslog file interactive-commands interactive-commands any
set system syslog file messages any notice
set system syslog file messages authorization info
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 flexible-vlan-tagging
set interfaces ge-0/0/0 encapsulation flexible-ethernet-services
set interfaces ge-0/0/0 unit 100 encapsulation vlan-bridge
set interfaces ge-0/0/0 unit 100 vlan-id 100
set interfaces ge-0/0/1 speed 10m
set interfaces ge-0/0/1 unit 0 family inet address 10.91.0.0/31
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 speed 10m
set interfaces ge-0/0/2 unit 0 family inet address 10.92.0.0/31
set interfaces ge-0/0/2 unit 0 family iso
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 speed 10m
set interfaces ge-0/0/3 unit 0 family inet address 10.93.0.0/31
set interfaces ge-0/0/3 unit 0 family iso
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.0.1/32
set interfaces lo0 unit 0 family iso address 49.0001.0100.0000.0001.00
set policy-options policy-statement LOAD_BALANCE then load-balance per-flow
set routing-instances EVPN_L2VPN_VLAN100 instance-type evpn
set routing-instances EVPN_L2VPN_VLAN100 protocols evpn control-word
set routing-instances EVPN_L2VPN_VLAN100 interface ge-0/0/0.100
set routing-instances EVPN_L2VPN_VLAN100 route-distinguisher 10.0.0.1:100
set routing-instances EVPN_L2VPN_VLAN100 vrf-target target:65001:100
set routing-options router-id 10.0.0.1
set routing-options autonomous-system 65000
set routing-options forwarding-table export LOAD_BALANCE
set routing-options congestion-protection template CP1 high-threshold bandwidth 1
set routing-options congestion-protection template CP1 low-threshold bandwidth 0.1
set routing-options congestion-protection interface ge-0/0/1.0 template CP1
set routing-options congestion-protection interface ge-0/0/2.0 template CP1
set routing-options congestion-protection interface ge-0/0/3.0 template CP1
set protocols bgp group MP_BGP_EVPN type internal
set protocols bgp group MP_BGP_EVPN local-address 10.0.0.1
set protocols bgp group MP_BGP_EVPN family evpn signaling
set protocols bgp group MP_BGP_EVPN neighbor 10.0.0.2
set protocols isis interface ge-0/0/1.0 level 2 post-convergence-lfa
set protocols isis interface ge-0/0/1.0 level 2 metric 100
set protocols isis interface ge-0/0/1.0 point-to-point
set protocols isis interface ge-0/0/2.0 level 2 post-convergence-lfa
set protocols isis interface ge-0/0/2.0 level 2 metric 200
set protocols isis interface ge-0/0/2.0 point-to-point
set protocols isis interface ge-0/0/3.0 level 2 post-convergence-lfa
set protocols isis interface ge-0/0/3.0 level 2 metric 200
set protocols isis interface ge-0/0/3.0 point-to-point
set protocols isis interface lo0.0 passive
set protocols isis source-packet-routing srgb start-label 16000
set protocols isis source-packet-routing srgb index-range 8000
set protocols isis source-packet-routing node-segment ipv4-index 1
set protocols isis source-packet-routing traffic-statistics congestion-protection
set protocols isis level 1 disable
set protocols isis level 2 wide-metrics-only
set protocols isis backup-spf-options use-post-convergence-lfa
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols mpls interface ge-0/0/3.0
vJunosRouter-2
set version 24.2R1-S2.5
set system host-name vJunosRouter-2
set system root-authentication encrypted-password "$6$A7p8bCxI$DIXeNbvC/onERCe9x41n7RFdMeXgT.ugGVuXsK3vX9loVBL0z8leqseLQq/g80opuKJDMFgadTyRHGuqQaQ8d."
set system syslog file interactive-commands interactive-commands any
set system syslog file messages any notice
set system syslog file messages authorization info
set chassis network-services enhanced-ip
set interfaces ge-0/0/0 flexible-vlan-tagging
set interfaces ge-0/0/0 encapsulation flexible-ethernet-services
set interfaces ge-0/0/0 unit 100 encapsulation vlan-bridge
set interfaces ge-0/0/0 unit 100 vlan-id 100
set interfaces ge-0/0/1 speed 10m
set interfaces ge-0/0/1 unit 0 family inet address 10.91.0.1/31
set interfaces ge-0/0/1 unit 0 family iso
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 speed 10m
set interfaces ge-0/0/2 unit 0 family inet address 10.92.0.1/31
set interfaces ge-0/0/2 unit 0 family iso
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces ge-0/0/3 speed 10m
set interfaces ge-0/0/3 unit 0 family inet address 10.93.0.1/31
set interfaces ge-0/0/3 unit 0 family iso
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.0.0.2/32
set interfaces lo0 unit 0 family iso address 49.0001.0100.0000.0002.00
set policy-options policy-statement LOAD_BALANCE then load-balance per-flow
set routing-instances EVPN_L2VPN_VLAN100 instance-type evpn
set routing-instances EVPN_L2VPN_VLAN100 protocols evpn control-word
set routing-instances EVPN_L2VPN_VLAN100 interface ge-0/0/0.100
set routing-instances EVPN_L2VPN_VLAN100 route-distinguisher 10.0.0.2:100
set routing-instances EVPN_L2VPN_VLAN100 vrf-target target:65001:100
set routing-options router-id 10.0.0.2
set routing-options autonomous-system 65000
set routing-options forwarding-table export LOAD_BALANCE
set protocols bgp group MP_BGP_EVPN type internal
set protocols bgp group MP_BGP_EVPN local-address 10.0.0.2
set protocols bgp group MP_BGP_EVPN family evpn signaling
set protocols bgp group MP_BGP_EVPN neighbor 10.0.0.1
set protocols isis interface ge-0/0/1.0 level 2 metric 100
set protocols isis interface ge-0/0/1.0 point-to-point
set protocols isis interface ge-0/0/2.0 level 2 metric 200
set protocols isis interface ge-0/0/2.0 point-to-point
set protocols isis interface ge-0/0/3.0 level 2 metric 200
set protocols isis interface ge-0/0/3.0 point-to-point
set protocols isis interface lo0.0 passive
set protocols isis source-packet-routing srgb start-label 16000
set protocols isis source-packet-routing srgb index-range 8000
set protocols isis source-packet-routing node-segment ipv4-index 2
set protocols isis level 1 disable
set protocols isis level 2 wide-metrics-only
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols mpls interface ge-0/0/3.0