SRv6検証(IPv4 L3VPN over SRv6)その弐(Implementation)
はじめに
SRv6環境を確認しながら「Segment Routing Part III: SRv6」を読んだら理解が深まるかなーと思い、CML2でSRv6を構築してみようという話の第二回です。SRv6 の概念を押さえた前回から一歩進み、今回はいよいよ構築フェーズに入ります。
完成形の config を最初に示しておくので、全体像を掴んでから細部を追うもよし、記事を読み進めながら進めるもよし。
「そもそも SRv6 って何だっけ?」という方は、前回の Introduction1 を軽く眺めておくと今回の構築編がより楽しめます。
CE から PE、そして SRv6 コアへと、L3VPN over SRv6 が形になる過程を一緒に見ていきましょう。
SRv6検証(IPv4 L3VPN over SRv6)その壱(Introduction)
SRv6検証(IPv4 L3VPN over SRv6)その弐(Implementation)
↑ 今回はココ
SRv6検証(IPv4 L3VPN over SRv6)その参(Validation)
- はじめに
- 1. Topology
- 2.Config
- 3.Implementation
- おわりに
1. Topology


2.Config
本blogでは、Step1〜8 に沿ってSRv6(IPv4 L3VPN over SRv6)を構築する手順を解説していきます。
先に完成形を確認したい方向けに、最初にコンフィグ一式を掲載しておきます。
見るかどうかはお好みでどうぞ。
【CE1(IOS-XE) - Config】▼完成版Configはこちら。記事を読み進めながら構築したい方はスルーでOKです。
!CE1 ! conf t ! no ip domain lookup ! interface GigabitEthernet1 ip address 192.0.2.2 255.255.255.0 no shutdown ! ip route 0.0.0.0 0.0.0.0 192.0.2.1 ! end write
【PE1(IOS-XR) - Config】▼完成版Configはこちら。記事を読み進めながら構築したい方はスルーでOKです。
hostname PE1
!
vrf RED
rd 64512:1
address-family ipv4 unicast
import route-target
64512:200
!
export route-target
64512:100
!
!
!
line default
exec-timeout 0 0
!
interface Loopback0
ipv6 address fc00::1/128
!
interface GigabitEthernet0/0/0/0
vrf RED
ipv4 address 192.0.2.1 255.255.255.0
!
interface GigabitEthernet0/0/0/1
ipv6 enable
!
router isis CORE
is-type level-2-only
net 49.0001.0000.0000.0001.00
address-family ipv6 unicast
metric-style wide
segment-routing srv6
locator IPA
!
!
!
interface Loopback0
address-family ipv6 unicast
!
!
interface GigabitEthernet0/0/0/1
address-family ipv6 unicast
!
!
!
router bgp 64512
bgp router-id 10.0.0.1
address-family vpnv4 unicast
segment-routing srv6
locator IPA
!
!
neighbor fc00::3
remote-as 64512
update-source Loopback0
address-family vpnv4 unicast
!
!
vrf RED
rd 64512:1
address-family ipv4 unicast
segment-routing srv6
alloc mode per-vrf
!
redistribute connected
!
!
!
segment-routing
srv6
locators
locator IPA
prefix fc00:0:0:1::/64
!
!
!
!
end
【P1(IOS-XR) - Config】▼完成版Configはこちら。記事を読み進めながら構築したい方はスルーでOKです。
hostname P1 ! line default exec-timeout 0 0 ! interface GigabitEthernet0/0/0/0 ipv6 enable ! interface GigabitEthernet0/0/0/1 ipv6 enable ! router isis CORE is-type level-2-only net 49.0001.0000.0000.0002.00 address-family ipv6 unicast metric-style wide ! interface GigabitEthernet0/0/0/0 address-family ipv6 unicast ! ! interface GigabitEthernet0/0/0/1 address-family ipv6 unicast ! ! ! end
【PE2(IOS-XR) - Config】▼完成版Configはこちら。記事を読み進めながら構築したい方はスルーでOKです。
hostname PE2
!
vrf BLUE
rd 64512:2
address-family ipv4 unicast
import route-target
64512:100
!
export route-target
64512:200
!
!
!
line default
exec-timeout 0 0
!
interface Loopback0
ipv6 address fc00::3/128
!
interface GigabitEthernet0/0/0/0
ipv6 enable
!
interface GigabitEthernet0/0/0/1
vrf BLUE
ipv4 address 198.51.100.1 255.255.255.0
!
router isis CORE
is-type level-2-only
net 49.0001.0000.0000.0003.00
address-family ipv6 unicast
metric-style wide
segment-routing srv6
locator IPA
!
!
!
interface Loopback0
address-family ipv6 unicast
!
!
interface GigabitEthernet0/0/0/0
address-family ipv6 unicast
!
!
!
router bgp 64512
bgp router-id 10.0.0.3
address-family vpnv4 unicast
segment-routing srv6
locator IPA
!
!
neighbor fc00::1
remote-as 64512
update-source Loopback0
address-family vpnv4 unicast
!
!
vrf BLUE
rd 64512:2
address-family ipv4 unicast
segment-routing srv6
alloc mode per-vrf
!
redistribute connected
!
!
!
segment-routing
srv6
locators
locator IPA
prefix fc00:0:0:3::/64
!
!
!
!
end
【CE2(IOS-XE) - Config】▼完成版Configはこちら。記事を読み進めながら構築したい方はスルーでOKです。
hostname CE2 ! no ip domain lookup ! interface GigabitEthernet1 ip address 198.51.100.2 255.255.255.0 no shutdown ! ip route 0.0.0.0 0.0.0.0 198.51.100.1 ! end
参考までに手元の検証環境のバージョンを記載します。
IOS-XE 17.03.02
※ IOS-XEは、どのバージョンでも良いです。
IOS-XR 7.4.12
※ IOS-XRは可能であれば、v7.4.1を使って欲しいです。
CML2 のIOS-XR は、IOS XRv 9000 Router なので、SRv6のサポートが開始されているバージョン(v7.0.1以降3)であれば何でも良いです。v7.4.1に拘る理由としては、このバージョンらへんまではEnd.OP SIDがあったので、それを観察するためです。機能差がある訳ではないです。
詳しくは次回「SRv6検証(IPv4 L3VPN over SRv6)その参(Validation)」で説明します。
3.Implementation
3.1 Step1:ノード配置
CML2でノードを配置します。詳しい手順は割愛します。
初期の頃よりも色々装飾できるようになりました。画面の上部にメニューがあります。 四角、丸、線、文字列、色付けたり、回転させたり...オブジェクトを配置できるのは嬉しいですね。

以降、順番にノードの設定をしていきます。
3.2 Step2:CE定義
CE1/CE2のインターフェースにIPv4アドレスを設定し、Default GatewayをPEに向けます。
① 左側のCE1を定義します。
IP: 192.0.2.2/24,GW:192.0.2.1
※ 192.0.2.0/24 is A.K.A. "Documentation (TEST-NET-1)" 4
CE1のDefault Gateway をPE1に向けておきます。
!CE1 ! conf t ! no ip domain lookup ! interface GigabitEthernet1 ip address 192.0.2.2 255.255.255.0 no shutdown ! ip route 0.0.0.0 0.0.0.0 192.0.2.1 ! end write
PE1はIP未定義ですので当然timeoutします。
CE1#ping 192.0.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.0.2.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) CE1#
② 右側のCE2を定義します。
IP: 198.51.100.2/24,GW:198.51.100.1
※ 198.51.100.0/24 is A.K.A. "Documentation (TEST-NET-2)"5
CE2のDefault Gateway をPE2に向けておきます。
!CE2 ! conf t ! no ip domain lookup ! interface GigabitEthernet1 ip address 198.51.100.2 255.255.255.0 no shutdown ! ip route 0.0.0.0 0.0.0.0 198.51.100.1 ! end write
PE2もIP未定義ですので当然timeoutします。
CE2#ping 198.51.100.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 198.51.100.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) CE2#
CEの設定はこれでお終いです。疎通できなくて変ですが、進めていくうちに接続できるようになりますので、そのまま次へ進みます。
3.3 Step3:SP Core定義その1
3.3.1 IPv6の有効化
PE1,P1,PE2でIPv6を有効化し、IPv6の疎通確認をします。
① PE1,P1,PE2でIPv6を有効化します。
本検証環境のSP Network ではノード間のIPv6はリンクローカルユニキャストアドレス6を使います。
IOS-XRのオンラインマニュアルは、以下の通りです。
RP/0/RP0/CPU0:PE1(config)#interface gigabitEthernet 0/0/0/1 RP/0/RP0/CPU0:PE1(config-if)#? ipv6 IPv6 interface subcommands RP/0/RP0/CPU0:PE1(config-if)#ipv6 ? enable Enable IPv6 on interface RP/0/RP0/CPU0:PE1(config-if)#ipv6 enable ? <cr>
設定するインターフェース名間違えないように、コピペに使ってください。
PE1:gigabitEthernet 0/0/0/1
P1:gigabitEthernet 0/0/0/0 と gigabitEthernet 0/0/0/1
PE2:gigabitEthernet 0/0/0/0
■interface gigabitEthernet 0/0/0/0
configure interface gigabitEthernet 0/0/0/0 ipv6 enable no shutdown commit end
■interface gigabitEthernet 0/0/0/1
configure interface gigabitEthernet 0/0/0/1 ipv6 enable no shutdown commit end
PE1,P1,PE2のインターフェース設定を終えたら簡単なテストをします。
以降、リンクローカルユニキャストアドレス(fe80::~)が表示される個所が多数あります。記事で示すものは表示例です。それぞれのコマンドを実行後に出力されるものを使用して確認してください。
② PE1のインターフェースの状況を確認します。
RP/0/RP0/CPU0:PE1#sh ipv6 int br | i "Up|fe80"
GigabitEthernet0/0/0/1 [Up/Up]
fe80::5054:ff:fe0f:7cff
RP/0/RP0/CPU0:PE1#
RP/0/RP0/CPU0:PE1#clear ipv6 neighbors
RP/0/RP0/CPU0:PE1#
RP/0/RP0/CPU0:PE1#sh ipv6 neighbors
IPv6 Address Age Link-layer Add State Interface Location
[Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/1 0/0/CPU0
RP/0/RP0/CPU0:PE1#
RP/0/RP0/CPU0:PE1#
clear ipv6 neighborsをしているのは変化を確認したいためです。
③ P1でインターフェースの状況を確認します。
RP/0/RP0/CPU0:P1#sh ipv6 int br | in "Up|fe80"
Loopback0 [Up/Up]
GigabitEthernet0/0/0/0 [Up/Up]
fe80::5054:ff:fe0c:14b6
GigabitEthernet0/0/0/1 [Up/Up]
fe80::5054:ff:fe01:889
RP/0/RP0/CPU0:P1#
RP/0/RP0/CPU0:P1#clear ipv6 neighbors
RP/0/RP0/CPU0:P1#
RP/0/RP0/CPU0:P1#sh ipv6 neighbors
IPv6 Address Age Link-layer Add State Interface Location
[Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/0 0/0/CPU0
[Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/1 0/0/CPU0
RP/0/RP0/CPU0:P1#
④ P1からPE1へpingコマンドで疎通確認をします。
pingの宛先は、PE1のリンクローカルユニキャストアドレスです。
RP/0/RP0/CPU0:PE1#sh ipv6 int br | i "Up|fe80"
GigabitEthernet0/0/0/1 [Up/Up]
fe80::5054:ff:fe0f:7cff
ping に続けてコピペしてEnterキーを押下すると、Output Interface:を聞いてきます。
RP/0/RP0/CPU0:P1#ping fe80::5054:ff:fe0f:7cff Output Interface:
⑤ PE1と隣接しているインターフェースを入力してEnterキーを押下すると、pingコマンドが実行します。
RP/0/RP0/CPU0:P1#ping fe80::5054:ff:fe0f:7cff Output Interface: GigabitEthernet0/0/0/0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to fe80::5054:ff:fe0f:7cff, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 10/14/27 ms RP/0/RP0/CPU0:P1#
⑥ P1がPE1のPE1(Gi0/0/0/1)のリンクローカルユニキャストアドレスをGi0/0/0/0から学習していることが分かります。
【ping実行前】neighborは未学習ですが、
RP/0/RP0/CPU0:P1#sh ipv6 neighbors IPv6 Address Age Link-layer Add State Interface Location [Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/0 0/0/CPU0 [Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/1 0/0/CPU0 RP/0/RP0/CPU0:P1#
【ping実行後】★の行にあるとおり、P1のGi0/0/0/0の先にはPE1が存在することを学習しています。
RP/0/RP0/CPU0:P1#sh ipv6 neighbors IPv6 Address Age Link-layer Add State Interface Location ★fe80::5054:ff:fe0f:7cff 23 5254.000f.7cff REACH Gi0/0/0/0 0/0/CPU0 [Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/0 0/0/CPU0 [Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/1 0/0/CPU0 RP/0/RP0/CPU0:P1#
RP/0/RP0/CPU0:PE1#sh ipv6 int br | i "Up|fe80"
GigabitEthernet0/0/0/1 [Up/Up]
fe80::5054:ff:fe0f:7cff
⑦ 同様にPE1もP1(Gi0/0/0/0)のリンクローカルユニキャストアドレスをGi0/0/0/1から学習していることが分かります。
【ping実行前】neighborは未学習ですが、
RP/0/RP0/CPU0:PE1#sh ipv6 neighbors IPv6 Address Age Link-layer Add State Interface Location [Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/1 0/0/CPU0 RP/0/RP0/CPU0:PE1#
【ping実行後】★の行にあるとおり、PE1のGi0/0/0/1の先にはP1が存在することを学習しています。
RP/0/RP0/CPU0:PE1#sh ipv6 neighbors IPv6 Address Age Link-layer Add State Interface Location ★fe80::5054:ff:fe0c:14b6 161 5254.000c.14b6 REACH Gi0/0/0/1 0/0/CPU0 [Mcast adjacency] - 0000.0000.0000 REACH Gi0/0/0/1 0/0/CPU0 RP/0/RP0/CPU0:PE1#
RP/0/RP0/CPU0:P1#sh ipv6 int br | in "Up|fe80"
Loopback0 [Up/Up]
GigabitEthernet0/0/0/0 [Up/Up]
fe80::5054:ff:fe0c:14b6
GigabitEthernet0/0/0/1 [Up/Up]
fe80::5054:ff:fe01:889
3.3.2 IS-IS定義
PE1,P1,PE2で、IS-ISを設定して簡単な接続確認をします。
① IS-ISを定義します。
●NSAP Addresses
・Area address = 49.0001
・System ID = 0000.0000.000x(PE1=1,P1=2,PE2=3)
・NSEL = 00
●ノード間はLevel-2接続
●PEのみインターフェースLoopback0もIS-ISを有効にする
∵最小構成としてPE間でのみBGPを動かしたいので
【IOS-XR:PE1のIS-IS定義コピペ用】
!PE1 ! conf ! router isis CORE is-type level-2-only net 49.1.0.0.1.00 address-family ipv6 unicast metric-style wide interface Loopback0 address-family ipv6 unicast interface GigabitEthernet0/0/0/1 address-family ipv6 unicast commit end
【IOS-XR:P1のIS-IS定義コピペ用】
!P1 ! conf ! router isis CORE is-type level-2-only net 49.1.0.0.2.00 address-family ipv6 unicast metric-style wide interface GigabitEthernet0/0/0/0 address-family ipv6 unicast interface GigabitEthernet0/0/0/1 address-family ipv6 unicast commit end
【IOS-XR:PE2のIS-IS定義コピペ用】
!PE2 ! conf ! router isis CORE is-type level-2-only net 49.1.0.0.3.00 address-family ipv6 unicast metric-style wide interface Loopback0 address-family ipv6 unicast interface GigabitEthernet0/0/0/0 address-family ipv6 unicast commit end
ここで覚えておいて欲しいことがあります。
CiscoのIS-ISは、Defaultが”metric-style narrow”です。
SRでは”metric-style wide”にする必要があります。
RP/0/RP0/CPU0:PE2(config)#router isis CORE RP/0/RP0/CPU0:PE2(config-isis)#address-family ipv6 unicast RP/0/RP0/CPU0:PE2(config-isis-af)#metric-style ? narrow Use old style of TLVs with narrow metric transition Send and accept both styles of TLVs during transition wide Use new style of TLVs to carry wider metric RP/0/RP0/CPU0:PE2(config-isis-af)#
よいかケンシロウ。なぜSRを使用するならIS-ISのmetricをwideにするかと言えばじゃ...
— やすお (@chimay_wh) 2024年10月15日
16bitのnarrow metricでは高度なtopology情報やPath計算が十分にできない...Aristaは例外でnarrow metricはない!忘れるでないぞ。 pic.twitter.com/QMRurzvfKA
さて、簡単にテストをしよう٩(๑>∀<๑)۶
RP/0/RP0/CPU0:PE1#sh isis hostname IS-IS CORE hostnames Level System ID Dynamic Hostname 2 * 0000.0000.0001 PE1 2 0000.0000.0002 P1 2 0000.0000.0003 PE2 RP/0/RP0/CPU0:PE1#
PE1にP1とPE2の情報が見れる状態です。System IDも間違っていない。もう少し詳しく確認してみます。
RP/0/RP0/CPU0:PE1#sh isis neighbors
IS-IS CORE neighbors:
System Id Interface SNPA State Holdtime Type IETF-NSF
P1 Gi0/0/0/1 5254.000c.14b6 Up 21 L2 Capable
Total neighbor count: 1
RP/0/RP0/CPU0:PE1#!
RP/0/RP0/CPU0:PE1#sh isis neighbors detail
IS-IS CORE neighbors:
System Id Interface SNPA State Holdtime Type IETF-NSF
P1 Gi0/0/0/1 5254.000c.14b6 Up 21 L2 Capable
Area Address(es): 49.0001
IPv6 Address(es): fe80::5054:ff:fe0c:14b6*
Topologies: 'IPv6 Unicast'
Uptime: 00:42:36
Total neighbor count: 1
RP/0/RP0/CPU0:PE1#!
RP/0/RP0/CPU0:PE1#sh isis interface brief
IS-IS CORE Interfaces
Interface All Adjs Adj Topos Adv Topos CLNS MTU Prio
OK L1 L2 Run/Cfg Run/Cfg L1 L2
----------------- --- --------- --------- --------- ---- ---- --------
Lo0 No
Gi0/0/0/1 Yes - 1* 1/1 1/1 Up 1497 - 64
RP/0/RP0/CPU0:PE1#
PE1では、隣接するP1が想定通りLevel-2で見えている。
RP/0/RP0/CPU0:P1#sh isis neighbors
IS-IS CORE neighbors:
System Id Interface SNPA State Holdtime Type IETF-NSF
PE1 Gi0/0/0/0 5254.000f.7cff Up 7 L2 Capable
PE2 Gi0/0/0/1 5254.0001.193a Up 7 L2 Capable
Total neighbor count: 2
RP/0/RP0/CPU0:P1#!
RP/0/RP0/CPU0:P1#sh isis neighbors detail
IS-IS CORE neighbors:
System Id Interface SNPA State Holdtime Type IETF-NSF
PE1 Gi0/0/0/0 5254.000f.7cff Up 7 L2 Capable
Area Address(es): 49.0001
IPv6 Address(es): fe80::5054:ff:fe0f:7cff*
Topologies: 'IPv6 Unicast'
Uptime: 00:16:00
PE2 Gi0/0/0/1 5254.0001.193a Up 7 L2 Capable
Area Address(es): 49.0001
IPv6 Address(es): fe80::5054:ff:fe01:193a*
Topologies: 'IPv6 Unicast'
Uptime: 00:16:00
Total neighbor count: 2
RP/0/RP0/CPU0:P1#!
RP/0/RP0/CPU0:P1#sh isis interface brief
IS-IS CORE Interfaces
Interface All Adjs Adj Topos Adv Topos CLNS MTU Prio
OK L1 L2 Run/Cfg Run/Cfg L1 L2
----------------- --- --------- --------- --------- ---- ---- --------
Gi0/0/0/1 Yes - 1 1/1 1/1 Up 1497 - 64
Gi0/0/0/1 Yes - 1 1/1 1/1 Up 1497 - 64
RP/0/RP0/CPU0:P1#
P1では、隣接するPE1とPE2が想定通りLevel-2で見えている。PE1と違いLoopback0はIS-ISで有効となっていないです。
RP/0/RP0/CPU0:PE2#sh isis neighbors
IS-IS CORE neighbors:
System Id Interface SNPA State Holdtime Type IETF-NSF
P1 Gi0/0/0/0 5254.0001.0889 Up 28 L2 Capable
Total neighbor count: 1
RP/0/RP0/CPU0:PE2#!
RP/0/RP0/CPU0:PE2#sh isis neighbors detail
IS-IS CORE neighbors:
System Id Interface SNPA State Holdtime Type IETF-NSF
P1 Gi0/0/0/0 5254.0001.0889 Up 28 L2 Capable
Area Address(es): 49.0001
IPv6 Address(es): fe80::5054:ff:fe01:889*
Topologies: 'IPv6 Unicast'
Uptime: 00:19:36
Total neighbor count: 1
RP/0/RP0/CPU0:PE2#!
RP/0/RP0/CPU0:PE2#sh isis interface brief
IS-IS CORE Interfaces
Interface All Adjs Adj Topos Adv Topos CLNS MTU Prio
OK L1 L2 Run/Cfg Run/Cfg L1 L2
----------------- --- --------- --------- --------- ---- ---- --------
Lo0 No
Gi0/0/0/0 Yes - 1* 1/1 1/1 Up 1497 - 64
RP/0/RP0/CPU0:PE2#
PE2では、隣接するP1が想定通りLevel-2で見えている。PE1と同様にLoopback0もIS-ISで有効になっています。
細かい話ですが、sh isis int br の出力結果で、Adjs(L2)に「*」がつくインターフェースが異なる可能性があります。 priorityの設定をしていませんので、PE1/P1/PE2いずれもpriority64(Default)です。SNPA(インターフェースのmacアドレス)のデカい方がDISとなり、「*」がつきます。詳細の説明はここでは割愛します。
ここからSRv6の設定をすこしづつ実施していきます。
3.4 Step4:Locator定義(Locatorの設計)
Srv6 には、uSID & SID(Full-Length SID)がありますが、今回はSID(Full-Length SID)について検証を行います。 uSID(Micro SID)はまだ勉強中で説明できるほど理解できていないので( ºωº; )
前回「SRv6検証(IPv4 L3VPN over SRv6)その壱(Introduction)」のTerminology(用語)で簡単に触れましたが、定義として使えるようにもう少し説明します。
SRv6のSIDは128bitあり、構成要素は Locator / Function / Argument の3つです。

●Locator:このSIDを割り当てたノードへ到達するための情報
※グローバルで一意かつルーティング可能であることが必要です!
これ ↑ 大変重要な点です!!
Locatorは以下の2つで構成しています。
・Locator Block(B)
・Node ID(N)
RFC 8986
Segment Routing over IPv6 (SRv6) Network Programming3.2. SID Allocation within an SR Domain
Locators are assigned consistent with IPv6 infrastructure allocation. For example, a network operator may:Assign block B::/48 to the SR domain
Assign a unique B:N::/64 block to each SRv6-enabled node in the domain
●Function:ノードによって実行するアクションを指定するための情報
※これを割り当てたローカルノードでのみ意味を持ち、他のノードでは解釈できない点が重要です。
●Argument:Functionの引数(オプション)
今回は以下のようにします。
・定義名(locator name)= IPA
・Locator(Prefix)= B:N::/64=fc00:0:0:x::/64
→ Locator Block(B)は” fc00:0:0: ” で、
Node ID(N)は、x は、PE1=1, PE2=3 とします。
3.5 Step5:SP Core定義その2(SRv6の要!)
PE1,PE2のインターフェースLoopback0にIPv6を設定し、簡単な疎通確認をします。
3.5.1 PEルーターのLoopback0設定
PE1,PE2のインターフェースLoopback0にIPv6を付与します。
今回付与するIPv6は、ユニークローカルアドレスにしています。(FC00::/7)7
PE1,PE2にだけ定義します。P1にはLoopback0の定義をしません。
このLoopback0は、BGPでvpnv4セッションを確立するために使います。
また、SRv6ではインターフェースLoopback0に付与したIPv6がSIDとして使われ、パケット転送の経路を決定します。
【IOS-XR:PE1 Loopback0定義コピペ用】
!PE1 ! configure interface loopback 0 ipv6 address fc00::1/128 commit end
【IOS-XR:PE2 Loopback0定義コピペ用】
!PE2 ! configure interface loopback 0 ipv6 address fc00::3/128 commit end
PE1で確認します。
RP/0/RP0/CPU0:PE1#show ipv6 int br | i "Up|fc|fe"
Loopback0 [Up/Up]
fe80::39e6:6cff:fe7e:af67
fc00::1
GigabitEthernet0/0/0/1 [Up/Up]
fe80::5054:ff:fe0f:7cff
RP/0/RP0/CPU0:PE1#
PE2も確認します。
RP/0/RP0/CPU0:PE2#show ipv6 int br | i "Up|fc|fe"
Loopback0 [Up/Up]
fe80::a134:aaff:fe17:1196
fc00::3
GigabitEthernet0/0/0/0 [Up/Up]
fe80::5054:ff:fe01:193a
RP/0/RP0/CPU0:PE2#
3.5.2 疎通確認
簡単な試験をしてみましょう。IPv4は未定義なので当然IPv4のルーティングテーブルには何もありません。
RP/0/RP0/CPU0:PE1#show route % No matching routes found RP/0/RP0/CPU0:PE1# RP/0/RP0/CPU0:PE1#show route ipv4 % No matching routes found RP/0/RP0/CPU0:PE1#
IPv6のルーティングテーブルには、PE2のLoopback0がPE1で学習済み(IS-IS Level-2)であることが分かります。
RP/0/RP0/CPU0:PE1#show route ipv6
Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP
A - access/subscriber, a - Application route
M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
Gateway of last resort is not set
L fc00::1/128 is directly connected,
00:03:25, Loopback0
i L2 fc00::3/128
[115/30] via fe80::5054:ff:fe0c:14b6, 00:00:29, GigabitEthernet0/0/0/1
RP/0/RP0/CPU0:PE1#
PE1からPE2に対してLoopback0のIPv6pingで疎通できることも確認できます。
RP/0/RP0/CPU0:PE1#ping fc00::3 source fc00::1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to fc00::3, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 9/14/28 ms RP/0/RP0/CPU0:PE1#
tracerouteをすると興味深い結果が得られます。
RP/0/RP0/CPU0:PE1#traceroute fc00::3 source fc00::1 Type escape sequence to abort. Tracing the route to fc00::3 1 ::ffff:0.0.0.0 24 msec 10 msec 12 msec 2 fc00::3 27 msec 20 msec 14 msec RP/0/RP0/CPU0:PE1#
Transit NodeであるP1には、ユニークローカルアドレスを付与していません。(PE1/PE2とは違い、Loopback0にIPv6アドレスを設定していない)
するとこのようにIPv4射影アドレス(::ffff:0.0.0.0)を経由するように見えます。
3.6 Step6:SP Core定義その3
CE-PE間でVRFを設定し、簡単な疎通確認をします。
3.6.1 L3VPN(CE-PE間のVRF設定)
CE-PE間のvrfを定義します。
■CE1-PE1
vrf:RED
Route Distinguisher:64512:1
Import Route Target:64512:200
Export Route Target:64512:100
■CE2-PE2
vrf:BLUE
Route Distinguisher:64512:2
Import Route Target:64512:100
Export Route Target:64512:200
図示するとこのようになります。
① VRF nameは見た目のままでVRFの名前です。CE1(左)とCE2(右)で揃えても揃えなくてもどっちでも良いです。
② Route Distinguisher(以降、RDと省略します)はL3VPNの端にあるCEを識別するために使います。フォーマットは色々あるのですが、今回は私が良く使う”2-byte AS number”で設定します。
CE1(左)を識別するのに使うRDは、64512:1としていますが、コロン左側の64512は今回使うBGPのAS numberを64512にしたからです。コロン右側の1はCE1の1です。
混乱するかもしれませんが、設定するL3VPNでRDの重複さえなければぶっちゃけ何でも良いのです。1:1でも良いです。
CE2(右)を識別するのに使うRDは、64512:2としています。理由はCE1と同様です。
③ Route Target(以降、RTと省略します)は、VPN間で経路情報をインポート・エクスポートする際に属性を持たせて通信を制御するために使います。フォーマットは色々あるのですが、今回は私が良く使う”2-byte AS number”で設定します。
PE1(左)で定義するRTでは、CE1(左)からCE2(右)に向かう方向をExport RT「64512:100」とします。コロン左側の64512は今回使うBGPのAS numberを64512にしたからです。コロン右側の100は適当です。
ココで重要なのは、対向のExport RTとImport RTは同じである必要があります。つまり、PE2(右)で定義するRTでは、CE1(左)からCE2(右)に向かう方向をImport RT「64512:100」とする必要があるということです。図の青い破線がExport RTとImport RTが一対になっていることを表しています。

混乱するかもしれませんが、設定するL3VPNでExport RTとImport RTが1対になってさえいれば、ぶっちゃけ何でも良いのです。全部1:1でも良いです。
AFI/SAFIを指定するのを忘れないようにします。今回はCE1,CE2で扱うのは、address-family ipv4 unicast(AFI:ipv4,SAFI:unicast)です。
AFIとは、Address Family Identifier の略で、伝達するプロトコルのアドレスを識別する情報のことです。
代表的なもの AFI = 1 ⇒ IPv4 AFI = 2 ⇒ IPv6
SAFI (Subsequent-AFI)とは、AFI で識別されたプロトコルの詳細識別のことです。
代表的なもの Sub-AFI = 1 (SAFI=1) ⇒ Unicast Sub-AFI = 2 (SAFI=2) ⇒ Multicast Sub-AFI = 4 (SAFI=4) ⇒ NLRI with MPLS Labels Sub-AFI = 128 (SAFI=128) ⇒ MPLS-labeled VPN address
詳細は以下をご参照ください。
www.iana.org
www.iana.org
ipv4 unicast 今もなお更新し続けられているのがすごいな!
AFI/SAFIて凄いな
— やすお (@chimay_wh) 2025年7月26日
今もなお更新されて増えてるw
ipv4 unicast
AFI : ipv4, SAFI : unicast
今月一体何が更新されたんだろ?https://t.co/XEFgTPJp56 pic.twitter.com/qrUkonFrKm
【IOS-XR:PE1のvrfを定義コピペ用】
!PE1 ! configure vrf RED rd 64512:1 address-family ipv4 unicast import route-target 64512:200 export route-target 64512:100 root interface gigabitEthernet 0/0/0/0 no shutdown no ipv4 add vrf RED ipv4 add 192.0.2.1/24 commit end
【IOS-XR:PE2のvrfを定義コピペ用】
!PE2 ! configure vrf BLUE rd 64512:2 address-family ipv4 unicast import route-target 64512:100 export route-target 64512:200 root interface gigabitEthernet 0/0/0/1 no shutdown no ipv4 add vrf BLUE ipv4 add 198.51.100.1/24 commit end
PE1で確認します。
RP/0/RP0/CPU0:PE1#show ip int br | i Up
Loopback0 unassigned Up Up default
GigabitEthernet0/0/0/0 192.0.2.1 Up Up RED
GigabitEthernet0/0/0/1 unassigned Up Up default
RP/0/RP0/CPU0:PE1#
RP/0/RP0/CPU0:PE1#show vrf RED
VRF RD RT AFI SAFI
RED 64512:1
import 64512:200 IPV4 Unicast
export 64512:100 IPV4 Unicast
RP/0/RP0/CPU0:PE1#
PE2で確認します。
RP/0/RP0/CPU0:PE2#sh ip int br | i Up
Loopback0 unassigned Up Up default
GigabitEthernet0/0/0/0 unassigned Up Up default
GigabitEthernet0/0/0/1 198.51.100.1 Up Up BLUE
RP/0/RP0/CPU0:PE2#
RP/0/RP0/CPU0:PE2#show vrf BLUE
VRF RD RT AFI SAFI
BLUE 64512:2
import 64512:100 IPV4 Unicast
export 64512:200 IPV4 Unicast
RP/0/RP0/CPU0:PE2#
3.6.2 疎通確認
PE1のルーティングテーブル(vrf RED)を確認します。
RP/0/RP0/CPU0:PE1#show route vrf RED
Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP
A - access/subscriber, a - Application route
M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
Gateway of last resort is not set
C 192.0.2.0/24 is directly connected, 00:01:35, GigabitEthernet0/0/0/0
L 192.0.2.1/32 is directly connected, 00:01:35, GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:PE1#
PE1のGigabitEthernet0/0/0/0にvrf(RED)でIP 192.0.2.1/24を付与したので、CE1からPE1へ疎通できるようになります。
CE1#ping 192.0.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.0.2.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 3/18/64 ms CE1# CE1#ping 192.0.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.0.2.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/17/42 ms CE1#
pingの一発目が欠けるのは、初回はarp未解決だけど、2発目以降はarp解決が完了しているから問題なく応答があります。
PE2のルーティングテーブル(vrf BLUE)を確認します。
RP/0/RP0/CPU0:PE2#show route vrf BLUE
Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP
A - access/subscriber, a - Application route
M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
Gateway of last resort is not set
C 198.51.100.0/24 is directly connected, 00:09:07, GigabitEthernet0/0/0/1
L 198.51.100.1/32 is directly connected, 00:09:07, GigabitEthernet0/0/0/1
RP/0/RP0/CPU0:PE2#
PE2のGigabitEthernet0/0/0/0にvrf(BLUE)でIP 198.51.100.1/24を付与したので、CE2からPE2へ疎通できるようになります。
CE2#ping 198.51.100.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 198.51.100.1, timeout is 2 seconds: .!!!! Success rate is 80 percent (4/5), round-trip min/avg/max = 3/13/42 ms CE2# CE2#ping 198.51.100.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 198.51.100.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms CE2#
こちらもpingの一発目が欠けていますが、先ほどと同じ理由です。
3.7 Step7:BGP定義(BGP設定とBGPのSRv6設定)
BGPはIGPなどでReachabilityが担保されていないと機能しません。定義をする順序としては、ルーターGlobal とIS-ISでSRv6を定義してからBGPでSRv6を定義するのが良いかと思いますが、ここでは敢えて逆の順序で定義していきます。
3.7.1 BGP定義
BGPでSRv6を使えるように「vrf」と「vpnv4」に定義をします。
細かいことを言うと、vrfにSRv6を定義するのではなく、BGPの中で使うvrfでSRv6を定義します。

今回は、PE1-PE2間でBGP(vpnv4)をSRv6で定義します。
CCO極稀に嘘書いてあるからなー。OSで確認できるオンラインマニュアルから学ぶこともあると思います。
RP/0/RP0/CPU0:PE1#configure RP/0/RP0/CPU0:PE1(config)#router bgp 64512 ? address-family Enter Address Family command mode RP/0/RP0/CPU0:PE1(config)#router bgp 64512 address-family ? vpnv4 VPNv4 Address Family RP/0/RP0/CPU0:PE1(config)#router bgp 64512 address-family vpnv4 ? unicast Address Family modifier RP/0/RP0/CPU0:PE1(config)#router bgp 64512 address-family vpnv4 unicast ? segment-routing (Deprecated from 7.4.1) Specify Segment-routing configu rations RP/0/RP0/CPU0:PE1(config)#router bgp 64512 address-family vpnv4 unicast segment-routing ? srv6 (Deprecated from 7.4.1) Replaced by segment-routing srv6 config under vr f all RP/0/RP0/CPU0:PE1(config)#$ily vpnv4 unicast segment-routing srv6 ? locator Specify locator RP/0/RP0/CPU0:PE1(config)#$ily vpnv4 unicast segment-routing srv6 locator ? WORD locator name RP/0/RP0/CPU0:PE1(config)#$ily vpnv4 unicast segment-routing srv6 locator IPA ? <cr> RP/0/RP0/CPU0:PE1(config)#router bgp 64512 address-family vpnv4 unicast seg sr$ RP/0/RP0/CPU0:PE1(config)#show Building configuration... !! IOS XR Configuration 7.4.1 router bgp 64512 address-family vpnv4 unicast segment-routing srv6 locator IPA ! ! ! end RP/0/RP0/CPU0:PE1(config)#
CE-PE間におけるBGPのSRv6をオンラインマニュアルで見ると
RP/0/RP0/CPU0:PE1#configure
RP/0/RP0/CPU0:PE1(config)#router bgp 64512
RP/0/RP0/CPU0:PE1(config-bgp)#?
vrf Specify a vrf name
RP/0/RP0/CPU0:PE1(config-bgp)#vrf ?
RED VRF name
WORD VRF name - maximum length 32 characters
RP/0/RP0/CPU0:PE1(config-bgp)#vrf RED ?
address-family Enter Address Family command mode
RP/0/RP0/CPU0:PE1(config-bgp)#vrf RED address-family ?
ipv4 IPv4 Address Family
RP/0/RP0/CPU0:PE1(config-bgp)#vrf RED address-family ipv4 ?
unicast Address Family modifier
RP/0/RP0/CPU0:PE1(config-bgp)#vrf RED address-family ipv4 unicast ?
segment-routing Specify Segment-routing configurations
RP/0/RP0/CPU0:PE1(config-bgp)#$unicast segment-routing ?4 unicast seg
srv6 Specify SRv6 configurations
RP/0/RP0/CPU0:PE1(config-bgp)#$unicast segment-routing srv6 ?
alloc SID Allocation
RP/0/RP0/CPU0:PE1(config-bgp)#$unicast segment-routing srv6 alloc ?
mode SID Allocation mode
RP/0/RP0/CPU0:PE1(config-bgp)#$unicast segment-routing srv6 alloc mode ?
per-ce Set per CE label mode
per-vrf Set per VRF label mode
RP/0/RP0/CPU0:PE1(config-bgp)#$unicast segment-routing srv6 alloc mode per-vrf ?
<cr>
RP/0/RP0/CPU0:PE1(config-bgp)#vrf RED address-family ipv4 unicast segment-rout$
RP/0/RP0/CPU0:PE1(config-bgp)#show
router bgp 64512
vrf RED
address-family ipv4 unicast
segment-routing srv6
alloc mode per-vrf
!
!
!
!
RP/0/RP0/CPU0:PE1(config-bgp)#
今回は、CE-PEが1対向しかないので”per-ce”でも”per-vrf”でも同じことです。
vrfごとにSIDを識別したいのか?CEごとにSIDを識別したいのか、PEにぶら下がっているCEをどのように管理したいかによって使い分ければよいかと
定義の作り方が分かったのでそれぞれを定義していきます。
PE1にBGPを定義します。SRv6のlocatorは、「3.4 Step4:Locator定義(Locatorの設計)」で決めた通りIPAとします。
余談ですが、Locatorの名称は私の好きなビールIPA(India Pale Ale)にしています。
【IOS-XR:PE1のBGPを定義コピペ用】
!PE1 ! configure ! router bgp 64512 bgp router-id 10.0.0.1 address-family vpnv4 unicast segment-routing srv6 locator IPA ! ! neighbor fc00::3 remote-as 64512 update-source Loopback0 address-family vpnv4 unicast ! ! vrf RED rd 64512:1 address-family ipv4 unicast segment-routing srv6 alloc mode per-vrf ! redistribute connected ! ! ! commit end
【IOS-XR:PE2のBGPを定義コピペ用】
!PE2 ! configure ! router bgp 64512 bgp router-id 10.0.0.3 address-family vpnv4 unicast segment-routing srv6 locator IPA ! ! neighbor fc00::1 remote-as 64512 update-source Loopback0 address-family vpnv4 unicast ! ! vrf BLUE rd 64512:2 address-family ipv4 unicast segment-routing srv6 alloc mode per-vrf ! redistribute connected ! ! ! commit end
3.7.2 疎通確認
簡単なテストをしていきます。
PE1を見るとPE2(fc00::3)とiBGPが確立できていますが、showコマンドの出力結果の右下に注目すると「 St/PfxRcd が 0 」であることからVPNV4経路は何も受信していません。
RP/0/RP0/CPU0:PE1#show bgp all all summary Address Family: VPNv4 Unicast ----------------------------- BGP router identifier 10.0.0.1, local AS number 64512 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0x0 RD version: 0 BGP main routing table version 4 BGP NSR Initial initsync version 4 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs BGP is operating in STANDALONE mode. Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer Speaker 4 4 4 4 4 0 Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd fc00::3 0 64512 111 111 4 0 0 01:48:34 0 RP/0/RP0/CPU0:PE1#
PE2を見るとPE1(fc00::1)とiBGPが確立できていますが、showコマンドの出力結果の右下に注目すると「 St/PfxRcd が 0 」であることからVPNV4経路は何も受信していません。
RP/0/RP0/CPU0:PE2#show bgp all all summary Address Family: VPNv4 Unicast ----------------------------- BGP router identifier 10.0.0.3, local AS number 64512 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0x0 RD version: 0 BGP main routing table version 4 BGP NSR Initial initsync version 4 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs BGP is operating in STANDALONE mode. Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer Speaker 4 4 4 4 4 0 Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd fc00::1 0 64512 112 112 4 0 0 00:04:37 0 RP/0/RP0/CPU0:PE2#
3.8 Step8:IGP&Global定義(IS-ISとルーター全体のSRv6設定)
最後の設定です。PE1、PE2でSRv6の設定をして、簡単な疎通確認をします。
3.8.1 IGP&Global定義
PE1,PE2にのみSRv6を定義します。P1はTransit NodeなのでSRv6を定義しません。

IS-ISのSRv6を定義するためにオンラインマニュアルを見ます。
RP/0/RP0/CPU0:PE1#configure RP/0/RP0/CPU0:PE1(config)#router isis CORE ? address-family Enter the IS-IS address-family configuration submode RP/0/RP0/CPU0:PE1(config)#router isis CORE address-family ? ipv6 IPV6 address family RP/0/RP0/CPU0:PE1(config)#router isis CORE address-family ipv6 ? unicast unicast topology RP/0/RP0/CPU0:PE1(config)#router isis CORE address-family ipv6 unicast ? segment-routing Enable Segment Routing RP/0/RP0/CPU0:PE1(config)#$ily ipv6 unicast segment-routing ? srv6 Enable SRv6 RP/0/RP0/CPU0:PE1(config)#$ily ipv6 unicast segment-routing srv6 ? locator Enter SRv6 Locator submode RP/0/RP0/CPU0:PE1(config)#$ily ipv6 unicast segment-routing srv6 locator ? WORD Locator name RP/0/RP0/CPU0:PE1(config)#$ily ipv6 unicast segment-routing srv6 locator IPA ? <cr> RP/0/RP0/CPU0:PE1(config)#router isis CORE address-family ipv6 unicast segment$ RP/0/RP0/CPU0:PE1(config-isis-srv6-loc)#show router isis CORE address-family ipv6 unicast segment-routing srv6 locator IPA ! ! ! ! RP/0/RP0/CPU0:PE1(config-isis-srv6-loc)#
Global Configuration modeでSRv6を定義するためにオンラインマニュアルを見ます。
RP/0/RP0/CPU0:PE1#configure
RP/0/RP0/CPU0:PE1(config)#?
segment-routing Segment Routing
RP/0/RP0/CPU0:PE1(config)#segment-routing ?
srv6 Segment Routing with IPv6 dataplane
RP/0/RP0/CPU0:PE1(config)#segment-routing srv6 ?
locators Configure Locators
RP/0/RP0/CPU0:PE1(config)#segment-routing srv6 locators ?
locator Configure a Locator
RP/0/RP0/CPU0:PE1(config)#segment-routing srv6 locators locator ?
WORD Specify locator name
RP/0/RP0/CPU0:PE1(config)#segment-routing srv6 locators locator IPA ?
prefix Configure locator's prefix value
RP/0/RP0/CPU0:PE1(config)#segment-routing srv6 locators locator IPA prefix ?
X:X::X/length Specify IPv6 subnet
RP/0/RP0/CPU0:PE1(config)#$s locator IPA prefix fc00:0:0:1::/64 ?
<cr>
RP/0/RP0/CPU0:PE1(config)#segment-routing srv6 locators locator IPA prefix fc0$
RP/0/RP0/CPU0:PE1(config)#show
Building configuration...
!! IOS XR Configuration 7.4.1
segment-routing
srv6
locators
locator IPA
prefix fc00:0:0:1::/64
!
!
!
!
end
RP/0/RP0/CPU0:PE1(config)#
「3.4 Step4:Locator定義(Locatorの設計)」で決めた通りにPE1へSRv6を定義します。
【IOS-XR:PE1のIS-IS及びGlobalにSRv6を定義コピペ用】
!PE1 ! configure router isis CORE address-family ipv6 unicast segment-routing srv6 locator IPA ! segment-routing srv6 locators locator IPA prefix fc00:0:0:1::/64 ! ! ! ! commit end
PE2はまだ定義せずにPE1だけを定義します。showコマンドの出力結果の右下に注目すると「 St/PfxRcd が 1 」であることからVPNV4経路を受信していることが確認できます。
RP/0/RP0/CPU0:PE2#show bgp all all summary Address Family: VPNv4 Unicast ----------------------------- BGP router identifier 10.0.0.3, local AS number 64512 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0x0 RD version: 0 BGP main routing table version 6 BGP NSR Initial initsync version 4 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs BGP is operating in STANDALONE mode. Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer Speaker 6 6 6 6 6 0 Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd fc00::1 0 64512 162 160 6 0 0 02:38:05 1 RP/0/RP0/CPU0:PE2#
左側のCE1から右側のCE2へ疎通確認を行いますが、当然片側のPE2では定義していませんので疎通できません。
CE1#ping 198.51.100.2 source 192.0.2.2 rep 100 Type escape sequence to abort. Sending 100, 100-byte ICMP Echos to 198.51.100.2, timeout is 2 seconds: Packet sent with a source address of 192.0.2.2 U.U.U.U.U.U.U.U.U.U.
PE2のIS-ISとGlobal定義をします。
【IOS-XR:PE2のIS-IS及びGlobalにSRv6を定義コピペ用】
!PE2 ! configure router isis CORE address-family ipv6 unicast segment-routing srv6 locator IPA ! segment-routing srv6 locators locator IPA prefix fc00:0:0:3::/64 ! ! ! ! commit end
CE1とCE2の異なるネットワークで疎通できるようになります。
CE1#ping 198.51.100.2 source 192.0.2.2 rep 100 Type escape sequence to abort. Sending 100, 100-byte ICMP Echos to 198.51.100.2, timeout is 2 seconds: Packet sent with a source address of 192.0.2.2 U.U.U.U.U.U.U.U.U.U.U..!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Success rate is 77 percent (77/100), round-trip min/avg/max = 8/11/17 ms CE1#
PE1を確認します。showコマンドの出力結果の右下に注目すると「 St/PfxRcd が 1 」であることからVPNV4経路を受信していることが確認できます。
RP/0/RP0/CPU0:PE1#show bgp all all summary Address Family: VPNv4 Unicast ----------------------------- BGP router identifier 10.0.0.1, local AS number 64512 BGP generic scan interval 60 secs Non-stop routing is enabled BGP table state: Active Table ID: 0x0 RD version: 0 BGP main routing table version 7 BGP NSR Initial initsync version 4 (Reached) BGP NSR/ISSU Sync-Group versions 0/0 BGP scan interval 60 secs BGP is operating in STANDALONE mode. Process RcvTblVer bRIB/RIB LabelVer ImportVer SendTblVer StandbyVer Speaker 7 7 7 7 7 0 Neighbor Spk AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down St/PfxRcd fc00::3 0 64512 208 209 7 0 0 00:31:46 1 RP/0/RP0/CPU0:PE1#
PE1でCE向けのvrfを確認すると
逆サイのネットワーク情報(B 198.51.100.0/24 [200/0])が伝搬していることが分かります。
RP/0/RP0/CPU0:PE1#show route vrf RED
Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP
A - access/subscriber, a - Application route
M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
Gateway of last resort is not set
C 192.0.2.0/24 is directly connected, 03:49:33, GigabitEthernet0/0/0/0
L 192.0.2.1/32 is directly connected, 03:49:33, GigabitEthernet0/0/0/0
B 198.51.100.0/24 [200/0] via fc00::3 (nexthop in vrf default), 00:10:11
RP/0/RP0/CPU0:PE1#
PE2でCE向けのvrfを確認すると
逆サイのネットワーク情報(B 192.0.2.0/24 [200/0])が伝搬していることが分かります。
RP/0/RP0/CPU0:PE2#show route vrf BLUE
Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - ISIS, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
U - per-user static route, o - ODR, L - local, G - DAGR, l - LISP
A - access/subscriber, a - Application route
M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
Gateway of last resort is not set
B 192.0.2.0/24 [200/0] via fc00::1 (nexthop in vrf default), 00:10:54
C 198.51.100.0/24 is directly connected, 03:51:52, GigabitEthernet0/0/0/1
L 198.51.100.1/32 is directly connected, 03:51:52, GigabitEthernet0/0/0/1
RP/0/RP0/CPU0:PE2#
これで、2拠点間のL3VPN over SRv6が構築できたことになります。
今回はここまでです。
おわりに
次回は、SRv6検証(IPv4 L3VPN over SRv6)その参(Validation)です。showコマンドやパケットキャプチャなどを使ってSRv6の観察をします。
最後までお読みいただき、ありがとうございました!
- SRv6検証(IPv4 L3VPN over SRv6)その壱(Introduction):https://chimay-wh.hatenablog.com/entry/srv6/l3vpn/Intro↩
- xrv9k-full9-x-7.4.1.qcow2 が含まれるIOSイメージ「refplat-20220211-fcs-iso.zip」はこちら(https://software.cisco.com/download/home/286193282/type/286326381/release/2.4.1)↩
- https://www.cisco.com/c/en/us/td/docs/routers/virtual-routers/xrv9k-70x/general/release/notes/b-release-notes-xrv9k-r701.html↩
- https://www.rfc-editor.org/rfc/rfc6890.html(Table 9: TEST-NET-1)↩
- https://www.rfc-editor.org/rfc/rfc6890.html(Table 13: TEST-NET-2)↩
- プロフェッショナルIPv6 第2版(https://booth.pm/ja/items/913273)2.3.2 IPv6アドレスの利用モデル - ■リンクローカルユニキャストアドレス↩
- https://www.rfc-editor.org/rfc/rfc4193.html↩
SRv6検証(IPv4 L3VPN over SRv6)その壱(Introduction)
はじめに
少し前に「Segment Routing Part III: SRv6」が発売されました(October 12, 2024)。
「Segment Routing PartⅠ」はSR MPLSの本です。
「Segment Routing PartⅡ」はSR MPLSのSR-TEに特化した内容の本です。
最近開催できていないのでアレですが、不定期で「Segment Routing」の勉強会をやっていました。そのうち再開します。

本読んでも良く分からん検証しながら本を読んだ方が良さそうだと思い、簡単に検証できそうな例を探し求めてYouTubeを眺めていると良いものがありました。
www.youtube.com 今回は、この構成を元ネタとしてSRv6環境をCML2で構築して手を動かしてみようという話をします。全3回の予定です。
SRv6検証(IPv4 L3VPN over SRv6)その壱(Introduction)
↑今回はココ
SRv6検証(IPv4 L3VPN over SRv6)その弐(Implementation)
SRv6検証(IPv4 L3VPN over SRv6)その参(Validation)
1. Topology


2. Terminology
SR : Segment Routing
ネットワーク ドメイン間のトラフィックエンジニアリングと管理を簡素化するソースルーティングのことです。
TE : Traffic Engineering
最適な経路選択や、明示的なトラフィックの経路変更のような経路制御をする技術です。
source routing
送信元がデータの経路を指定する技術です。通常はルーターが経路を決めますが、ソースルーティングでは送信元が最適な経路を選び、データが経路指示に従って目的地まで進みます。
MPLS : Multi-Protocol Label Switching
ラベルと呼ばれるタグを使用したパケット転送技術です。IPアドレスの代わりにラベルを使うと言えば概ね正しいです。
RSVP-TE : Resource Reservation Protocol-Traffic Engineering
MPLSネットワークでトラフィックエンジニアリングを行うためのプロトコルです。
個人的な感想なのですがRSVP-TEは大変面倒です。経路制御で使うルータに対して個別に設定をしないといけない。
例えば経路制御で通過するルータが10個あったら10個の個別定義が必要になります。(同一定義はコピペして部分的に変更することで多少は楽が出来るかもしれませんが)通過するルータのステート管理が必要な、ステートフルというのがRSVP-TEの特徴です。
SRを使えばこれが超絶楽になります。ソースルーティングなので送信元に、どのような経路制御をしたいのかを指定すれば良いからです。通過するルータのステート管理が不要になり、ステートレスなのがSRの特徴です。
SRv6 : Segment Routing over IPv6
SRは、SR MPLSとSRv6の二種類があります。何をベースにルーティングをするのかで名称が異なります。
SR MPLS:MPLS(ラベル)網でソースルーティングをする
SRv6:IPv6データ網でソースルーティングをする
L3VPN : Layer 3 Virtual Private Network
レイヤー3 での IP の相互接続を担保する VPN であり、異なる拠点同士は別の Prefix で構成します。
今回の検証では、拠点左(CE1:192.0.2.0/24)と拠点右(CE2:198.51.100.0/24)の異なるNetwork Prefixをあたかも同じネットワークにいるかのように相互接続します。
IS-IS : Intermediate System to Intermediate System
OSIプロトコル・スイートのレイヤ3:ネットワーク層のルーティングプロトコルのことです。OSPFと同じリンクステート型のルーティングプロトコルです。
大抵は、IPネットワークも扱えるIntegrated IS-IS のことを指します。長いので私はIS-ISと呼んでいます。生真面目Integrated IS-ISが~という人もいらっしゃるかもしれませんが、多分IS-ISと言えばIntegrated IS-ISのこと言っているなと通じるのではないかと思います。
余談になりますが、IS-ISの方がSRの実装が早いので、今回もOSPFではなくIS-ISを選びました。
うぁあ…ああ…。私は、島崎健一です。
— やすお (@chimay_wh) 2024年10月20日
昭和15年、1940年2月17日生まれ...
ん...辰年77歳。
Cisco ASR 9000 は、IGPとしてOSPFを
サポートしているのですが、
TLV(Type-Length-Value)形式で
拡張が容易であるIS-ISをよく使います。
IS-ISの方がSR(Segment Routing)の機能実装が早いので。 pic.twitter.com/4b54M9FR6E
2024/10/21時点での話ですが、どうやらCisco IOS-XRのOSPFv3はSRv6をまだサポートしていないようです。
While there is now a RFC for SRv6 support on OSPFv3 (https://t.co/eupK04RCR2), it is very recent and does not have a lot of tractions. All/most production deployments leverage ISIS as IGP.
— IOS XR (@CiscoIOSXR) 2024年10月21日
SID : Segment Identifier
SRv6において、IPv6アドレス形式(128bit)で表現する、ネットワーク内での”特定のポイント”を示す識別子のことです。
Locator
特定のSRv6ノードのアドレスを表す最上位ビットで構成されるSIDの最初の部分のことです。
SRv6、SID、Locatorが本記事のキーワードです。
電車に例えると想像しやすいかと思います。
まず、ノード(ルーター)は「駅」に相当します。電車(データ)がどこからどこに行くか、どの駅を通るかを決めるルールや方法がSRv6だと思ってください。
乗換案内アプリを使って、出発点から到着点までを検索すると候補となる経路がいくつか表示されます。
SRv6では「駅で何をするか」を SID で表現します。
SID は、駅そのものではなく、その駅で実行する動作(乗り換え・通過など)や、必要に応じて「何番線に到着する」「何番線から発車する」といった細かい指示まで含んだ“命令”です。
そして、この SID がどの駅に属するかを示すのが Locator です。Locator は“駅の住所”に相当し、SID がどのノードで実行されるかを決めます。
箇条書きにした方が分かりやすいですね。
ノード(Node)=駅
SID=その駅で実行する“具体的な行動”
Locator=駅の住所(どの駅か)
Function=駅で何をするか(乗り換え・通過など)
Argument=Functionの補助(細かい指示(n番線に発着等))
詳細は次回(その弐)説明しますが、SIDの構成は以下の通りです。

3. 検証の流れ
SRv6とは何かが何となく分かったところで、どのように設定して検証するのかを説明します。
次回、SRv6検証(IPv4 L3VPN over SRv6)その弐(Implementation)





次々回、SRv6検証(IPv4 L3VPN over SRv6)その参(Validation)
showコマンドやパケットキャプチャなどを使ってSRv6の観察をします。

4. 準備
IOS-XRが動く環境を準備します。
CML2、EVE-NG、containerlab、GNS3、まさかの実機!?何でも良いのでIOS-XRが動く環境を準備します。
本記事では、CML2を使用します。IOS-XEもSRv6をサポートしていますが、今回はIOS-XRでSRv6を検証します。
4.1 CML2
今回の検証は、5ノード構成ですから「CML2.8.0 Free Tier」で検証可能です。
※ ただし、IOS-XRのイメージファイルを持っている場合に限ります。
※ CML2.8.0 Free Tier の「refplat-20250616-free-iso.zip」にはIOS-XRのイメージはありません。
手前味噌で恐縮ですが、以下のリンク先に「CML2.8.0 Free Tier」の記事を記載しています。
chimay-wh.hatenablog.com
4.2 CML2に必要なリソース
今回の検証構成5台の内訳は以下の通りです。
CEルーターは、CSR1000v(IOS-XE)を2台使用します。
PE / Pルーターは、XRv 9000(IOS-XR)を3台使用します。
このIOS-XRが曲者です。
あくまでも個人の検証実績ですが、以下のリソースで検証します。マシンスペックと要相談ですね
— やすお (@chimay_wh) 2021年7月14日
ノード毎に必要なリソース一覧です。https://t.co/lEil2cs9Mh
7. What resources are required by each node type?
IOS-XRv 9000 : 4vCPU,20GB Memory 必要とありますが
私の環境では 、2vCPU,10GB Memory でも動作可でした。
CSR1000vがvCPU:1core,memory:4GB
XRv 9000がvCPU:2core,memory:10GB
要するに、vCPU:8core, memory:38GBが最低限必要なリソースです。
仮想化基盤環境:CPU-1sockets,20cores, MEM-64GB を使用する予定なので、これならストレスなく検証できそうです。
おわりに
次回は、SRv6検証(IPv4 L3VPN over SRv6)その弐(Implementation)です。
「3. 検証の流れ」に沿って実際に設定していく内容を執筆します。
最後までお読みいただき、ありがとうございました!
CML 2.9.0をOVAファイルからインストールしてみた
ProxmoxでもOVFやOVAをインポートできるようになったし、CML 2.9.0がリリースされたし、そこら辺のことを書きます。
OVF (Open Virtualization Format) は、
仮想マシンのデータを入れる「フォーマット(形式)」
→ OVF = バラバラの荷物を箱に入れた状態
OVA (Open Virtualization Appliance) は、
OVFのデータをひとまとめにした「1つのファイル」
→ OVA = 箱をラッピングして1つにまとめた状態
キタ――(゚∀゚)――!!
— やすお (@chimay_wh) 2025年7月19日
待望の新しいリリース!早速試してみよー😆
✨CML v2.9.0✨ https://t.co/hjfiltIfV9
- 0. 事前準備
- 1. Proxmox VE 8.3 でGUIが便利になった
- 2. Importメニューの追加
- 3. OVAファイルのインポート
- 4. CML 2.9.0 セットアップ
- 4.1. CML2 Licensing
- 5. CML 2.9.0 を使ってみよう
0. 事前準備
My Account でライセンスキーを控えておきます。
Home > My Orders
learningnetworkstore.cisco.com

え!待って!ISOデカすぎ!
— やすお (@chimay_wh) 2025年7月19日
13.1GB
これがないと何も動かせないから仕方ないけど pic.twitter.com/Uan1wKBoHW

余談ですが、CML-Personal本来は$199.00です。ちょいちょいセールを開催しているので安くなった時を見計らって購入するとお得です。私は毎年、Cyber MondayのセールでCMLを購入しています。昨年は34%OFFで購入することができました。
1. Proxmox VE 8.3 でGUIが便利になった
CLIからしかインポートできなかったOVF,OVAがGUI(Web)でインポートできるようになったそうです。
やったね!
https://pve.proxmox.com/wiki/Roadmap#Proxmox_VE_8.3 Highlights ~ 途中省略 ~ More streamlined guest import from files in Open Virtualization Format (OVF) and Open Virtualization Appliances (OVA). OVF and OVA files can be directly imported from file-based storages in the GUI. This makes it easier to import virtual appliances and simplifies migration from hypervisors supporting OVF/OVA export. Users can upload OVA files from their local machine or download them from a URL. The improved OVF/OVA importer now also recognizes the guest OS type, NICs, boot order, and boot type.
前回(https://chimay-wh.hatenablog.com/entry/2024/11/29/230904)は、Proxmox VE 8.1.3を使っていたので
OVAを使ってインポートできなかったのですが、今回はProxmox VE 8.4.0 で環境構築をします。
(。´・ω・)ん? インポートなくね?

どうやら何かしないと使えないらしい
2. Importメニューの追加
ストレージにディレクトリを追加します。



これでCML 2.9.0のOVAファイルをインポートできます。
3. OVAファイルのインポート






VM ID : ご自由に Memory : メモリの余裕は心の余裕 CPU Type : host Name : ご自由に









Bus/Device : SCSI Use CD/DVD disc image file (iso) を選択 Storage : local ISO image : refplat-20250616-fcs.iso
これでCML 2.9.0をインストールする準備が整いました。VMを起動するとインストールが始まります。

4. CML 2.9.0 セットアップ
以前からの手順とほぼ変わりません。途中新しいoption選択できますよ、というのがあるくらいです。











多分今までこのOption選択はなかった記憶です。OpenSSH と PATtyを後からON/OFFできるようです。




全然10分も必要ない!めっちゃ早く終わりました!


4.1. CML2 Licensing









5. CML 2.9.0 を使ってみよう

developer.cisco.com

これだけあれば、Routing & Switching だけでなく認証の検証、セキュリティの検証など実施できる幅が各段に広がります。
CML 2.9.0で提供されているイメージのバージョンも見ると新しいものが多いです。

CML2はご存じの通りhttpsでアクセスするブラウザのツールです。そのブラウザの中で更にブラウザを開くことができます。予告Youtubeで存在は知っていたものの、実際に自分で操作して目の当たりにすると感動しました。

次に驚いたのは、FRRの起動の早さです!
((꜆꜄ ˙꒳˙)꜆꜄꜆ポチ(FRRを選択して右クリック[Start])で即起動完了!

お試しで使ってみて分かったことは、CML2をフル活用するには十分なリソース必要ということです。XRv9000動かしたかったのですが、CPUがパワー不足で4コア程度ではエラーになり起動できませんでしたし、Diskもそれなりに消費しています。

GitHubにも色々あるようなので、少しづつ検証していきます。
github.com
最後までお読みいただきありがとうございました。
Vagrantを使ってVirtualBoxでCentos7を構築してみた
- 1. はじめに
- 2. Vagrantとは
- 3. VirtualBox インストール
- 4. Vagrant インストール
- 5. 仮想マシンの条件
- 6. Vagrantで仮想マシンをデプロイ
- 7. 仮想マシンへssh接続
- 8. おわりに
1. はじめに
2025年の書初めです。もうすぐ一月終わって豆撒きの季節がきます。何も成果を上げずに一ヶ月が経とうという現実に目を背けたくなります。
仮想マシンを立てては壊し、立てては壊しをよくするのですが、毎度GUI操作が面倒だなーと思っています。
毎度ISOファイルをダウンロードし、保存しようとしたら既に持っていたりして、我ながら管理の雑さ加減に呆れます。
何か良い方法ないかなーと思っていたら良い物がありました。
そう「Vagrant」です。これをある程度使いこなせれば、煩わしい作業が楽になるのでは?と淡い期待を抱いて検証を始めました。
2. Vagrantとは
仮想化ソフトウェア(VirtualBox、VMwareなど)を代理で操作して仮想マシンをセットアップしてくれるツールです。
(1) vagrant init コマンドでVagrantfileを作成し
(2) Vagrantfile を編集して
(3) vagrant up コマンドで仮想マシンをデプロイ
簡単にこの3ステップで仮想マシンをデプロイできます。
しかも、かなり多くのLinuxディストリビューションとWindowsに対応しています。
以下のリンク先をご覧いただければ分かります。
HashiCorp Cloud Platform
今回は、VirtualBox with Vagrantで、Centos7を簡単セットアップする検証をします。
3. VirtualBox インストール
以下のリンク先からVirtualBoxをダウンロードします
Oracle VM VirtualBox - ダウンロード| Oracle Technology Network | オラクル | Oracle 日本
2025/01/26時点の最新リリースは、v7.0.22です。
ダウンロードしたら、VirtualBox-7.0.22-165102-Win.exeを管理者として実行でインストールします。 次へ、次へ、...、install、Finish、みたいな感じで特に難しいことはありません。
4. Vagrant インストール
以下のリンク先からVagrantをダウンロードします。
Install | Vagrant | HashiCorp Developer
コマンドプロンプトでCPUのアーキテクチャを確認します。
c:\>set processor PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 154 Stepping 4, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9a04 c:\>
"PROCESSOR_ARCHITECTURE=AMD64"ということが分かったので、Vagrantも左の”AMD64”をダウンロードします。
次へ、次へ、...、install、Finish、みたいな感じで特に難しいことはありません。
最後に再起動要求があったかも知れません。いきなり再起動ではなくてタイミングを自分で選べたような気がします。
インストール後はPathを切っておきます。
(1) 「Windowsキー」+「Pauseキー」で詳細情報を開きます。
(2) システムの詳細設定をクリックします。
(3) 環境変数をクリックします。
(4) 環境変数ウィンドウの上段「環境変数」で「Path」を選択して、編集をクリックします。
(5) 「新規」をクリックし「C:\Program Files (x86)\Vagrant\bin」を入力して「OK」をクリックします。
(6) 環境変数ウィンドウの「OK」をクリックし、システムのプロパティで「OK」をクリックします。
コマンドプロンプトでPathが切れていることが確認できます。
c:\>vagrant -v Vagrant 2.4.3 c:\>
5. 仮想マシンの条件
今回は、サポートが切れたCentos7をデプロイします。
Tera Termで操作ログを記録したいので、Tera Term接続に使うHost-onlyのNICが欲しいです。また、物理NICをブリッジ接続してパソコン外部の機器と接続するNICも欲しいです。
つまり、このような使い方をする仮想マシンをデプロイしようとしています。

余談ですが、Vagrantを使うとDefaultで、NATインターフェースを1つ作成してくれます。
つまり今回は以下の3つをデプロイするような「Vagrantfile」を編集する必要があります。
(1) NAT Network(Defaultで作成してくれるので、記載の必要はなし!)
(2) Host-only networking
(3) Bridged networking
VirtualBoxにおけるそれぞれのネットワークはマニュアルに詳しく書いてあるので説明は割愛します。
Virtual Networking
パソコンのどのインターフェースをブリッジ接続するかを調べる必要がある。
PowerShellでブリッジ接続したい「イーサネット4」のInterfaceDescriptionを調べておきます。
※ 今回使いたいUSB-NICが「イーサネット4」でした。
PS C:\> Get-NetAdapter | Where-Object { $_.InterfaceDescription -eq "Realtek USB GbE Family Controller" } | Select-Object Name, InterfaceDescription, ifIndex, Status, LinkSpeed
Name : イーサネット 4
InterfaceDescription : Realtek USB GbE Family Controller
ifIndex : 92
Status : Up
LinkSpeed : 1 Gbps
PS C:\>
ブリッジ接続するのは、「Realtek USB GbE Family Controller」であることが分かりました。
仮想マシンのストレージは、シンプロビジョニングで128GBにしてくれるようです。
メモリとCPUは好きに指定出来るようなので、2048MBのメモリと2コアのvCPUとします。
Name:SNMPv3-Mgr-Centos7-Vagrant <<<< 仮想マシンのホスト名でなく、VirtualBoxの管理名(指定しないとクソダサ名が付くので自分が分かる名前を付けます) CPU :2core RAM :2048mb HDD :128GB <<<< 勝手にシンプロビジョニングされる NIC1:NAT(10.0.2.15/24) <<<< 勝手に作られる NIC2:Host-only(192.168.56.20/24) <<<< Tera Term 接続用 NIC3:Bridged (172.16.0.1/24) <<<< Realtek USB GbE Family Controller を経由してパソコン外部と接続する
6. Vagrantで仮想マシンをデプロイ
PowerShellを起動して、仮想マシンをデプロイするディレクトリを作成します。プロジェクトディレクトリと呼ぶらしいです。
プロジェクトディレクトリ「C:\WORK\CentOS\CentOS7」
PS C:\> mkdir C:\WORK\CentOS\CentOS7
ディレクトリ: C:\WORK\CentOS
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2025/01/26 20:31 CentOS7
PS C:\> cd C:\WORK\CentOS\CentOS7
プロジェクトディレクトリに移動します。
PS C:\> cd C:\WORK\CentOS\CentOS7 PS C:\WORK\CentOS\CentOS7> dir PS C:\WORK\CentOS\CentOS7>
vagrant init コマンドを使って「CentOS7」の「Vagrantfile」を生成します。
PS C:\WORK\CentOS\CentOS7> vagrant init generic/centos7 --box-version 4.3.12
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
PS C:\WORK\CentOS\CentOS7>
PS C:\WORK\CentOS\CentOS7> dir
ディレクトリ: C:\WORK\CentOS\CentOS7
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2025/01/26 20:35 3502 Vagrantfile
PS C:\WORK\CentOS\CentOS7>
Vagrantfile が生成されるので、これを編集します。
【生成されたVagrantfile】
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "generic/centos7"
config.vm.box_version = "4.3.12"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessible to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
# config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.
# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
end
生成された「Vagrantfile」はコピーして「Vagrantfile - org」としておく(単なるバックアップです)
試行錯誤して「Vagrantfile」はこうなりました。
【編集後のVagrantfile(必要なものだけを記載しました)】
Vagrant.configure("2") do |config|
config.vm.box = "generic/centos7"
# NIC 1 - NAT 10.0.2.15/24 virtualbox default
# NIC 2 - Host-only Ethernet Adapter : For control this VM to SSH
config.vm.network "private_network", ip: "192.168.56.20"
# NIC 3 - Bridge Ethernet Adapter : For connecting with your training partner in crime
config.vm.network "public_network", ip: "172.16.0.1", netmask: "255.255.255.0", bridge: "Realtek USB GbE Family Controller"
# VirtualMachine's information
config.vm.provider "virtualbox" do |vb|
# VirtualBox's console admin name
vb.name = "SNMPv3-Mgr-Centos7-Vagrant"
# VirtualMachine's memory
vb.memory = "2048"
# VirtualMachine's CPU
vb.cpus = 2
end
end
プロジェクトディレクトリには、バックアップした「Vagrantfile -org」と実際に使う「Vagrantfile」が存在しています。
PS C:\WORK\CentOS\CentOS7> dir
ディレクトリ: C:\WORK\CentOS\CentOS7
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2025/01/26 20:51 733 Vagrantfile
-a---- 2025/01/26 20:35 3502 Vagrantfile - org
PS C:\WORK\CentOS\CentOS7>
この状態で、「vagrant up」コマンドを実行します。
初めて実行する場合は、バックグラウンドでISOをダウンロードしているようで少し時間がかかりますが、放置していればデプロイが完了します。
PS C:\WORK\CentOS\CentOS7> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'generic/centos7'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'generic/centos7' version '4.3.12' is up to date...
==> default: Setting the name of the VM: SNMPv3-Mgr-Centos7-Vagrant
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
default: Adapter 3: bridged
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
~ 途中省略 ~
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.2.44
default: VirtualBox Version: 7.0
==> default: Configuring and enabling network interfaces...
PS C:\WORK\CentOS\CentOS7>
これでもうVirtualBoxを使ったデプロイが完了して、仮想マシンが起動しています。
名前を付けたはずなのに、「default」というのが気になりますが、Vagrantが認識している名前が「default」なだけです。
PS C:\WORK\CentOS\CentOS7> vagrant status Current machine states: default running (virtualbox) The VM is running. To stop this VM, you can run `vagrant halt` to shut it down forcefully, or you can run `vagrant suspend` to simply suspend the virtual machine. In either case, to restart it again, simply run `vagrant up`. PS C:\WORK\CentOS\CentOS7>
VirtualBoxを起動すると、仮想マシンが起動していることが確認できます。

Name:SNMPv3-Mgr-Centos7-Vagrant CPU :2core RAM :2048mb HDD :128GB(Default) NIC1:NAT(Default) NIC2:ホストオンリーアダプター NIC3:ブリッジアダプター "Realtek USB GbE Family Controller"
7. 仮想マシンへssh接続
「vagrant ssh」コマンドでssh接続できます。
ID/Passwdは「vagrant/vagrant」なのですが、このコマンドでログインすると認証なしで接続できます。
PS C:\WORK\CentOS\CentOS7> vagrant ssh [vagrant@centos7 ~]$ [vagrant@centos7 ~]$ uname -n centos7.localdomain [vagrant@centos7 ~]$ ip -br a lo UNKNOWN 127.0.0.1/8 eth0 UP 10.0.2.15/24 eth1 UP 192.168.56.20/24 fe80::a00:27ff:fe08:1866/64 eth2 UP 172.16.0.1/24 fe80::a00:27ff:fef6:4123/64 [vagrant@centos7 ~]$
操作ログを記録したいので、Tera Termで接続します。
ID/Passwdは「vagrant/vagrant」なのですが、ログインできません。

Vagrantで仮想マシンをデプロイすると、SSHをするにはパスワード認証ではなく、
秘密鍵を使った認証だけが出来るようになっています。
PS C:\WORK\CentOS\CentOS7> vagrant ssh-config Host default HostName 127.0.0.1 User vagrant Port 2222 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile C:/WORK/CentOS/CentOS7/.vagrant/machines/default/virtualbox/private_key IdentitiesOnly yes LogLevel FATAL PubkeyAcceptedKeyTypes +ssh-rsa HostKeyAlgorithms +ssh-rsa PS C:\WORK\CentOS\CentOS7>
秘密鍵のありかは...↓
「 C:/WORK/CentOS/CentOS7/.vagrant/machines/default/virtualbox/private_key 」です。




ヽ(; ゚д゚)ノ ビクッ!!
何か見覚えのないIPでアクセスされている!?何事?
Last login: Sun Jan 26 12:09:45 2025 from 10.0.2.2
10.0.2.2 って誰?
10.0.2.2 って誰だよ!
— やすお (@chimay_wh) 2025年1月21日
て思ったらVirtualBoxの内部IPだったようだ pic.twitter.com/yM0uqpKkhw
VirtualBoxのマニュアルに書いてありました。
Chapter 9. Advanced Topics
攻撃された訳ではなく、PowerShellからログインしていた己でしたw

毎度、秘密鍵を指定してログインするのは面倒なので、パスワード認証に変更します。
sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
/etc/ssh/sshd_config を編集したので、サービスを再起動します。
[vagrant@centos7 ~]$ sudo systemctl restart sshd
[vagrant@centos7 ~]$
[vagrant@centos7 ~]$ sudo systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2025-01-26 12:35:21 UTC; 12s ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 2950 (sshd)
CGroup: /system.slice/sshd.service
mq2950 /usr/sbin/sshd -D -u0
Jan 26 12:35:21 centos7.localdomain systemd[1]: Stopped OpenSSH server daemon.
Jan 26 12:35:21 centos7.localdomain systemd[1]: Starting OpenSSH server daemon...
Jan 26 12:35:21 centos7.localdomain sshd[2950]: Server listening on 0.0.0.0 port 22.
Jan 26 12:35:21 centos7.localdomain sshd[2950]: Server listening on :: port 22.
Jan 26 12:35:21 centos7.localdomain systemd[1]: Started OpenSSH server daemon.
[vagrant@centos7 ~]$
これで、以後はパスワード認証でログインできるようになります。
8. おわりに
Vagrantは面倒なGUI操作を減らして簡単に仮想マシンをデプロイするのに大変便利です。 GUI操作だと1台づつしか作れませんが、VagrantはCLI操作なので並行して何台も仮想マシンをデプロイすることもできるのではないでしょうか。(試してはいませんが)
最後までお読みいただき、ありがとうございました。
CML2 Free TierをProxmoxに構築してみた
1.はじめに
CML2のライセンスが切れた! 私は毎年、Cyber MondayのセールでCMLを購入しています。
昨年は11/27、一昨年は11/29といった感じで11月末の恒例行事でした。
今年は若干ズレて12/3の深夜です。ちょっと間が空いてしまいます。 今買うの得策ではない!だが、検証はしたい!
運の良いことに最近無償版のCMLが提供されました。これを使えば良いということで早速試してみます。
https://learningnetwork.cisco.com/s/question/0D56e0000E3OcmbCQC/cml-28-free-tier
2.実行環境
箱:CPU-1sockets,20cores, MEM-64GB
Proxmox VE 8.1.3
CML Release 2.8.0 Free Tier
3.準備
CiscoからCMLのソフトウェアをダウンロードします。
https://software.cisco.com/download/home/286193282/type/286326381/release/2.8.0%20Free%20Tier
※ 要Ciscoアカウントによるログイン
① cml2_f_2.8.0-6_amd64-32-iso.zip
→ CML2.8.0 Free-Tierのイメージ
② refplat-20241016-freetier-iso.zip
→ ノードイメージ
※ ZIPは解凍します。
4.CML登録
先ほどダウンロードしたファイルをProxmoxにアップロードします。
[local(host)] > [ISO Images] > [Upload] > Select File > Upload

アップロード完了後のポップアップ画面は閉じます。

ファイルをアップロード完了した状態はこのようになります。

① cml2_f_2.8.0-6_amd64-32-iso
② refplat-20241016-freetier-isoノード作成
[Node] -> [Create VM]

3.ホスト名登録
CML2.8.0.FREEとしました

4.OS設定
先ほどダウンロードしたcml2_2.8.0-6_amd64-32.isoを登録します。

5.System設定
BIOS はOVMF(UEFI)とし、EFI Storageはlocal-lvmを選択します。

6.Disks設定
Disk Sizeを設定します。今回はお試しなので100GBとしています。

7.CPU設定
Socket,Coresも必要な分を割り当てます。また、Typeはhostにします。

8.Memory設定
必要な容量をMemoryに設定します。
64GB割り当てたいので、1024×64=65536

9.Network設定
Bridge(vmbr0)、Model(VirtIO (paravirtualized)を設定します。

10.設定確認
設定内容が問題ないか確認し、[Finish]で完了します。


CD/DVDが足りないのに気付きました!

11.ノードイメージ用のISOを追加するの失念しておりました。追加します。

初期セットアップの準備が出来ました!

5.CML初期セットアップ
ノードを起動すればセットアップが走ります。
VM ID(hostname)> Console > Start Now

インストールシェルの実行を見守ります。放置していれば、初期セットアップ画面で止まるはずです。

キター!

ココまで来ればもう出来たも同然です!

規約に同意します。

続行します。

Brief Help も続行します。

クラスタリングとか今はどうでもいい!無視します!続行です。

ホスト名を入力して続行します。
Default ホスト名はDefault cml-controllerです。 cml2.8.0freeと名付けました。

怒られました。チッ(・д・)

改めてホスト名は、cml-freeと名付けました。

罠があります。キーボードに気を付けて!
パスワードに記号を使う場合は要注意です!
私のセットアップは日本語キーボードを使っていましたが、USキーボードでセットアップが進んでいました。
sysadmin(CMLのメンテナンスで使うユーザ)のパスワードを入力します。

admin(通常使うユーザ)のパスワードを入力します。

CMLのネットワークを設定します。DefaultはDHCPですが、私は固定IPを使いたいので変更します。

IPv4を設定します。ご自身の利用環境に合わせてください。
例)IP 192.168.2.21, 255.255.255.0, GW 192.168.2.1, DNS 8.8.8.8

間違いがないか最後の確認です。

用が済んだらノードイメージのISOは削除してね!(ry

ステータスバーあると安心しますね。終わるのを待ちます。

お急ぎの方はカウントダウンが終わる前に< OK >押下します。
CMLを利用するためのURLも表示されます。

CMLのセットアップが完了しました。

6.CMLログイン
ブラウザからログインします。
https:// CML初期セットアップで指定したIPアドレス/

ログイン成功!

必須では無いようですが、登録しておくとお得な情報を連絡してくれると思います。

7.ノードイメージ追加
Release 2.8.0 Free Tier で提供されるイメージはこれです。

これでも十分検証はできるのですが、私はIOS-XRを使いたいのでイメージを追加します。
追加するイメージは頑張って入手してください。
手前味噌で恐縮ですが、これを見ながら実施すれば追加できるはずです。
chimay-wh.hatenablog.com
と思ったのですが、その前に一手間必要なようです。

Release 2.8.0 Free Tier には、赤枠のIOS XRv 9000はありません。
キャプチャ取り忘れてしまいました。
追加の一手間とは、NODE DEFINITIONSを追加することです。
スライドバーを見れば分かると思いますが、手入力で定義するのは出来なくはなさそうだけど、面倒なのは目に見えています。時間は有限なので、ググって楽をしましょう。

ググれば、iosxrv9000の定義ファイルは手に入ります。
内容は以下のようなものです。
【iosxrv9000.yaml】▼ググれば見つかります
id: iosxrv9000
configuration:
generator:
driver: iosxrv9000
provisioning:
volume_name: config
media_type: iso
files:
- name: iosxr_config.txt
editable: true
content: |-
hostname inserthostname-here
username cisco
group root-lr
group cisco-support
password cisco
!
username admin
group root-lr
group cisco-support
password cisco
!
username lab
group root-lr
group cisco-support
password cisco
!
end
device:
interfaces:
has_loopback_zero: true
min_count: 3
default_count: 4
loopback:
- Loopback0
management:
- MgmtEth0/RP0/CPU0/0
physical:
- MgmtEth0/RP0/CPU0/0
- donotuse1
- donotuse2
- GigabitEthernet0/0/0/0
- GigabitEthernet0/0/0/1
- GigabitEthernet0/0/0/2
- GigabitEthernet0/0/0/3
- GigabitEthernet0/0/0/4
- GigabitEthernet0/0/0/5
- GigabitEthernet0/0/0/6
- GigabitEthernet0/0/0/7
- GigabitEthernet0/0/0/8
- GigabitEthernet0/0/0/9
- GigabitEthernet0/0/0/10
- GigabitEthernet0/0/0/11
- GigabitEthernet0/0/0/12
- GigabitEthernet0/0/0/13
- GigabitEthernet0/0/0/14
- GigabitEthernet0/0/0/15
- GigabitEthernet0/0/0/16
- GigabitEthernet0/0/0/17
- GigabitEthernet0/0/0/18
- GigabitEthernet0/0/0/19
- GigabitEthernet0/0/0/20
- GigabitEthernet0/0/0/21
- GigabitEthernet0/0/0/22
- GigabitEthernet0/0/0/23
- GigabitEthernet0/0/0/24
- GigabitEthernet0/0/0/25
- GigabitEthernet0/0/0/26
- GigabitEthernet0/0/0/27
- GigabitEthernet0/0/0/28
- GigabitEthernet0/0/0/29
- GigabitEthernet0/0/0/30
serial_ports: 4
inherited:
image:
ram: true
cpus: true
cpu_limit: true
data_volume: false
boot_disk_size: false
node:
ram: true
cpus: true
cpu_limit: true
data_volume: false
boot_disk_size: false
general:
description: Cisco IOS XRv 9000 Router platform
nature: router
read_only: true
schema_version: 0.0.1
sim:
linux_native:
cpus: 4
disk_driver: virtio
driver: iosxrv9000
libvirt_domain_driver: kvm
nic_driver: virtio
ram: 20480
cpu_limit: 100
boot:
timeout: 3600
completed:
- '--- Administrative User Dialog ---'
- '%MGBL-CVAC-4-CONFIG_DONE'
pyats:
os: iosxr
series: iosxrv9k
config_extract_command: show running-config
ui:
description: |-
Cisco IOS XRv 9000 Router platform
It is recommended to use 20 GB and 4 vCPUs.
At a very minimum, 10 GB of DRAM and 2 vCPUs are required.
##### Note
The first data interface is the **4th interface**:
- The first interface is management,
- second and third are marked as 'do not use' and should not be connected to anything
- The next interfaces are actual data interfaces.
[CCO Link](https://www.cisco.com/c/en/us/support/routers/ios-xrv-9000-router/tsd-products-support-series-home.html)
group: Cisco
icon: router
label: IOS XRv 9000
label_prefix: xr9kv-
visible: true
iosxrv9000.yamlが手に入っている前提で進めます。
CMLの画面右上にある TOOLS > Node and Image Definitions をクリックします。

右上のIMPORTをクリックします。

Node Definition をクリックして、iosxrv9000.yamlを選択します。

サクッと追加されるので、GO TO NODE DEFINITIONをクリックします。

ここまでを先に実施しておかないと、イメージを追加する時にNode DefinitionからIOS XRv 9000を選べないと思うので積みます。追加がうまくいけばこうなるはずです。

あとは、IOS XRv 9000のイメージを追加すればOKです。
8.検証
IOS XRv 9000のイメージ追加もできたので、SRv6の検証をしました。
検証内容は後日公開します。鋭意作成中であります。
CML 2.8.0 Free-TierにIOSXRv9000イメージを追加し、L3VPN over SRv6が出来る実績を解除した pic.twitter.com/MwwJBqzF0l
— やすお (@chimay_wh) 2024年11月29日
9.おわりに
CML Release 2.8.0 Free Tier は5ノード制限がありますが、お試しで使ってから、もっとノード増やしたいと思ったら有償ライセンスを買えば良いと思います。
ただ買うなら安くしたいですよね。一年間使えるとは言え、税抜きで$199.00は安くはないですから!
Cyber Mondayのセール活用すれば更にお安く手に入りますよ!
https://blogs.cisco.com/learning/learning-deals-2024

日本時間ですと、12月3日の午前1時から午前5時で通常の40% offで購入できます。
$199.00 ー- Cyber Monday 40% off ーー> $119.40
最後までお読みいただき、ありがとうございました。
Single-Domain SR-TE その10(On Demand Next-hop:ODN with L3VPN)
On Demand Next-hop:ODN with L3VPN が理解できたので自分のメモ用にアウトプットします。
- 1. On Demand Next-hop:ODN
- 2. Topology
- 3. Config
- 4.下準備(各種メトリックの仕込み)
- 5. ODN の実装
- 5.2 Head-End(h_N1)
- 5.3 End-point(h_N6)
- 6. 検証
- 7. もしかして ODN って Head-end のみでも定義できる?
- 8. 参考
1. On Demand Next-hop:ODN
ODNはSR-PolicyのInstance化を自動化するもので、指定の Prefix をオンデマンドに SR-TE に反映します。
今回は、Dynamic SR-TE を使ったODN(L3VPN)を検証します。
2. Topology

3. Config
◆h_N1
hostname h_N1
group CCIE-ISIS
router isis '.*'
is-type level-2-only
address-family ipv4 unicast
metric-style wide
segment-routing mpls
!
interface 'Gi.*'
point-to-point
address-family ipv4 unicast
!
!
interface 'Loopback .*'
address-family ipv4 unicast
!
!
!
end-group
!
vrf A
rd 10:1
address-family ipv4 unicast
import route-target
200:1
!
export route-target
100:1
!
!
!
interface Loopback0
ipv4 address 1.1.1.1 255.255.255.255
!
interface MgmtEth0/RP0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.2.1 255.255.255.0
!
interface GigabitEthernet0/0/0/1.20
vrf A
ipv4 address 198.51.100.1 255.255.255.0
encapsulation dot1q 20
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.3.1 255.255.255.0
!
interface GigabitEthernet0/0/0/3
shutdown
!
interface GigabitEthernet0/0/0/4
shutdown
!
route-policy PASS
pass
end-policy
!
router isis 1
apply-group CCIE-ISIS
net 49.0001.0000.0000.0001.00
distribute link-state level 2
address-family ipv4 unicast
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
!
interface Loopback0
address-family ipv4 unicast
prefix-sid index 1
!
!
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/0/0/2
!
!
router bgp 10
bgp router-id 1.1.1.1
address-family vpnv4 unicast
!
neighbor 6.6.6.6
remote-as 10
update-source Loopback0
address-family vpnv4 unicast
!
!
vrf A
rd 10:1
address-family ipv4 unicast
!
neighbor 198.51.100.100
remote-as 100
address-family ipv4 unicast
route-policy PASS in
route-policy PASS out
!
!
!
!
mpls oam
!
segment-routing
traffic-eng
on-demand color 10
dynamic
metric
type te
!
!
!
on-demand color 20
dynamic
metric
type igp
!
!
!
on-demand color 30
dynamic
metric
type latency
!
!
!
on-demand color 40
dynamic
metric
type hopcount
!
!
!
!
!
mpls label range table 0 1001001 1001999
end
◆h_N2
hostname h_N2 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 2.2.2.2 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.1.2.2 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.2.3.2 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.2.4.2 255.255.255.0 ! interface GigabitEthernet0/0/0/3 shutdown ! interface GigabitEthernet0/0/0/4 shutdown ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0002.00 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 address-family ipv4 unicast prefix-sid index 2 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 address-family ipv4 unicast metric 15 ! ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/2 metric 15 ! ! ! performance-measurement interface GigabitEthernet0/0/0/2 delay-measurement advertise-delay 5 ! ! ! end
◆h_N3
hostname h_N3 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 3.3.3.3 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.1.3.3 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.2.3.3 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.3.5.3 255.255.255.0 ! interface GigabitEthernet0/0/0/3 ipv4 address 10.3.4.3 255.255.255.0 ! interface GigabitEthernet0/0/0/4 shutdown ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0003.00 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 address-family ipv4 unicast prefix-sid index 3 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 address-family ipv4 unicast metric 15 ! ! interface GigabitEthernet0/0/0/3 address-family ipv4 unicast metric 19 ! ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/2 metric 20 ! interface GigabitEthernet0/0/0/3 metric 8 ! ! ! performance-measurement interface GigabitEthernet0/0/0/2 delay-measurement advertise-delay 20 ! ! interface GigabitEthernet0/0/0/3 delay-measurement advertise-delay 7 ! ! ! end
◆h_N4
hostname h_N4 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 4.4.4.4 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.2.4.4 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.4.5.4 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.4.6.4 255.255.255.0 ! interface GigabitEthernet0/0/0/3 ipv4 address 10.3.4.4 255.255.255.0 ! interface GigabitEthernet0/0/0/4 shutdown ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0004.00 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 prefix-attributes anycast address-family ipv4 unicast prefix-sid index 4 ! ! interface GigabitEthernet0/0/0/0 address-family ipv4 unicast metric 15 ! ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! interface GigabitEthernet0/0/0/3 address-family ipv4 unicast metric 19 ! ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/0 metric 15 ! interface GigabitEthernet0/0/0/3 metric 8 ! ! ! performance-measurement interface GigabitEthernet0/0/0/0 delay-measurement advertise-delay 5 ! ! interface GigabitEthernet0/0/0/3 delay-measurement advertise-delay 7 ! ! ! end
◆h_N5
hostname h_N5 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 5.5.5.5 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.3.5.5 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.4.5.5 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.5.6.5 255.255.255.0 ! interface GigabitEthernet0/0/0/3 shutdown ! interface GigabitEthernet0/0/0/4 shutdown ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0005.00 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! interface Loopback0 prefix-attributes anycast address-family ipv4 unicast prefix-sid index 5 ! ! interface GigabitEthernet0/0/0/0 address-family ipv4 unicast metric 15 ! ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! segment-routing traffic-eng interface GigabitEthernet0/0/0/0 metric 20 ! ! ! performance-measurement interface GigabitEthernet0/0/0/0 delay-measurement advertise-delay 20 ! ! ! end
◆h_N6
hostname h_N6
group CCIE-ISIS
router isis '.*'
is-type level-2-only
address-family ipv4 unicast
metric-style wide
segment-routing mpls
!
interface 'Gi.*'
point-to-point
address-family ipv4 unicast
!
!
interface 'Loopback .*'
address-family ipv4 unicast
!
!
!
end-group
!
vrf B
rd 10:6
address-family ipv4 unicast
import route-target
100:1
!
export route-target
200:1
!
!
!
interface Loopback0
ipv4 address 6.6.6.6 255.255.255.255
!
interface MgmtEth0/RP0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.4.6.6 255.255.255.0
!
interface GigabitEthernet0/0/0/1.30
vrf B
ipv4 address 203.0.113.6 255.255.255.0
encapsulation dot1q 30
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.5.6.6 255.255.255.0
!
interface GigabitEthernet0/0/0/3
shutdown
!
interface GigabitEthernet0/0/0/4
shutdown
!
extcommunity-set opaque COLOR_10_TE
10
end-set
!
extcommunity-set opaque COLOR_20_IGP
20
end-set
!
extcommunity-set opaque COLOR_30_DELAY
30
end-set
!
extcommunity-set opaque COLOR_40_HOPCOUNT
40
end-set
!
route-policy PASS
pass
end-policy
!
route-policy SET_COLOR_HI_BW
set extcommunity color COLOR_20_IGP
pass
end-policy
!
route-policy SET_COLOR_GLOBAL
if destination in (2.2.2.10/32) then
set extcommunity color COLOR_10_TE
elseif destination in (2.2.2.20/32) then
set extcommunity color COLOR_20_IGP
elseif destination in (2.2.2.30/32) then
set extcommunity color COLOR_30_DELAY
elseif destination in (2.2.2.40/32) then
set extcommunity color COLOR_40_HOPCOUNT
endif
end-policy
!
route-policy SET_COLOR_HOPCOUNT
set extcommunity color COLOR_40_HOPCOUNT
pass
end-policy
!
route-policy SET_COLOR_LOW_LATENCY
set extcommunity color COLOR_30_DELAY
pass
end-policy
!
route-policy SET_COLOR_LOW_LATENCY_TE
set extcommunity color COLOR_10_TE
pass
end-policy
!
router isis 1
apply-group CCIE-ISIS
net 49.0001.0000.0000.0006.00
address-family ipv4 unicast
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
!
interface Loopback0
address-family ipv4 unicast
prefix-sid index 6
!
!
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/0/0/2
!
!
router bgp 10
bgp router-id 6.6.6.6
address-family vpnv4 unicast
!
neighbor 1.1.1.1
remote-as 10
update-source Loopback0
address-family vpnv4 unicast
route-policy SET_COLOR_GLOBAL out
!
!
vrf B
rd 10:6
address-family ipv4 unicast
!
neighbor 203.0.113.200
remote-as 200
address-family ipv4 unicast
route-policy PASS in
route-policy PASS out
!
!
!
!
mpls oam
!
segment-routing
traffic-eng
!
!
mpls label range table 0 1006001 1006999
end
◆h_CE1
hostname CE1 ! no ip domain lookup ! interface Loopback0 ip address 100.100.100.100 255.255.255.255 ! interface Loopback110 ip address 1.1.1.10 255.255.255.255 ! interface GigabitEthernet1 no ip address ! interface GigabitEthernet1.10 encapsulation dot1Q 10 ip address 192.0.2.100 255.255.255.0 ! interface GigabitEthernet1.20 encapsulation dot1Q 20 ip address 198.51.100.100 255.255.255.0 ! router bgp 100 bgp router-id 100.100.100.100 bgp log-neighbor-changes network 1.1.1.10 mask 255.255.255.255 neighbor 198.51.100.1 remote-as 10 ! line con 0 exec-timeout 0 0 ! end
◆h_CE2
hostname CE2 ! no ip domain lookup ! interface Loopback0 ip address 200.200.200.200 255.255.255.255 ! interface Loopback210 ip address 2.2.2.10 255.255.255.255 ! interface Loopback220 ip address 2.2.2.20 255.255.255.255 ! interface Loopback230 ip address 2.2.2.30 255.255.255.255 ! interface Loopback240 ip address 2.2.2.40 255.255.255.255 ! interface GigabitEthernet1 no ip address ! interface GigabitEthernet1.10 encapsulation dot1Q 10 ip address 192.0.2.200 255.255.255.0 ! interface GigabitEthernet1.30 encapsulation dot1Q 30 ip address 203.0.113.200 255.255.255.0 ! router bgp 200 bgp router-id 200.200.200.200 bgp log-neighbor-changes network 2.2.2.10 mask 255.255.255.255 network 2.2.2.20 mask 255.255.255.255 neighbor 203.0.113.6 remote-as 10 ! line con 0 exec-timeout 0 0 ! end
4.下準備(各種メトリックの仕込み)
4.1 IGP(Default 10)
IGP で interface を指定して定義します。
e.g. h_N2's GigabitEthernet0/0/0/2 で IGP(ISIS)のメトリックを定義
RP/0/RP0/CPU0:h_N2(config)#router isis 1 RP/0/RP0/CPU0:h_N2(config-isis)#interface gigabitEthernet 0/0/0/2 RP/0/RP0/CPU0:h_N2(config-isis-if)#address-family ipv4 unicast RP/0/RP0/CPU0:h_N2(config-isis-if-af)#metric 15 RP/0/RP0/CPU0:h_N2(config-isis-if-af)# RP/0/RP0/CPU0:h_N2(config-isis-if-af)#commit
4.2 Latency(Default 10)
performance-measurement で interface を指定して定義します。
e.g. h_N2's GigabitEthernet0/0/0/2 で advertise-delay を定義
RP/0/RP0/CPU0:h_N2(config)#? performance-measurement Enter the Performance Measurement submode RP/0/RP0/CPU0:h_N2(config-perf-meas)#? interface Enable Performance Measurement on an interface RP/0/RP0/CPU0:h_N2(config-perf-meas)#interface gigabitEthernet 0/0/0/2 RP/0/RP0/CPU0:h_N2(config-pm-intf)#? delay-measurement Enable delay-measurement on the interface RP/0/RP0/CPU0:h_N2(config-pm-intf)#delay-measurement ? advertise-delay Advertisement delay delay-profile Interface delay profile <cr> RP/0/RP0/CPU0:h_N2(config-pm-intf)#delay-measurement advertise-delay ? <1-16777215> Advertisement delay (uSec) RP/0/RP0/CPU0:h_N2(config-pm-intf)#delay-measurement advertise-delay 5 RP/0/RP0/CPU0:h_N2(config-pm-intf)#show Sat Mar 25 12:19:52.100 UTC performance-measurement interface GigabitEthernet0/0/0/2 delay-measurement advertise-delay 5 ! ! !
4.3 Traffic-engineering(TE:Default 10)
Segment Routing の Traffic-engineering で interface を指定して定義します。
e.g. h_N2's GigabitEthernet0/0/0/2 で TE のメトリックを定義
RP/0/RP0/CPU0:h_N2(config)#? segment-routing Segment Routing RP/0/RP0/CPU0:h_N2(config)#segment-routing RP/0/RP0/CPU0:h_N2(config-sr)#? traffic-eng Segment Routing Traffic Engineering RP/0/RP0/CPU0:h_N2(config-sr)#traffic-eng RP/0/RP0/CPU0:h_N2(config-sr-te)#? interface Enable SR-TE on an interface(cisco-support) RP/0/RP0/CPU0:h_N2(config-sr-te)#interface gigabitEthernet 0/0/0/2 RP/0/RP0/CPU0:h_N2(config-sr-if)#? metric Interface TE metric configuration RP/0/RP0/CPU0:h_N2(config-sr-if)#metric 5 RP/0/RP0/CPU0:h_N2(config-sr-if)# RP/0/RP0/CPU0:h_N2(config-sr-if)#show Sat Mar 25 12:25:44.443 UTC segment-routing traffic-eng interface GigabitEthernet0/0/0/2 metric 5 ! ! ! RP/0/RP0/CPU0:h_N2(config-sr-if)#
残りのノードもトポロジ図で指定した通りに定義します。
5. ODN の実装
実装の流れは、①全ノードでSegment Routing の Traffic-engineering 有効にしてから ②Head-End で LSDBの情報をSR-TE DBに投入します。 また、③Head-End で ODN の Color を定義します。④ End-point で extcommunity を定義し、⑤ route-policy を用いて Color を定義します。 ⑥ SR-TE で定義したい宛先 Prefix と ODN を紐づけるための route-policy を定義して、⑦ 最後に End-point で BGP の neighbor に対して outbound 方向で ⑥の route-policy を定義します。
5.1 全ノード共通
①IGPでSegment Routing を有効にします。
忘れずに Loopback0 で prefix-sid index X を有効化します。
router isis '.*'
net 49.0001.0000.0000.000X.00
address-family ipv4 unicast
metric-style wide
segment-routing mpls
!
interface Loopback 0
address-family ipv4 unicast
prefix-sid index X
!
!
!
②IGP で Traffic-engineering 有効にします。 ISIS の場合、IGP のレベルと TE のレベルを合わせます。今回の場合は、level-2-only です。
RP/0/RP0/CPU0:h_N2(config)#router isis 1 RP/0/RP0/CPU0:h_N2(config-isis)#address-family ipv4 unicast RP/0/RP0/CPU0:h_N2(config-isis-af)#? mpls Configure MPLS routing protocol parameters RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls ? traffic-eng Routing protocol commands for MPLS Traffic Engineering RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng ? level-2-only Enable mpls traffic-eng at level 2 RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng level-2-only RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls ? traffic-eng Routing protocol commands for MPLS Traffic Engineering RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng ? router-id Traffic Engineering stable IP address for system RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng router-id ? Loopback Loopback interface(s) | short name is Lo RP/0/RP0/CPU0:h_N2(config-isis-af)#mpls traffic-eng router-id Loopback 0 RP/0/RP0/CPU0:h_N2(config-isis-af)#show Sat Mar 25 12:43:39.055 UTC router isis 1 address-family ipv4 unicast mpls traffic-eng level-2-only mpls traffic-eng router-id Loopback0 ! ! RP/0/RP0/CPU0:h_N2(config-isis-af)#
③ グローバルで Segment Routing の Traffic-engineering 有効にします。
RP/0/RP0/CPU0:h_N2(config)#? segment-routing Segment Routing RP/0/RP0/CPU0:h_N2(config)#segment-routing ? traffic-eng Segment Routing Traffic Engineering RP/0/RP0/CPU0:h_N2(config)#segment-routing traffic-eng RP/0/RP0/CPU0:h_N2(config-sr-te)# RP/0/RP0/CPU0:h_N2(config-sr-te)#show Sat Mar 25 12:50:31.803 UTC segment-routing traffic-eng ! ! RP/0/RP0/CPU0:h_N2(config-sr-te)#
5.2 Head-End(h_N1)
5.2.1 LSDBの情報をSR-TE DBに投入
IGP で以下のコマンドを定義します。ISIS のインターフェースレベルに合わせます。
RP/0/RP0/CPU0:h_N1(config)#router isis 1 RP/0/RP0/CPU0:h_N1(config-isis)#? distribute Distribute routing information to external services RP/0/RP0/CPU0:h_N1(config-isis)#distribute ? link-state Distribute the link-state database to external services RP/0/RP0/CPU0:h_N1(config-isis)#distribute link-state ? level Set distribution for one level only RP/0/RP0/CPU0:h_N1(config-isis)#distribute link-state level ? <1-2> Level RP/0/RP0/CPU0:h_N1(config-isis)#distribute link-state level 2 RP/0/RP0/CPU0:h_N1(config-isis)#
5.2.2 On Demand Next-hop:ODN の定義
ODN を以下のように定義します。
a) Color:10 / type:te
b) Color:20 / type:igp
c) Color:30 / type:latency
d) Color:40 / type:hopcount
RP/0/RP0/CPU0:h_N1(config)#segment-routing traffic-eng RP/0/RP0/CPU0:h_N1(config-sr-te)#? on-demand On-Demand configuration RP/0/RP0/CPU0:h_N1(config-sr-te)#on-demand ? color On-Demand color configuration RP/0/RP0/CPU0:h_N1(config-sr-te)#on-demand color ? <1-4294967295> color value RP/0/RP0/CPU0:h_N1(config-sr-te)#on-demand color 10 RP/0/RP0/CPU0:h_N1(config-sr-te-color)#? dynamic Dynamically computed path RP/0/RP0/CPU0:h_N1(config-sr-te-color)#dynamic RP/0/RP0/CPU0:h_N1(config-sr-te-color-dyn)#? metric Specify the path computation metric options RP/0/RP0/CPU0:h_N1(config-sr-te-color-dyn)#metric RP/0/RP0/CPU0:h_N(config-sr-te-color-dyn-mpls-metric)#type ? hopcount Use the least number of hops for path computation igp Use the IGP metric for path computation latency Use the measured latency metric for path computation te Use the TE metric for path computation RP/0/RP0/CPU0:h_N(config-sr-te-color-dyn-mpls-metric)#type te ? <cr> RP/0/RP0/CPU0:h_N(config-sr-te-color-dyn-mpls-metric)#type te RP/0/RP0/CPU0:h_N(config-sr-te-color-dyn-mpls-metric)#root RP/0/RP0/CPU0:h_N1(config)#seg tr RP/0/RP0/CPU0:h_N1(config-sr-te)#on-demand color 20 RP/0/RP0/CPU0:h_N1(config-sr-te-color)#dynamic metric RP/0/RP0/CPU0:h_N(config-sr-te-color-dyn-mpls-metric)#type igp RP/0/RP0/CPU0:h_N(config-sr-te-color-dyn-mpls-metric)#root RP/0/RP0/CPU0:h_N1(config)#seg tr on-demand color 30 dynamic metric type laten$ RP/0/RP0/CPU0:h_N1(config)#seg tr on-demand color 40 dy met type hopcount RP/0/RP0/CPU0:h_N1(config)#commit
5.3 End-point(h_N6)
5.3.1 extended community 定義
① extended community を以下のように定義します。
COLOR_10_TE :10 → metric te 用
COLOR_20_IGP :20 → metric igp 用
COLOR_30_DELAY :30 → metric latency 用
COLOR_40_HOPCOUNT :40 → metric hopcount 用
RP/0/RP0/CPU0:h_N6(config)#? extcommunity-set Define an extended community set RP/0/RP0/CPU0:h_N6(config)#extcommunity-set ? opaque MLDP opaque types RP/0/RP0/CPU0:h_N6(config)#extcommunity-set opaque ? WORD Opaque type extcommunity set name RP/0/RP0/CPU0:h_N6(config)#extcommunity-set opaque COLOR_10_TE RP/0/RP0/CPU0:h_N6(config-ext)#? <1-4294967295> 32-bit decimal number RP/0/RP0/CPU0:h_N6(config-ext)#10 RP/0/RP0/CPU0:h_N6(config-ext)#end-set
5.3.2 Color assignment 定義
① extended community に紐づける Color を route-policy で以下のように定義します。
a) metric TE 重視の route-policy
→ SET_COLOR_LOW_LATENCY_TE:COLOR_10_TE
b) Bandwidth 重視の route-policy
→ SET_COLOR_HI_BW :COLOR_20_IGP
c) Delay 重視の route-policy
→ SET_COLOR_LOW_LATENCY :COLOR_30_DELAY
d) hopcount 重視の route-policy
→ SET_COLOR_HOPCOUNT :COLOR_40_HOPCOUNT
RP/0/RP0/CPU0:h_N6(config)#? route-policy Define a route policy RP/0/RP0/CPU0:h_N6(config)#route-policy ? WORD Route Policy name RP/0/RP0/CPU0:h_N6(config)#route-policy SET_COLOR_LOW_LATENCY_TE RP/0/RP0/CPU0:h_N6(config-rpl)#? set Set a route attribute RP/0/RP0/CPU0:h_N6(config-rpl)#set ? extcommunity BGP extended community attribute RP/0/RP0/CPU0:h_N6(config-rpl)#set extcommunity ? color BGP Color extended community RP/0/RP0/CPU0:h_N6(config-rpl)#set extcommunity color ? COLOR_10_TE Opaque type extcommunity set name COLOR_20_IGP Opaque type extcommunity set name COLOR_30_DELAY Opaque type extcommunity set name COLOR_40_HOPCOUNT Opaque type extcommunity set name WORD Opaque type extcommunity set name RP/0/RP0/CPU0:h_N6(config-rpl)#set extcommunity color COLOR_10_TE RP/0/RP0/CPU0:h_N6(config-rpl)#? pass Pass this route for further processing RP/0/RP0/CPU0:h_N6(config-rpl)#pass ? <cr> RP/0/RP0/CPU0:h_N6(config-rpl)#pass RP/0/RP0/CPU0:h_N6(config-rpl)#? end-policy End of route-policy definition RP/0/RP0/CPU0:h_N6(config-rpl)#end-policy RP/0/RP0/CPU0:h_N6(config)#show Sat Jun 3 06:16:17.133 UTC Building configuration... !! IOS XR Configuration 7.4.1 ! route-policy SET_COLOR_LOW_LATENCY_TE set extcommunity color COLOR_10_TE pass end-policy ! end RP/0/RP0/CPU0:h_N6(config)#
5.3.3 route-policy 定義
① Prefix に応じた Color を付与する route-policy を以下のように定義します。
a) 2.2.2.10/32 は metric TE 重視の Color
b) 2.2.2.20/32 は Bandwidth 重視の Color
c) 2.2.2.30/32 は Delay 重視の Color
d) 2.2.2.40/32 は hopcount 重視の Color
これらを1つの RPL で定義するために目を通しておくとスムーズなものがあります。
community.cisco.com
RP/0/RP0/CPU0:h_N6(config)#route-policy SET_COLOR_GLOBAL
RP/0/RP0/CPU0:h_N6(config-rpl)#?
if Begin if-statement
RP/0/RP0/CPU0:h_N6(config-rpl)#if ?
destination Destination address in the route
RP/0/RP0/CPU0:h_N6(config-rpl)#if destination ?
in Member of a set
RP/0/RP0/CPU0:h_N6(config-rpl)#if destination in ?
( Begin inline prefix set
RP/0/RP0/CPU0:h_N6(config-rpl)#if destination in ( ?
A.B.C.D/length Specify an IPv4 prefix
RP/0/RP0/CPU0:h_N6(config-rpl)#if destination in ( 2.2.2.10/32 ?
) End inline prefix set
RP/0/RP0/CPU0:h_N6(config-rpl)#if destination in ( 2.2.2.10/32 ) ?
then Then clause
RP/0/RP0/CPU0:h_N6(config-rpl)#if destination in ( 2.2.2.10/32 ) then
RP/0/RP0/CPU0:h_N6(config-rpl-if)#?
set Set a route attribute
RP/0/RP0/CPU0:h_N6(config-rpl-if)#set ?
extcommunity BGP extended community attribute
RP/0/RP0/CPU0:h_N6(config-rpl-if)#set extcommunity ?
color BGP Color extended community
RP/0/RP0/CPU0:h_N6(config-rpl-if)#set extcommunity color ?
COLOR_10_TE Opaque type extcommunity set name
COLOR_20_IGP Opaque type extcommunity set name
COLOR_30_DELAY Opaque type extcommunity set name
COLOR_40_HOPCOUNT Opaque type extcommunity set name
RP/0/RP0/CPU0:h_N6(config-rpl-if)#set extcommunity color COLOR_10_TE
RP/0/RP0/CPU0:h_N6(config-rpl-if)#?
elseif Elseif clause
RP/0/RP0/CPU0:h_N6(config-rpl-if)#elseif ?
destination Destination address in the route
RP/0/RP0/CPU0:h_N6(config-rpl-if)#elseif destination ?
in Member of a set
RP/0/RP0/CPU0:h_N6(config-rpl-if)#elseif destination in (2.2.2.20/32) then
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#set extcommunity color COLOR_20_IGP
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#?
elseif Elseif clause
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#elseif destination in (2.2.2.30/32) then
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#set extcommunity color COLOR_30_DELAY
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#elseif destination in (2.2.2.40/32) then
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#set extcommunity color COLOR_40_HOPCOUNT
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#?
endif End of if-statement
RP/0/RP0/CPU0:h_N6(config-rpl-elseif)#endif
RP/0/RP0/CPU0:h_N6(config-rpl)#?
end-policy End of route-policy definition
RP/0/RP0/CPU0:h_N6(config-rpl)#end-policy
RP/0/RP0/CPU0:h_N6(config)#show
Sat Jun 3 06:38:28.106 UTC
Building configuration...
!! IOS XR Configuration 7.4.1
!
route-policy SET_COLOR_GLOBAL
if destination in (2.2.2.10/32) then
set extcommunity color COLOR_10_TE
elseif destination in (2.2.2.20/32) then
set extcommunity color COLOR_20_IGP
elseif destination in (2.2.2.30/32) then
set extcommunity color COLOR_30_DELAY
elseif destination in (2.2.2.40/32) then
set extcommunity color COLOR_40_HOPCOUNT
endif
end-policy
!
end
RP/0/RP0/CPU0:h_N6(config)#
② BGP の neighbor の outbound 方向に route-policy を適用します。
∵ neighbor から Color Assignment をしている Egress PE への方向であるためです。
RP/0/RP0/CPU0:h_N6(config)#router bgp 10 RP/0/RP0/CPU0:h_N6(config-bgp)#neighbor 1.1.1.1 RP/0/RP0/CPU0:h_N6(config-bgp-nbr)#address-family vpnv4 unicast RP/0/RP0/CPU0:h_N6(config-bgp-nbr-af)#route-policy ? PASS Name of the policy SET_COLOR_HI_BW Name of the policy SET_COLOR_GLOBAL Name of the policy SET_COLOR_HOPCOUNT Name of the policy SET_COLOR_LOW_LATENCY Name of the policy SET_COLOR_LOW_LATENCY_TE Name of the policy WORD Name of the policy RP/0/RP0/CPU0:h_N6(config-bgp-nbr-af)#route-policy SET_COLOR_GLOBAL ? ( Specify parameter values for the policy in Apply route policy to inbound routes out Apply route policy to outbound routes RP/0/RP0/CPU0:h_N6(config-bgp-nbr-af)#route-policy SET_COLOR_GLOBAL out RP/0/RP0/CPU0:h_N6(config-bgp-nbr-af)#show Sat Jun 3 06:51:22.580 UTC router bgp 10 neighbor 1.1.1.1 address-family vpnv4 unicast route-policy SET_COLOR_GLOBAL out ! ! ! RP/0/RP0/CPU0:h_N6(config-bgp-nbr-af)#
6. 検証
6.1 COLOR_10_TE 確認(metric TE 重視の Color)
2.2.2.10/32 宛の SR-TE は metric TE 重視の Color のインスタンスに割り当てられていることを確認します。
RP/0/RP0/CPU0:h_N1#show ip interface brief Sat Jun 10 13:26:28.278 UTC Interface IP-Address Status Protocol Vrf-Name ★ srte_c_10_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_20_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_30_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_40_ep_6.6.6.6 1.1.1.1 Up Up default Loopback0 1.1.1.1 Up Up default MgmtEth0/RP0/CPU0/0 unassigned Shutdown Down default GigabitEthernet0/0/0/0 10.1.2.1 Up Up default GigabitEthernet0/0/0/1 unassigned Up Up default GigabitEthernet0/0/0/1.10 unassigned Up Up default GigabitEthernet0/0/0/1.20 198.51.100.1 Up Up A GigabitEthernet0/0/0/2 10.1.3.1 Up Up default GigabitEthernet0/0/0/3 unassigned Shutdown Down default GigabitEthernet0/0/0/4 unassigned Shutdown Down default RP/0/RP0/CPU0:h_N1#
CEルータからの traceroute で 2.2.2.10/32 宛のトラフィックの流れやラベルを確認します。
CE1#traceroute 2.2.2.10 source 1.1.1.10 Type escape sequence to abort. Tracing the route to 2.2.2.10 VRF info: (vrf in name/id, vrf out name/id) 1 198.51.100.1 7 msec 2 msec 2 msec 2 10.1.3.3 [MPLS: Labels 24001/16006/1006006 Exp 0] 12 msec 3 msec 4 msec 3 10.3.4.4 [MPLS: Labels 16006/1006006 Exp 0] 6 msec 4 msec 3 msec 4 10.4.6.6 [MPLS: Label 1006006 Exp 0] 6 msec 3 msec 4 msec 5 203.0.113.200 5 msec * 13 msec CE1#
設計したとおり metric:te 重視の経路を経由していることが分かります。

ODN で自動的に作られた SR-TE インスタンスを確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy color 10 detail
Sun Jun 11 04:44:30.368 UTC
SR-TE policy database
---------------------
Color: 10, End-point: 6.6.6.6
Name: srte_c_10_ep_6.6.6.6
Status:
★1 Admin: up Operational: up for 1d02h (since Jun 10 02:29:41.679)
Candidate-paths:
★2 Preference: 200 (BGP ODN) (active)
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (valid)
★3 Metric Type: TE, Path Accumulated Metric: 28
★4 16003 [Prefix-SID, 3.3.3.3]
★4 24001 [Adjacency-SID, 10.3.4.3 - 10.3.4.4]
★4 16006 [Prefix-SID, 6.6.6.6]
Preference: 100 (BGP ODN)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_10_ep_6.6.6.6_discr_100
PLSP-ID: 3
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (pce) (invalid)
Metric Type: TE, Path Accumulated Metric: 28
LSPs:
LSP[0]:
LSP-ID: 4 policy ID: 8 (active)
Local label: 1001010
State: Programmed
Binding SID: 1001009
Attributes:
Binding SID: 1001009
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
★1:Admin: up Operational: up となり、SR-TE は正常です。
★2:(BGP ODN) (active) 本 SR-TE は ODN により自動的に作られたものとしてマークされます。
★3:Metric Type: TE で計算された SR-TE です。
★4:N1 → N3 → N4 → N6 と経由するよう SR-TE です。
SR-TE を転送している状況を確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy color 10 detail
Sun Jun 11 04:52:41.491 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 10, End-point: 6.6.6.6
Name: srte_c_10_ep_6.6.6.6
Binding SID: 1001009
Active LSP:
Candidate path:
Preference: 200 (BGP ODN)
★1 Local label: 1001010
Segment lists:
SL[0]:
Name: dynamic
Switched Packets/Bytes: 12/384
[MPLS -> MPLS]: 12/384
Paths:
Path[0]:
★2 Outgoing Label: 24001
Outgoing Interfaces: GigabitEthernet0/0/0/2
Next Hop: 10.1.3.3
Switched Packets/Bytes: 12/384
[MPLS -> MPLS]: 12/384
FRR Pure Backup: No
ECMP/LFA Backup: No
Internal Recursive Label: Unlabelled (recursive)
★3 Label Stack (Top -> Bottom): { 24001, 16006 }
Path-id: 1, Weight: 64
Policy Packets/Bytes Switched: 90/3180
RP/0/RP0/CPU0:h_N1#
★1:Local label: 1001010
★2:Outgoing Label: 24001
★3:Label Stack (Top -> Bottom): { 24001, 16006 }
LFIB でもラベルスタックしている様子を確認できます。
RP/0/RP0/CPU0:h_N1#show mpls
mpls mpls-over-udp-ea
RP/0/RP0/CPU0:h_N1#show mpls forwarding labels 1001010 detail
Sun Jun 11 04:55:52.825 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1001010 24001 SR TE: 8 [TE-INT] Gi0/0/0/2 10.1.3.3 384
Updated: Jun 10 13:35:07.449
Version: 218, Priority: 2
Label Stack (Top -> Bottom): { 24001 16006 }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 4/12, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/2 (ifhandle 0x01000030)
Packets Switched: 12
RP/0/RP0/CPU0:h_N1#
ラベル:1006006 は 2.2.2.10/32 宛であることが逆サイドの PEルータで確認できます。
RP/0/RP0/CPU0:h_N6#show mpls forwarding labels 1006006 detail
Sun Jun 11 04:57:52.591 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1006006 Unlabelled 2.2.2.10/32[V] Gi0/0/0/1.30 203.0.113.200 0
Updated: May 21 00:50:37.108
Path Flags: 0x6020 [ EXT ]
Version: 25, Priority: 3
Label Stack (Top -> Bottom): { Unlabelled }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 4/4, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/1.30 (ifhandle 0x01000040)
Packets Switched: 0
RP/0/RP0/CPU0:h_N6#
6.2 COLOR_20_TE 確認(Bandwidth 重視の Color)
CEルータからの traceroute で 2.2.2.20/32 宛のトラフィックの流れやラベルを確認します。
CE1#traceroute 2.2.2.20 source 1.1.1.10
Type escape sequence to abort.
Tracing the route to 2.2.2.20
VRF info: (vrf in name/id, vrf out name/id)
1 198.51.100.1 6 msec 1 msec 1 msec
2 10.1.2.2 [MPLS: Labels 16006/1006005 Exp 0] 7 msec
10.1.3.3 [MPLS: Labels 16006/1006005 Exp 0] 6 msec
10.1.2.2 [MPLS: Labels 16006/1006005 Exp 0] 3 msec
3 10.2.4.4 [MPLS: Labels 16006/1006005 Exp 0] 5 msec 3 msec
10.3.5.5 [MPLS: Labels 16006/1006005 Exp 0] 7 msec
4 10.4.6.6 [MPLS: Label 1006005 Exp 0] 7 msec 3 msec
10.5.6.6 [MPLS: Label 1006005 Exp 0] 4 msec
5 203.0.113.200 5 msec * 13 msec
CE1#
設計したとおり Bandwidth 重視の経路を経由していることが分かります。
Bandwidth 重視≒ IGP はBandwidth をベースに cost 算出

ODN で自動的に作られた SR-TE インスタンスを確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy color 20 detail
Sun Jun 11 07:03:15.126 UTC
SR-TE policy database
---------------------
Color: 20, End-point: 6.6.6.6
Name: srte_c_20_ep_6.6.6.6
Status:
★1 Admin: up Operational: up for 1d06h (since Jun 10 00:23:16.386)
Candidate-paths:
★2 Preference: 200 (BGP ODN) (active)
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (valid)
★3 Metric Type: IGP, Path Accumulated Metric: 35
★4 16006 [Prefix-SID, 6.6.6.6]
Preference: 100 (BGP ODN)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_20_ep_6.6.6.6_discr_100
PLSP-ID: 5
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (pce) (invalid)
Last error: No path
Metric Type: IGP, Path Accumulated Metric: 35
LSPs:
LSP[0]:
LSP-ID: 3 policy ID: 10 (active)
Local label: 1001007
State: Programmed
Binding SID: 1001017
Attributes:
Binding SID: 1001017
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
★1:Admin: up Operational: up となり、SR-TE は正常です。
★2:(BGP ODN) (active) 本 SR-TE は ODN により自動的に作られたものとしてマークされます。
★3:Metric Type: IGP で計算された SR-TE です。
★4:16006 [Prefix-SID, 6.6.6.6] をロードランスする SR-TE です。
SR-TE を転送している状況を確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy color 20$
Sun Jun 11 07:06:07.922 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 20, End-point: 6.6.6.6
Name: srte_c_20_ep_6.6.6.6
Binding SID: 1001017
Active LSP:
Candidate path:
Preference: 200 (BGP ODN)
★1 Local label: 1001007
Segment lists:
SL[0]:
Name: dynamic
Switched Packets/Bytes: 24/768
[MPLS -> MPLS]: 24/768
Paths:
Path[0]:
★2 Outgoing Label: 16006
★3 Outgoing Interfaces: GigabitEthernet0/0/0/0
Next Hop: 10.1.2.2
Switched Packets/Bytes: 15/480
[MPLS -> MPLS]: 15/480
FRR Pure Backup: No
ECMP/LFA Backup: No
Internal Recursive Label: Unlabelled (recursive)
Label Stack (Top -> Bottom): { 16006 }
Path-id: 1, Weight: 32
Path[1]:
★2 Outgoing Label: 16006
★3 Outgoing Interfaces: GigabitEthernet0/0/0/2
Next Hop: 10.1.3.3
Switched Packets/Bytes: 9/288
[MPLS -> MPLS]: 9/288
FRR Pure Backup: No
ECMP/LFA Backup: No
Internal Recursive Label: Unlabelled (recursive)
Label Stack (Top -> Bottom): { 16006 }
Path-id: 2, Weight: 32
Policy Packets/Bytes Switched: 74/2616
RP/0/RP0/CPU0:h_N1#
★1:Local label: 1001007
★2:Outgoing Label: 16006
★3:ロードバランシングしています。
LFIB でもロードバランシングしている様子を確認できます。
RP/0/RP0/CPU0:h_N1#show mpls forwarding labels 1001007 detail
Sun Jun 11 07:12:01.119 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1001007 16006 SR TE: 10 [TE-INT] Gi0/0/0/0 10.1.2.2 480
Updated: Jun 10 00:23:16.385
Version: 199, Priority: 2
Label Stack (Top -> Bottom): { 16006 }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 32
MAC/Encaps: 4/8, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/0 (ifhandle 0x01000018)
Packets Switched: 15
16006 SR TE: 10 [TE-INT] Gi0/0/0/2 10.1.3.3 288
Updated: Jun 10 00:23:16.385
Version: 199, Priority: 2
Label Stack (Top -> Bottom): { 16006 }
NHID: 0x0, Encap-ID: N/A, Path idx: 1, Backup path idx: 0, Weight: 32
MAC/Encaps: 4/8, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/2 (ifhandle 0x01000030)
Packets Switched: 9
RP/0/RP0/CPU0:h_N1#
ラベル:1006005 は 2.2.2.20/32 宛であることが逆サイドの PEルータで確認できます。
RP/0/RP0/CPU0:h_N6#show mpls forwarding labels 1006005 detail
Sun Jun 11 07:13:17.990 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1006005 Unlabelled 2.2.2.20/32[V] Gi0/0/0/1.30 203.0.113.200 0
Updated: Jun 3 07:00:03.793
Path Flags: 0x6020 [ EXT ]
Version: 36, Priority: 3
Label Stack (Top -> Bottom): { Unlabelled }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 4/4, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/1.30 (ifhandle 0x01000040)
Packets Switched: 0
RP/0/RP0/CPU0:h_N6#
6.3 COLOR_30_TE 確認(Delay 重視の Color)
CEルータからの traceroute で 2.2.2.30/32 宛のトラフィックの流れやラベルを確認します。
CE1#traceroute 2.2.2.30 source 1.1.1.10 Type escape sequence to abort. Tracing the route to 2.2.2.30 VRF info: (vrf in name/id, vrf out name/id) 1 198.51.100.1 8 msec 3 msec 2 msec 2 10.1.2.2 [MPLS: Labels 24001/16006/1006007 Exp 0] 20 msec 6 msec 6 msec 3 10.2.4.4 [MPLS: Labels 16006/1006007 Exp 0] 11 msec 6 msec 5 msec 4 10.4.6.6 [MPLS: Label 1006007 Exp 0] 9 msec 6 msec 6 msec 5 203.0.113.200 9 msec * 13 msec CE1#
設計したとおり Delay 重視の経路を経由していることが分かります。

ODN で自動的に作られた SR-TE インスタンスを確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy color 30 detail
Sun Jun 11 07:14:57.899 UTC
SR-TE policy database
---------------------
Color: 30, End-point: 6.6.6.6
Name: srte_c_30_ep_6.6.6.6
Status:
★1 Admin: up Operational: up for 1w1d (since Jun 3 07:02:06.514)
Candidate-paths:
★2 Preference: 200 (BGP ODN) (active)
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (valid)
★3 Metric Type: LATENCY, Path Accumulated Metric: 25
★4 16002 [Prefix-SID, 2.2.2.2]
★4 24001 [Adjacency-SID, 10.2.4.2 - 10.2.4.4]
★4 16006 [Prefix-SID, 6.6.6.6]
Preference: 100 (BGP ODN)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_30_ep_6.6.6.6_discr_100
PLSP-ID: 6
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (pce) (invalid)
Metric Type: LATENCY, Path Accumulated Metric: 25
LSPs:
LSP[0]:
LSP-ID: 2 policy ID: 11 (active)
Local label: 1001013
State: Programmed
Binding SID: 1001018
Attributes:
Binding SID: 1001018
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
★1:Admin: up Operational: up となり、SR-TE は正常です。
★2:(BGP ODN) (active) 本 SR-TE は ODN により自動的に作られたものとしてマークされます。
★3:Metric Type: LATENCY で計算された SR-TE です。
★4:N1 → N2 → N4 → N6 と経由するよう SR-TE です。
SR-TE を転送している状況を確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy color 30 detail
Sun Jun 11 07:17:43.356 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 30, End-point: 6.6.6.6
Name: srte_c_30_ep_6.6.6.6
Binding SID: 1001018
Active LSP:
Candidate path:
Preference: 200 (BGP ODN)
★1 Local label: 1001013
Segment lists:
SL[0]:
Name: dynamic
Switched Packets/Bytes: 48/1536
[MPLS -> MPLS]: 48/1536
Paths:
Path[0]:
★2 Outgoing Label: 24001
Outgoing Interfaces: GigabitEthernet0/0/0/0
Next Hop: 10.1.2.2
Switched Packets/Bytes: 48/1536
[MPLS -> MPLS]: 48/1536
FRR Pure Backup: No
ECMP/LFA Backup: No
Internal Recursive Label: Unlabelled (recursive)
★3 Label Stack (Top -> Bottom): { 24001, 16006 }
Path-id: 1, Weight: 64
Policy Packets/Bytes Switched: 72/2544
RP/0/RP0/CPU0:h_N1#
★1:Local label: 1001013
★2:Outgoing Label: 24001
★3:Label Stack (Top -> Bottom): { 24001, 16006 }
LFIB でもラベルスタックしている様子を確認できます。
RP/0/RP0/CPU0:h_N1#show mpls forwarding labels 1001013 detail
Sun Jun 11 07:19:46.682 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1001013 24001 SR TE: 11 [TE-INT] Gi0/0/0/0 10.1.2.2 1536
Updated: Jun 3 07:02:06.512
Version: 159, Priority: 2
Label Stack (Top -> Bottom): { 24001 16006 }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 4/12, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/0 (ifhandle 0x01000018)
Packets Switched: 48
RP/0/RP0/CPU0:h_N1#
ラベル:1006007 は 2.2.2.30/32 宛であることが逆サイドの PEルータで確認できます。
RP/0/RP0/CPU0:h_N6#show mpls forwarding labels 1006007 detail
Sun Jun 11 07:20:38.247 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1006007 Unlabelled 2.2.2.30/32[V] Gi0/0/0/1.30 203.0.113.200 0
Updated: Jun 3 07:02:07.323
Path Flags: 0x6020 [ EXT ]
Version: 38, Priority: 3
Label Stack (Top -> Bottom): { Unlabelled }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 4/4, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/1.30 (ifhandle 0x01000040)
Packets Switched: 0
RP/0/RP0/CPU0:h_N6#
6.4 COLOR_40_TE 確認(hopcount 重視の Color)
CEルータからの traceroute で 2.2.2.40/32 宛のトラフィックの流れやラベルを確認します。
CE1#traceroute 2.2.2.40 source 1.1.1.10 Type escape sequence to abort. Tracing the route to 2.2.2.40 VRF info: (vrf in name/id, vrf out name/id) 1 198.51.100.1 7 msec 1 msec 2 msec 2 10.1.2.2 [MPLS: Labels 16006/1006008 Exp 0] 15 msec 5 msec 5 msec 3 10.2.4.4 [MPLS: Labels 16006/1006008 Exp 0] 7 msec 5 msec 4 msec 4 10.4.6.6 [MPLS: Label 1006008 Exp 0] 8 msec 4 msec 4 msec 5 203.0.113.200 9 msec * 14 msec CE1#
設計したとおり hopcount 重視の経路を経由していることが分かります。

ODN で自動的に作られた SR-TE インスタンスを確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy color 40 detail
Sun Jun 11 07:21:59.678 UTC
SR-TE policy database
---------------------
Color: 40, End-point: 6.6.6.6
Name: srte_c_40_ep_6.6.6.6
Status:
★1 Admin: up Operational: up for 1w0d (since Jun 3 07:38:31.803)
Candidate-paths:
★2 Preference: 200 (BGP ODN) (active)
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (valid)
★3 Metric Type: HOPCOUNT, Path Accumulated Metric: 3
★4 16002 [Prefix-SID, 2.2.2.2]
★4 16006 [Prefix-SID, 6.6.6.6]
Preference: 100 (BGP ODN)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_40_ep_6.6.6.6_discr_100
PLSP-ID: 11
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (pce) (invalid)
Metric Type: HOPCOUNT, Path Accumulated Metric: 3
LSPs:
LSP[0]:
LSP-ID: 2 policy ID: 16 (active)
Local label: 1001025
State: Programmed
Binding SID: 1001026
Attributes:
Binding SID: 1001026
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
★1:Admin: up Operational: up となり、SR-TE は正常です。
★2:(BGP ODN) (active) 本 SR-TE は ODN により自動的に作られたものとしてマークされます。
★3:Metric Type: HOPCOUNT で計算された SR-TE です。
★4:N1 → N2 → N4 → N6 と経由するよう SR-TE です。
SR-TE を転送している状況を確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy color 40$
Sun Jun 11 07:25:04.138 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 40, End-point: 6.6.6.6
Name: srte_c_40_ep_6.6.6.6
Binding SID: 1001026
Active LSP:
Candidate path:
Preference: 200 (BGP ODN)
★1 Local label: 1001025
Segment lists:
SL[0]:
Name: dynamic
Switched Packets/Bytes: 36/1152
[MPLS -> MPLS]: 36/1152
Paths:
Path[0]:
★2 Outgoing Label: 16006
Outgoing Interfaces: GigabitEthernet0/0/0/0
Next Hop: 10.1.2.2
Switched Packets/Bytes: 36/1152
[MPLS -> MPLS]: 36/1152
FRR Pure Backup: No
ECMP/LFA Backup: No
Internal Recursive Label: Unlabelled (recursive)
★3 Label Stack (Top -> Bottom): { 16006 }
Path-id: 1, Weight: 64
Policy Packets/Bytes Switched: 48/1704
RP/0/RP0/CPU0:h_N1#
★1:Local label: 1001025
★2:Outgoing Label: 16006
★3:Label Stack (Top -> Bottom): { 16006 }
LFIB でもラベルスタックしている様子を確認できます。
RP/0/RP0/CPU0:h_N1#show mpls forwarding labels 1001025 detail
Sun Jun 11 07:27:47.792 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1001025 16006 SR TE: 16 [TE-INT] Gi0/0/0/0 10.1.2.2 1152
Updated: Jun 3 07:38:31.794
Version: 186, Priority: 2
Label Stack (Top -> Bottom): { 16006 }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 4/8, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/0 (ifhandle 0x01000018)
Packets Switched: 36
RP/0/RP0/CPU0:h_N1#
ラベル:1006008 は 2.2.2.40/32 宛であることが逆サイドの PEルータで確認できます。
RP/0/RP0/CPU0:h_N6#show mpls forwarding labels 1006008 detail
Sun Jun 11 07:28:34.136 UTC
Local Outgoing Prefix Outgoing Next Hop Bytes
Label Label or ID Interface Switched
------ ----------- ------------------ ------------ --------------- ------------
1006008 Unlabelled 2.2.2.40/32[V] Gi0/0/0/1.30 203.0.113.200 0
Updated: Jun 3 07:38:32.592
Path Flags: 0x6020 [ EXT ]
Version: 52, Priority: 3
Label Stack (Top -> Bottom): { Unlabelled }
NHID: 0x0, Encap-ID: N/A, Path idx: 0, Backup path idx: 0, Weight: 0
MAC/Encaps: 4/4, MTU: 1500
Outgoing Interface: GigabitEthernet0/0/0/1.30 (ifhandle 0x01000040)
Packets Switched: 0
RP/0/RP0/CPU0:h_N6#
6.5 宛先 Prefix が消えると SR-TE も消える
CEルータで Loopback 220 を shutdown します。
CE2(config-if)#int lo220 CE2(config-if)#shutdown CE2(config-if)# *Jun 11 07:32:41.012: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback220, changed state to down *Jun 11 07:32:41.015: %LINK-5-CHANGED: Interface Loopback220, changed state to administratively down
すると SR-TE が DOWN します。
RP/0/RP0/CPU0:h_N1#show ip interface brief Sun Jun 11 07:34:02.576 UTC Interface IP-Address Status Protocol Vrf-Name srte_c_10_ep_6.6.6.6 1.1.1.1 Up Up default ★ srte_c_20_ep_6.6.6.6 1.1.1.1 Down Down default srte_c_30_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_40_ep_6.6.6.6 1.1.1.1 Up Up default Loopback0 1.1.1.1 Up Up default MgmtEth0/RP0/CPU0/0 unassigned Shutdown Down default GigabitEthernet0/0/0/0 10.1.2.1 Up Up default GigabitEthernet0/0/0/1 unassigned Up Up default GigabitEthernet0/0/0/1.10 unassigned Up Up default GigabitEthernet0/0/0/1.20 198.51.100.1 Up Up A GigabitEthernet0/0/0/2 10.1.3.1 Up Up default GigabitEthernet0/0/0/3 unassigned Shutdown Down default GigabitEthernet0/0/0/4 unassigned Shutdown Down default RP/0/RP0/CPU0:h_N1#
ポリシーの中身を確認すると”(cleanup running)”表示となり、消えようとしている様子を確認できます。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy color 20 detail
Sun Jun 11 07:32:53.088 UTC
SR-TE policy database
---------------------
Color: 20, End-point: 6.6.6.6
Name: srte_c_20_ep_6.6.6.6
Status:
Admin: up Operational: down for 00:00:12 (since Jun 11 07:32:40.299)
Candidate-paths:
★ Preference: 200 (BGP ODN) (cleanup running)
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (invalid)
Metric Type: IGP, Path Accumulated Metric: 35
★ Preference: 100 (BGP ODN) (cleanup running)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_20_ep_6.6.6.6_discr_100
PLSP-ID: 5
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (pce) (invalid)
Last error: No path
Metric Type: IGP, Path Accumulated Metric: 35
Attributes:
Forward Class: 0
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: no
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
暫くすると完全に SR-TE が消えます!
RP/0/RP0/CPU0:h_N1#show ip interface brief Sun Jun 11 07:35:03.279 UTC Interface IP-Address Status Protocol Vrf-Name srte_c_10_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_30_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_40_ep_6.6.6.6 1.1.1.1 Up Up default Loopback0 1.1.1.1 Up Up default MgmtEth0/RP0/CPU0/0 unassigned Shutdown Down default GigabitEthernet0/0/0/0 10.1.2.1 Up Up default GigabitEthernet0/0/0/1 unassigned Up Up default GigabitEthernet0/0/0/1.10 unassigned Up Up default GigabitEthernet0/0/0/1.20 198.51.100.1 Up Up A GigabitEthernet0/0/0/2 10.1.3.1 Up Up default GigabitEthernet0/0/0/3 unassigned Shutdown Down default GigabitEthernet0/0/0/4 unassigned Shutdown Down default RP/0/RP0/CPU0:h_N1# RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy color 20 detail Sun Jun 11 07:35:12.165 UTC RP/0/RP0/CPU0:h_N1#
6.6 宛先 Prefix が出現すると SR-TE も出現する
CEルータで Loopback 220 を no shutdown します。
CE2(config-if)#no shutdown CE2(config-if)# *Jun 11 07:40:14.172: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback220, changed state to up *Jun 11 07:40:14.173: %LINK-3-UPDOWN: Interface Loopback220, changed state to up CE2(config-if)#
即効で 宛先 Loopback 220 Prefix の SR-TE が復活します。
RP/0/RP0/CPU0:h_N1#show ip interface brief Sun Jun 11 07:40:24.633 UTC Interface IP-Address Status Protocol Vrf-Name srte_c_10_ep_6.6.6.6 1.1.1.1 Up Up default ★ srte_c_20_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_30_ep_6.6.6.6 1.1.1.1 Up Up default srte_c_40_ep_6.6.6.6 1.1.1.1 Up Up default Loopback0 1.1.1.1 Up Up default MgmtEth0/RP0/CPU0/0 unassigned Shutdown Down default GigabitEthernet0/0/0/0 10.1.2.1 Up Up default GigabitEthernet0/0/0/1 unassigned Up Up default GigabitEthernet0/0/0/1.10 unassigned Up Up default GigabitEthernet0/0/0/1.20 198.51.100.1 Up Up A GigabitEthernet0/0/0/2 10.1.3.1 Up Up default GigabitEthernet0/0/0/3 unassigned Shutdown Down default GigabitEthernet0/0/0/4 unassigned Shutdown Down default RP/0/RP0/CPU0:h_N1#
ポリシーの詳細もご覧の通り完全に復活します。
まさに On Demand !
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy color 20 detail
Sun Jun 11 07:40:29.208 UTC
SR-TE policy database
---------------------
Color: 20, End-point: 6.6.6.6
Name: srte_c_20_ep_6.6.6.6
Status:
★ Admin: up Operational: up for 00:00:13 (since Jun 11 07:40:15.516)
Candidate-paths:
★ Preference: 200 (BGP ODN) (active)
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (valid)
Metric Type: IGP, Path Accumulated Metric: 35
16006 [Prefix-SID, 6.6.6.6]
Preference: 100 (BGP ODN)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_20_ep_6.6.6.6_discr_100
PLSP-ID: 12
Protection Type: protected-preferred
Maximum SID Depth: 10
Dynamic (pce) (invalid)
Metric Type: NONE, Path Accumulated Metric: 0
LSPs:
LSP[0]:
LSP-ID: 2 policy ID: 17 (active)
Local label: 1001008
State: Programmed
Binding SID: 1001012
Attributes:
Binding SID: 1001012
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
7. もしかして ODN って Head-end のみでも定義できる?
もしかして、ODNってHead-endだけで定義することもできたりする?
— やすお (@chimay_wh) 2023年6月11日
まとめているうちに、ふと思いつきました。Automated Steering:AS を思い出してください。
SR-TE その7 Automated Steering Egress-PE
chimay-wh.hatenablog.com
SR-TE その8 Automated Steering Ingress-PE
chimay-wh.hatenablog.com
雑に言うとその7は、Egress-PE で Color Assignment をしていて、その8は Ingress-PE で Color Assignment をしています。 今回の ODN では、Color Assignment を Egress-PE で実施していますが、たまたま選択したのが Egress-PE だっただけで、Ingress-PE でできないことはないです。 つまり、ODN は Color Assignment をどっちで実施するか選択することができます。
ドキュメントには書いてありませんが、理論上はできます。(実際に簡易的に検証をしてできることを確認しました)

8. 参考
① On-Demand SR Policy – SR On-Demand Next-Hop
www.cisco.com
② Segment Routing On Demand Next-hop
y-network.jp
次回は、On Demand Next-hop:ODN with L2VPN について記事を書きます。
最後までお読みいただきありがとうございました!
Single-Domain SR-TE その9(EVPN VPWS Preferred Path over SR-TE Policy)
EVPN VPWS Preferred Path over SR-TE Policy が理解できたので自分のメモ用にアウトプットします。
- 1. EVPN VPWS Preferred Path over SR-TE Policy
- 2. Topology
- 3. Config
- 4. EVPN VPWS Preferred Path over SR-TE Policy の実装
- 5. 検証
- 5.1 fallback enabled 検証
- 5.2 fallback disable 検証
- 6. 参考
1. EVPN VPWS Preferred Path over SR-TE Policy
一言で言うと VPWS に SR-TE を関連付けることです。
2. Topology

3. Config
h_N1(主役① PEルータ;fallback enable)
hostname h_N1
group CCIE-ISIS
router isis '.*'
is-type level-2-only
address-family ipv4 unicast
metric-style wide
segment-routing mpls
!
interface 'Gi.*'
point-to-point
address-family ipv4 unicast
!
!
interface 'Loopback .*'
address-family ipv4 unicast
!
!
!
end-group
!
vrf A
rd 10:1
address-family ipv4 unicast
import route-target
200:1
!
export route-target
100:1
!
!
!
interface Loopback0
ipv4 address 1.1.1.1 255.255.255.255
!
interface MgmtEth0/RP0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.2.1 255.255.255.0
!
interface GigabitEthernet0/0/0/1.10 l2transport
encapsulation dot1q 10
!
interface GigabitEthernet0/0/0/1.20
vrf A
ipv4 address 198.51.100.1 255.255.255.0
encapsulation dot1q 20
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.3.1 255.255.255.0
!
interface GigabitEthernet0/0/0/3
shutdown
!
interface GigabitEthernet0/0/0/4
shutdown
!
route-policy PASS
pass
end-policy
!
router isis 1
apply-group CCIE-ISIS
net 49.0001.0000.0000.0001.00
address-family ipv4 unicast
!
interface Loopback0
address-family ipv4 unicast
prefix-sid index 1
!
!
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/0/0/2
!
!
router bgp 10
bgp router-id 1.1.1.1
address-family vpnv4 unicast
!
address-family l2vpn evpn
!
neighbor 6.6.6.6
remote-as 10
update-source Loopback0
address-family vpnv4 unicast
!
address-family l2vpn evpn
!
!
vrf A
rd 10:1
address-family ipv4 unicast
!
neighbor 198.51.100.100
remote-as 100
address-family ipv4 unicast
route-policy PASS in
route-policy PASS out
!
!
!
!
evpn
evi 100
advertise-mac
!
!
!
l2vpn
pw-class PW60000
encapsulation mpls
preferred-path sr-te policy srte_c_60000_ep_6.6.6.6 fallback enable
!
!
xconnect group EVPN_VPWS
p2p EVPN_1
interface GigabitEthernet0/0/0/1.10
neighbor evpn evi 1010 target 60 source 10
pw-class PW60000
!
!
!
!
mpls oam
!
segment-routing
traffic-eng
segment-list EVPN_VPWS_PREFER
index 10 mpls label 16002
index 20 mpls label 16003
index 30 mpls label 16004
index 40 mpls label 16005
index 50 mpls label 16006
!
policy LIGHTNING
binding-sid mpls 61000
color 60000 end-point ipv4 6.6.6.6
autoroute
include ipv4 6.6.6.6/32
!
candidate-paths
preference 100
explicit segment-list EVPN_VPWS_PREFER
!
!
!
!
!
!
mpls label range table 0 1001001 1001999
end
h_N1(主役① PEルータ;fallback disable)
hostname h_N1
group CCIE-ISIS
router isis '.*'
is-type level-2-only
address-family ipv4 unicast
metric-style wide
segment-routing mpls
!
interface 'Gi.*'
point-to-point
address-family ipv4 unicast
!
!
interface 'Loopback .*'
address-family ipv4 unicast
!
!
!
end-group
!
vrf A
rd 10:1
address-family ipv4 unicast
import route-target
200:1
!
export route-target
100:1
!
!
!
interface Loopback0
ipv4 address 1.1.1.1 255.255.255.255
!
interface MgmtEth0/RP0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.1.2.1 255.255.255.0
!
interface GigabitEthernet0/0/0/1.10 l2transport
encapsulation dot1q 10
!
interface GigabitEthernet0/0/0/1.20
vrf A
ipv4 address 198.51.100.1 255.255.255.0
encapsulation dot1q 20
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.1.3.1 255.255.255.0
!
interface GigabitEthernet0/0/0/3
shutdown
!
interface GigabitEthernet0/0/0/4
shutdown
!
route-policy PASS
pass
end-policy
!
router isis 1
apply-group CCIE-ISIS
net 49.0001.0000.0000.0001.00
address-family ipv4 unicast
!
interface Loopback0
address-family ipv4 unicast
prefix-sid index 1
!
!
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/0/0/2
!
!
router bgp 10
bgp router-id 1.1.1.1
address-family vpnv4 unicast
!
address-family l2vpn evpn
!
neighbor 6.6.6.6
remote-as 10
update-source Loopback0
address-family vpnv4 unicast
!
address-family l2vpn evpn
!
!
vrf A
rd 10:1
address-family ipv4 unicast
!
neighbor 198.51.100.100
remote-as 100
address-family ipv4 unicast
route-policy PASS in
route-policy PASS out
!
!
!
!
evpn
evi 100
advertise-mac
!
!
!
l2vpn
pw-class PW60000
encapsulation mpls
preferred-path sr-te policy srte_c_60000_ep_6.6.6.6 fallback disable
!
!
xconnect group EVPN_VPWS
p2p EVPN_1
interface GigabitEthernet0/0/0/1.10
neighbor evpn evi 1010 target 60 source 10
pw-class PW60000
!
!
!
!
mpls oam
!
segment-routing
traffic-eng
segment-list EVPN_VPWS_PREFER
index 10 mpls label 16002
index 20 mpls label 16003
index 30 mpls label 16004
index 40 mpls label 16005
index 50 mpls label 16006
!
policy LIGHTNING
binding-sid mpls 61000
color 60000 end-point ipv4 6.6.6.6
autoroute
include ipv4 6.6.6.6/32
!
candidate-paths
preference 100
explicit segment-list EVPN_VPWS_PREFER
!
!
!
!
!
!
mpls label range table 0 1001001 1001999
end
h_N2(脇役)
hostname h_N2 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 2.2.2.2 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.1.2.2 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.2.3.2 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.2.4.2 255.255.255.0 ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0002.00 address-family ipv4 unicast ! interface Loopback0 address-family ipv4 unicast prefix-sid index 2 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! mpls label range table 0 1002001 1002999 end
h_N3(脇役)
hostname h_N3 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 3.3.3.3 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.1.3.3 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.2.3.3 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.3.5.3 255.255.255.0 ! interface GigabitEthernet0/0/0/3 ipv4 address 10.3.4.3 255.255.255.0 ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0003.00 address-family ipv4 unicast ! interface Loopback0 address-family ipv4 unicast prefix-sid index 3 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! interface GigabitEthernet0/0/0/3 ! ! mpls oam ! mpls label range table 0 1003001 1003999 end
h_N4(脇役)
hostname h_N4 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 4.4.4.4 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.2.4.4 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.4.5.4 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.4.6.4 255.255.255.0 ! interface GigabitEthernet0/0/0/3 ipv4 address 10.3.4.4 255.255.255.0 ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0004.00 address-family ipv4 unicast ! interface Loopback0 prefix-attributes anycast address-family ipv4 unicast prefix-sid index 4 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! interface GigabitEthernet0/0/0/3 ! ! mpls oam ! mpls label range table 0 1004001 1004999 end
h_N5(脇役)
hostname h_N5 group CCIE-ISIS router isis '.*' is-type level-2-only address-family ipv4 unicast metric-style wide segment-routing mpls ! interface 'Gi.*' point-to-point address-family ipv4 unicast ! ! interface 'Loopback .*' address-family ipv4 unicast ! ! ! end-group ! interface Loopback0 ipv4 address 5.5.5.5 255.255.255.255 ! interface MgmtEth0/RP0/CPU0/0 shutdown ! interface GigabitEthernet0/0/0/0 ipv4 address 10.3.5.5 255.255.255.0 ! interface GigabitEthernet0/0/0/1 ipv4 address 10.4.5.5 255.255.255.0 ! interface GigabitEthernet0/0/0/2 ipv4 address 10.5.6.5 255.255.255.0 ! router isis 1 apply-group CCIE-ISIS net 49.0001.0000.0000.0005.00 address-family ipv4 unicast ! interface Loopback0 prefix-attributes anycast address-family ipv4 unicast prefix-sid index 5 ! ! interface GigabitEthernet0/0/0/0 ! interface GigabitEthernet0/0/0/1 ! interface GigabitEthernet0/0/0/2 ! ! mpls oam ! mpls label range table 0 1005001 1005999 end
h_N6(準主役① PEルータ)
hostname h_N6
group CCIE-ISIS
router isis '.*'
is-type level-2-only
address-family ipv4 unicast
metric-style wide
segment-routing mpls
!
interface 'Gi.*'
point-to-point
address-family ipv4 unicast
!
!
interface 'Loopback .*'
address-family ipv4 unicast
!
!
!
end-group
!
vrf B
rd 10:6
address-family ipv4 unicast
import route-target
100:1
!
export route-target
200:1
!
!
!
interface Loopback0
ipv4 address 6.6.6.6 255.255.255.255
!
interface MgmtEth0/RP0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
ipv4 address 10.4.6.6 255.255.255.0
!
interface GigabitEthernet0/0/0/1.10 l2transport
encapsulation dot1q 10
!
interface GigabitEthernet0/0/0/1.30
vrf B
ipv4 address 203.0.113.6 255.255.255.0
encapsulation dot1q 30
!
interface GigabitEthernet0/0/0/2
ipv4 address 10.5.6.6 255.255.255.0
!
interface GigabitEthernet0/0/0/3
shutdown
!
interface GigabitEthernet0/0/0/4
shutdown
!
route-policy PASS
pass
end-policy
!
router isis 1
apply-group CCIE-ISIS
net 49.0001.0000.0000.0006.00
address-family ipv4 unicast
!
interface Loopback0
address-family ipv4 unicast
prefix-sid index 6
!
!
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/0/0/2
!
!
router bgp 10
bgp router-id 6.6.6.6
address-family vpnv4 unicast
!
address-family l2vpn evpn
!
neighbor 1.1.1.1
remote-as 10
update-source Loopback0
address-family vpnv4 unicast
!
address-family l2vpn evpn
!
!
vrf B
rd 10:6
address-family ipv4 unicast
!
neighbor 203.0.113.200
remote-as 200
address-family ipv4 unicast
route-policy PASS in
route-policy PASS out
!
!
!
!
evpn
evi 100
advertise-mac
!
!
!
l2vpn
xconnect group EVPN_VPWS
p2p EVPN_1
interface GigabitEthernet0/0/0/1.10
neighbor evpn evi 1010 target 10 source 60
!
!
!
!
mpls oam
!
mpls label range table 0 1006001 1006999
end
h_CE1(準主役② CEルータ)
hostname CE1 ! no ip domain lookup ! interface Loopback0 ip address 100.100.100.100 255.255.255.255 ! interface Loopback110 ip address 1.1.1.10 255.255.255.255 ! interface GigabitEthernet1 no ip address ! interface GigabitEthernet1.10 encapsulation dot1Q 10 ip address 192.0.2.100 255.255.255.0 ! interface GigabitEthernet1.20 encapsulation dot1Q 20 ip address 198.51.100.100 255.255.255.0 ! router bgp 100 bgp router-id 100.100.100.100 bgp log-neighbor-changes network 1.1.1.10 mask 255.255.255.255 neighbor 198.51.100.1 remote-as 10 ! line con 0 exec-timeout 0 0 ! end
h_CE2(準主役③ CEルータ)
hostname CE2 ! no ip domain lookup ! interface Loopback0 ip address 200.200.200.200 255.255.255.255 ! interface Loopback210 ip address 2.2.2.10 255.255.255.255 ! interface Loopback220 ip address 2.2.2.20 255.255.255.255 ! interface GigabitEthernet1 no ip address ! interface GigabitEthernet1.10 encapsulation dot1Q 10 ip address 192.0.2.200 255.255.255.0 ! interface GigabitEthernet1.30 encapsulation dot1Q 30 ip address 203.0.113.200 255.255.255.0 ! router bgp 200 bgp router-id 200.200.200.200 bgp log-neighbor-changes network 2.2.2.10 mask 255.255.255.255 network 2.2.2.20 mask 255.255.255.255 neighbor 203.0.113.6 remote-as 10 ! line con 0 exec-timeout 0 0 ! end
4. EVPN VPWS Preferred Path over SR-TE Policy の実装
L2VPN が実装されている前提で話を進めます。 → Single-Domain SR-TE その6(LxVPN over SR)完了した状態からスタートします。
実装の流れは、① Head-end で explicit Path を定義し、② SR-TEのポリシーを定義します。③ 経路(Candidate-paths)の候補を②で指定した path list から選択します。
④ Head-end で Pseudowire class template を定義し、⑤ L2VPN(E-LINE) で Pseudowire class template を指定します。

4.1 PEルータ(Head-end)
4.1.1 explicit Path の定義
① Segment Routing を定義します。
RP/0/RP0/CPU0:h_N1(config)# segment-routing Segment Routing
② Segment Routing で Traffic Engineering を定義します。
RP/0/RP0/CPU0:h_N1(config-sr)#? traffic-eng Segment Routing Traffic Engineering
③ Segment-list configuration でSegment-list名(任意:EVPN_VPWS_PREFER)を定義します。
RP/0/RP0/CPU0:h_N1(config-sr-te)#? segment-list Segment-list configuration RP/0/RP0/CPU0:h_N1(config-sr-te)#segment-list ? name Segment-list name WORD Identifying name for segment-list RP/0/RP0/CPU0:h_N1(config-sr-te)#segment-list EVPN_VPWS_PREFER
④ SR-TEで経路を明示的に定義します。
RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#? index Next entry index RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index ? <1-65535> Index number RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 ? mpls MPLS configuration RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 mpls ? label MPLS label configuration RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 mpls label ? <0-1048575> MPLS label value RP/0/RP0/CPU0:h_N1(config-sr-te-sl)#index 10 mpls label 16002
EVPN_VPWS_PREFER N1→N2→N3→N4→N5→N6 を作ります。
segment-routing traffic-eng segment-list EVPN_VPWS_PREFER index 10 mpls label 16002 index 20 mpls label 16003 index 30 mpls label 16004 index 40 mpls label 16005 index 50 mpls label 16006 ! ! !
4.1.2 SR-TE Policy の定義
SR-TE Policy を以下のように定義します。
a) ポリシー名 :LIGHTNING
b) B-SID(任意):61000
c) color :60000
d) Tail-End :6.6.6.6(h_N6)
SR-TEは、a)ポリシー名とc)カラー、d)Tail-Endの指定が必須です。
① 先ずはポリシー名を定義します。
RP/0/RP0/CPU0:h_N1(config-sr-te)#policy ? WORD Identifying name for policy with max 59 characters RP/0/RP0/CPU0:h_N1(config-sr-te)#policy LIGHTNING
② B-SID(binding-sid)は任意設定です。 ※ SR-TE Policy自体に割り当てられたSIDをB-SID(binding-sid)と呼びます。
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#? binding-sid Binding Segment Identifier RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#binding-sid ? mpls MPLS label RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#binding-sid mpls ? <16-1048575> MPLS label RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#binding-sid mpls 61000
③ 次にカラーとTail-Endを指定します。
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#? color Specify color for policy RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color ? <1-4294967295> Color value RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 60000 ? end-point Policy endpoint RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 60000 end-point ? ipv4 IPv4 address RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 60000 end-point ipv4 ? A.B.C.D IPv4 endpoint address RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#color 60000 end-point ipv4 6.6.6.6 ? <cr>
④ SR-TEポリシーで作成したLSP経由でパケットを転送させるため、autorouteを定義します。
端的に言うと、For traffic steering toward h_N6 ってことです。
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#? autoroute Autoroute configuration RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#autoroute RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#? include Prefixes for which IGP routes will be installed RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#include ? all Include all eligible prefixes ipv4 IPv4 address family RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#include ipv4 ? A.B.C.D/length IP prefix route to include RP/0/RP0/CPU0:h_N1(config-sr-te-policy-autoroute)#include ipv4 6.6.6.6/32
4.1.3 Candidate-paths の定義
Candidate-paths を以下のように定義します。
a) preference :100
b) explicit path :EVPN_VPWS_PREFER
preference と指定する経路リストをセットで指定します。
RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#? candidate-paths Candidate-paths configuration RP/0/RP0/CPU0:h_N1(config-sr-te-policy)#candidate-paths RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path)#? preference Policy path-option preference entry RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path)#preference ? <1-65535> Path-option preference RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path)#preference 100 RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#? explicit Preconfigured path RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#explicit ? segment-list Specify Segment-list RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#explicit segment-list ? EXPLICIT_LIST Identifying name for segment-list WORD Identifying name for segment-list RP/0/RP0/CPU0:h_N1(config-sr-te-policy-path-pref)#explicit segment-list EVPN_VPWS_PREFER
4.1.4 Pseudowire class template の定義
① 事前に SR-TE のポリシー名を控えておきます。 今回は”srte_c_60000_ep_6.6.6.6 ”です。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy candidate-path name LIGHTNING | i Name
Sun May 28 15:34:47.209 UTC
★ Name: srte_c_60000_ep_6.6.6.6
Name: LIGHTNING
RP/0/RP0/CPU0:h_N1#
② L2VPN の Pseudowire class で優先させる SR-TE を指定します。
途中、①で控えた SR-TE のポリシー名を使います★
RP/0/RP0/CPU0:h_N1(config)#?
l2vpn Configure l2vpn commands
RP/0/RP0/CPU0:h_N1(config-l2vpn)#?
pw-class Pseudowire class template
RP/0/RP0/CPU0:h_N1(config-l2vpn)#pw-class ?
WORD Pseudowire-class name (Max character length: 32)
RP/0/RP0/CPU0:h_N1(config-l2vpn)#pw-class PW60000
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc)#?
encapsulation Pseudowire encapsulation
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc)#encapsulation ?
mpls Set pseudowire encapsulation to MPLS
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc)#encapsulation mpls
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#?
preferred-path Preferred path tunnel settings
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#preferred-path ?
sr-te Use segment-routing traffic-engineering for preferred path
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#preferred-path sr-te ?
policy Specify SR TE policy for preferred path
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#preferred-path sr-te policy ?
WORD Name of SR TE policy
★ RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#preferred-path sr-te policy srte_c_60000_ep_6.6.6.6
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#show
Sun May 28 15:48:27.562 UTC
l2vpn
pw-class PW60000
encapsulation mpls
preferred-path sr-te policy srte_c_60000_ep_6.6.6.6
!
!
!
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#commit
Sun May 28 15:48:33.683 UTC
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#
4.1.5 L2VPN(E-LINE) の定義
③ L2VPN(E-LINE)の定義に、Pseudowire class template を指定します。
xconnect Group:EVPN_VPWS
p2p xconnect :EVPN_1
AC interface :GigabitEthernet0/0/0/1.10
EVI :1010
remote AC :60
local AC :10
★ Pseudowire class:PW60000
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#exi
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc)#exi
RP/0/RP0/CPU0:h_N1(config-l2vpn)#
RP/0/RP0/CPU0:h_N1(config-l2vpn)#xconnect group EVPN_VPWS
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc)#p2p EVPN_1
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p)#interface GigabitEthernet 0/0/0/1.10
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p)#neighbor evpn evi 1010 target 60 sourc$
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p-pw)#?
pw-class PW class template name to use
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p-pw)#pw-class ?
WORD Pseudowire-class name
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p-pw)#pw-class PW60000
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p-pw)#show
Sun May 28 16:03:00.598 UTC
l2vpn
xconnect group EVPN_VPWS
p2p EVPN_1
neighbor evpn evi 1010 target 60 source 10
pw-class PW60000
!
!
!
!
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p-pw)#commit
Sun May 28 16:03:16.166 UTC
RP/0/RP0/CPU0:h_N1(config-l2vpn-xc-p2p-pw)#
5. 検証
5.1 fallback enabled 検証
① SR-TE Prefered path を定義する前にはなかった Preferred path Active と言う行が出現します。
RP/0/RP0/CPU0:h_N1#show l2vpn xconnect detail
Sun May 28 23:26:41.929 UTC
Group EVPN_VPWS, XC EVPN_1, state is up; Interworking none
AC: GigabitEthernet0/0/0/1.10, state is up
Type VLAN; Num Ranges: 1
Rewrite Tags: []
VLAN ranges: [10, 10]
MTU 1504; XC ID 0x2; interworking none
Statistics:
packets: received 10113, sent 5077
bytes: received 67544, sent 596810
drops: illegal VLAN 0, illegal length 0
★1 EVPN: neighbor 6.6.6.6, PW ID: evi 1010, ac-id 60, state is up ( established )
XC ID 0xa0000003
Encapsulation MPLS
Encap type Ethernet, control word disabled
Sequencing not set
★2 Preferred path Active : SR TE srte_c_60000_ep_6.6.6.6 (BSID:61000, IFH:0x3c), Statically configured, fallback enabled
Ignore MTU mismatch: Enabled
Transmit MTU zero: Enabled
Tunnel : Up
EVPN Local Remote
------------ ------------------------------ -----------------------------
Label 24004 24004
MTU 1518 unknown
Control word disabled disabled
AC ID 10 60
EVPN type Ethernet Ethernet
------------ ------------------------------ -----------------------------
Create time: 21/05/2023 06:33:56 (1w0d ago)
Last time status changed: 28/05/2023 23:25:57 (00:00:44 ago)
Statistics:
packets: received 5077, sent 10113
bytes: received 596810, sent 67544
RP/0/RP0/CPU0:h_N1#
★1 EVPN VPWS state is up ( established ) UPしています。
★2 Default で fallback enabled です。つまり、SR-TE が仮に down しても IGP routing によって通信を継続します。
→ SR-TE down を fallback するという option 定義です。
② SR TE srte_c_60000_ep_6.6.6.6 の転送状況を確認します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy detail
Sun May 28 23:36:52.736 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 60000, End-point: 6.6.6.6
★1 Name: srte_c_60000_ep_6.6.6.6
Binding SID: 61000
★2 Active LSP:
Candidate path:
Preference: 100 (configuration)
Name: LIGHTNING
★3 Local label: 1001007
Segment lists:
SL[0]:
Name: EVPN_VPWS_PREFER
Switched Packets/Bytes: 14856/1811022
[MPLS -> MPLS]: 14856/1811022
Paths:
Path[0]:
Outgoing Label: 16003
Outgoing Interfaces: GigabitEthernet0/0/0/0
Next Hop: 10.1.2.2
Switched Packets/Bytes: 14856/1811022
[MPLS -> MPLS]: 14856/1811022
FRR Pure Backup: No
ECMP/LFA Backup: No
Internal Recursive Label: Unlabelled (recursive)
★4 Label Stack (Top -> Bottom): { 16003, 16004, 16005, 16006 }
Path-id: 1, Weight: 64
Policy Packets/Bytes Switched: 23417/2943792
RP/0/RP0/CPU0:h_N1#
★1 SR-TE のポリシー名は、srte_c_60000_ep_6.6.6.6
★2 SR-TE は有効です。
★3 Local label: 1001007
★4 Label Stack している状況が確認できます。
③ SR-TE は UP/UP しています。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy detail
Sun May 28 23:48:28.366 UTC
SR-TE policy database
---------------------
★ Color: 60000, End-point: 6.6.6.6
Name: srte_c_60000_ep_6.6.6.6
Status:
★ Admin: up Operational: up for 00:22:30 (since May 28 23:25:57.433)
Candidate-paths:
Preference: 100 (configuration) (active)
Name: LIGHTNING
Requested BSID: 61000
Protection Type: protected-preferred
Maximum SID Depth: 10
★ Explicit: segment-list EVPN_VPWS_PREFER (valid)
Weight: 1, Metric Type: TE
16002
16003
16004
16005
16006
LSPs:
LSP[0]:
LSP-ID: 3 policy ID: 5 (active)
Local label: 1001007
State: Programmed
Binding SID: 61000
Attributes:
Binding SID: 61000
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
Admin: up Operational: up で、Explicit: segment-list EVPN_VPWS_PREFER (valid) 想定通り steering しています。
④ Provider NW内の SR-TE を traceroute で確認します。
RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source loopback 0 Sun May 28 23:42:38.955 UTC Type escape sequence to abort. Tracing the route to 6.6.6.6 1 10.1.2.2 [MPLS: Labels 16003/16004/16005/16006 Exp 0] 12 msec 4 msec 4 msec 2 10.2.3.3 [MPLS: Labels 16004/16005/16006 Exp 0] 6 msec 4 msec 4 msec 3 10.3.4.4 [MPLS: Labels 16005/16006 Exp 0] 7 msec 4 msec 4 msec 4 10.4.5.5 [MPLS: Label 16006 Exp 0] 8 msec 4 msec 4 msec 5 10.5.6.6 12 msec * 6 msec RP/0/RP0/CPU0:h_N1#
L2VPN なので CEルータ同士の疎通確認ではラベルスタックが確認できませんが、↑のようにトラフィックが流れます。
⑤ 当然ですが、CEルータ同士の疎通できています。
CE1#ping 192.0.2.200 repeat 40 Type escape sequence to abort. Sending 40, 100-byte ICMP Echos to 192.0.2.200, timeout is 2 seconds: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Success rate is 100 percent (40/40), round-trip min/avg/max = 2/3/8 ms CE1#
⑥ ここで、SR-TE を DOWN させます。Explicit Path の最初の SID が Down すると、SR-TE が DOWN します。手っ取り早いのは h_N2 の Loopback 0 を shutdown することです。詳しくは、過去のブログをご参照ください。
chimay-wh.hatenablog.com
RP/0/RP0/CPU0:h_N2#con Sun May 28 23:57:24.318 UTC RP/0/RP0/CPU0:h_N2(config)#int lo0 RP/0/RP0/CPU0:h_N2(config-if)#shutdown RP/0/RP0/CPU0:h_N2(config-if)#commit Sun May 28 23:57:34.816 UTC RP/0/RP0/CPU0:h_N2(config-if)#
⑦ SR-TE が DOWN します。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng policy detail
Sun May 28 23:59:17.625 UTC
SR-TE policy database
---------------------
★ Color: 60000, End-point: 6.6.6.6
Name: srte_c_60000_ep_6.6.6.6
Status:
★ Admin: up Operational: down for 00:01:42 (since May 28 23:57:35.059)
Candidate-paths:
Preference: 100 (configuration)
Name: LIGHTNING
Requested BSID: 61000
Protection Type: protected-preferred
Maximum SID Depth: 10
★ Explicit: segment-list EVPN_VPWS_PREFER (invalid)
Last error: unresolved first label (16002)
Weight: 1, Metric Type: TE
Attributes:
Forward Class: 0
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: no
Invalidation drop enabled: no
RP/0/RP0/CPU0:h_N1#
Admin: up Operational: down となり、segment-list EVPN_VPWS_PREFER (invalid) となります。
⑧ しかし、EVPN VPWS は、SR-TE を使わずに regular IGP path を使って state is up ( established ) を継続します。
RP/0/RP0/CPU0:h_N1#show l2vpn xconnect detail
Mon May 29 00:08:19.514 UTC
Group EVPN_VPWS, XC EVPN_1, state is up; Interworking none
AC: GigabitEthernet0/0/0/1.10, state is up
Type VLAN; Num Ranges: 1
Rewrite Tags: []
VLAN ranges: [10, 10]
MTU 1504; XC ID 0x2; interworking none
Statistics:
packets: received 9030, sent 15901
bytes: received 1370146, sent 1874042
drops: illegal VLAN 0, illegal length 0
★ EVPN: neighbor 6.6.6.6, PW ID: evi 1010, ac-id 60, state is up ( established )
XC ID 0xa0000003
Encapsulation MPLS
Encap type Ethernet, control word disabled
Sequencing not set
Preferred path Active : SR TE srte_c_60000_ep_6.6.6.6 (BSID:None, IFH:0x3c), Statically configured, fallback enabled
Ignore MTU mismatch: Enabled
Transmit MTU zero: Enabled
Tunnel : Up
EVPN Local Remote
------------ ------------------------------ -----------------------------
Label 24004 24004
MTU 1518 unknown
Control word disabled disabled
AC ID 10 60
EVPN type Ethernet Ethernet
------------ ------------------------------ -----------------------------
Create time: 21/05/2023 06:33:56 (1w0d ago)
Last time status changed: 28/05/2023 23:25:57 (00:42:21 ago)
Statistics:
packets: received 15901, sent 9030
bytes: received 1874042, sent 1370146
RP/0/RP0/CPU0:h_N1#
SR-TE の転送状況を確認すると、SR-TE を使っていないことは明白です。
RP/0/RP0/CPU0:h_N1#show segment-routing traffic-eng forwarding policy detail
Mon May 29 00:15:18.715 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 60000, End-point: 6.6.6.6
Name: srte_c_60000_ep_6.6.6.6
Policy Packets/Bytes Switched: 35199/4426854
RP/0/RP0/CPU0:h_N1#
⑨ Provider NW内の SR-TE を traceroute で確認します。
RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source loopback 0
Mon May 29 00:17:30.554 UTC
Type escape sequence to abort.
Tracing the route to 6.6.6.6
1 10.1.2.2 [MPLS: Label 16006 Exp 0] 10 msec
10.1.3.3 8 msec 3 msec
2 10.3.5.5 [MPLS: Label 16006 Exp 0] 7 msec
10.3.4.4 6 msec
10.3.5.5 4 msec
3 10.5.6.6 9 msec *
10.4.6.6 5 msec
RP/0/RP0/CPU0:h_N1#
⑩ 当然ですが、CEルータ同士の疎通できています。
CE1#ping 192.0.2.200 repeat 40 Type escape sequence to abort. Sending 40, 100-byte ICMP Echos to 192.0.2.200, timeout is 2 seconds: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Success rate is 100 percent (40/40), round-trip min/avg/max = 4/5/7 ms CE1#
これが fallback enabled(Default)の動作です。SR-TE が DOWN しても、regular IGP path を使って EVPN VPWS を継続利用できるようになります。
5.2 fallback disable 検証
ここまでの状況を簡単に言うと、SR-TE が DOWN しています。しかし、EVPN VPWS は preferred-path の fallback option によって通信を継続させています。 ここで、fallback option を disable にするとどうなるのかを検証します。
① fallback option を disable にします。
RP/0/RP0/CPU0:h_N1#conf
Mon May 29 00:22:57.885 UTC
RP/0/RP0/CPU0:h_N1(config)#l2vpn
RP/0/RP0/CPU0:h_N1(config-l2vpn)#pw-class PW60000
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc)#encapsulation mpls
★ RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#$srte_c_60000_ep_6.6.6.6 ?
★ fallback Fallback option for preferred path
★ <cr>
★ RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#$srte_c_60000_ep_6.6.6.6 fallback ?
★ disable Disable fallback for preferred path
★ RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#preferred-path sr-te policy srte_c_6$
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#show
Mon May 29 00:26:53.780 UTC
l2vpn
pw-class PW60000
encapsulation mpls
preferred-path sr-te policy srte_c_60000_ep_6.6.6.6 fallback disable
!
!
!
RP/0/RP0/CPU0:h_N1(config-l2vpn-pwc-mpls)#
② VPWS の詳細を確認します。
RP/0/RP0/CPU0:h_N1#show l2vpn xconnect detail
Mon May 29 00:31:21.114 UTC
Group EVPN_VPWS, XC EVPN_1, state is down; Interworking none
AC: GigabitEthernet0/0/0/1.10, state is up
Type VLAN; Num Ranges: 1
Rewrite Tags: []
VLAN ranges: [10, 10]
MTU 1504; XC ID 0x2; interworking none
Statistics:
packets: received 9030, sent 15901
bytes: received 1370146, sent 1874042
drops: illegal VLAN 0, illegal length 0
★ EVPN: neighbor 6.6.6.6, PW ID: evi 1010, ac-id 60, state is down ( local ready )
XC ID 0xa0000003
Encapsulation MPLS
Encap type Ethernet, control word disabled
Sequencing not set
Preferred path Active : SR TE srte_c_60000_ep_6.6.6.6 (BSID:None, IFH:0x3c), Statically configured, fallback disabled
Ignore MTU mismatch: Enabled
Transmit MTU zero: Enabled
Tunnel : Down
EVPN Local Remote
------------ ------------------------------ -----------------------------
Label 24004 24004
MTU 1518 unknown
Control word disabled disabled
AC ID 10 60
EVPN type Ethernet Ethernet
------------ ------------------------------ -----------------------------
Create time: 21/05/2023 06:33:56 (1w0d ago)
Last time status changed: 29/05/2023 00:30:59 (00:00:21 ago)
Statistics:
packets: received 15901, sent 9030
bytes: received 1874042, sent 1370146
RP/0/RP0/CPU0:h_N1#
state is down ( local ready ) となり、EVPN VPWS も SR-TE と同様に DOWN します。
③ Provider NW内の SR-TE を traceroute で確認します。
RP/0/RP0/CPU0:h_N1#traceroute 6.6.6.6 source loopback 0
Mon May 29 00:36:22.736 UTC
Type escape sequence to abort.
Tracing the route to 6.6.6.6
1 10.1.2.2 [MPLS: Label 16006 Exp 0] 9 msec 3 msec
10.1.3.3 6 msec
2 10.2.4.4 [MPLS: Label 16006 Exp 0] 5 msec 3 msec 4 msec
3 10.4.6.6 9 msec
10.5.6.6 5 msec *
RP/0/RP0/CPU0:h_N1#
regular IGP path が生きているため Head-end から End-point との通信は可能な状態です。
④ Provider NW 内は疎通可能な状態ですが、SR-TE が DOWN しており更に VPWS の preferred-path の fallback option が disable になっているため SR-TE の fallback が働かないため、CEルータ同士は疎通ができなくなります。
CE1#ping 192.0.2.200 repeat 40 Type escape sequence to abort. Sending 40, 100-byte ICMP Echos to 192.0.2.200, timeout is 2 seconds: ........................................ Success rate is 0 percent (0/40) CE1#
6. 参考
① EVPN VPWS Preferred Path over SR-TE Policy
www.cisco.com
次回は、On Demand Next-hop:ODN について記事を書きます。
最後までお読みいただきありがとうございました!