概要
vSRXをVMware Workstation上に2台デプロイして、それぞれを拠点ゲートウェイとします。各拠点にはそれぞれ1つのセグメント(VMNet11とVMNet12)を接続し、VPLSで同一ネットワークとして接続することで、各拠点の仮想マシン間でPINGできるとこまで構築してみます。本番環境だとCE側(ge-0/0/0)はスイッチを接続していてVLAN Trunkとしていますが、今回は1つのセグメントを接続しているだけなのでVLAN設定もしていません。
前提条件
No | 項目 | 値 |
---|---|---|
1 | JUNOSバージョン | 20.1R1.11 |
2 | 仮想環境 | VMware Workstation 15 |
3 | ホストOS | Windows 10 |
全体の流れ
おおまかに下記の流れで設定していきます
- インタフェース設定
- OSPF設定
- MPLS設定
- VPLS設定
vSRX02の設定
インタフェース設定
- ループバックインタフェース
# set interfaces lo0 unit 0 family inet address 1.1.1.2/32
- MPLSインタフェース
# delete interfaces ge-0/0/1
# set interfaces ge-0/0/1 unit 0 family inet address 192.168.10.2/24
- ルータID
# set routing-options router-id 1.1.1.2
OSPFの設定
- シングルエリアのOSPFを設定します
# set protocol ospf area 0 interface ge-0/0/1.0
# set protocol ospf area 0 interface lo0.0
MPLSの設定
- インタフェースにMPLSプロトコルを設定します
# set interfaces ge-0/0/1 unit 0 family mpls
# set protocols mpls interface ge-0/0/1
# set protocols mpls no-cspf
- シグナリングプロトコルにRSVPを設定します
# set protocols rsvp interface ge-0/0/1.0
# set protocols rsvp interface lo0.0
- LSPを設定します(テスト用なのでパスは1つだけ設定)
# set protocols mpls label-switched-path vSRX02-vSRX01 to 1.1.1.1
# set protocols mpls label-switched-path vSRX02-vSRX01 primary MAIN
# set protocols mpls path MAIN 1.1.1.1 strict
VPLSの設定
! LDPの設定
# set protocols ldp interface ge-0/0/1.0
# set protocols ldp interface lo0.0
! Routing Instanceの設定
# set routing-instances VPLS1 instance-type vpls
# set routing-instances VPLS1 interface ge-0/0/0.0
# set routing-instances VPLS1 protocols vpls no-tunnel-services
# set routing-instances VPLS1 protocols vpls vpls-id 1
# set routing-instances VPLS1 protocols vpls neighbor 1.1.1.1
! VPLSをインタフェースに適用
# set interfaces ge-0/0/0 encapsulation ethernet-vpls
# set interfaces ge-0/0/0 unit 0 family vpls
ここまででVPLSの設定が完了しました。
vsrx02のConfig
最終的に下記Configになってるはず
admin@vsrx02# run show configuration | display set | no-more
set version 20200319.130545_builder.r1095278
set system host-name vsrx02
set system root-authentication encrypted-password "xxxxx"
set system login user admin uid 2000
set system login user admin class super-user
set system login user admin authentication encrypted-password "xxxxx"
set system services ssh root-login allow
set system services netconf ssh
set system services rest http port 3000
set system services rest enable-explorer
set system services web-management http interface fxp0.0
set system time-zone Asia/Tokyo
set system name-server 8.8.8.8
set system name-server 8.8.4.4
set system syslog user * any emergency
set system syslog file messages any any
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system license autoupdate url https://ae1.juniper.net/junos/key_retrieval
set system ntp server 133.243.238.243
set security forwarding-options family mpls mode packet-based
set interfaces ge-0/0/0 encapsulation ethernet-vpls
set interfaces ge-0/0/0 unit 0 family vpls
set interfaces ge-0/0/1 unit 0 family inet address 192.168.10.2/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces fxp0 unit 0 family inet dhcp
set interfaces lo0 unit 0 family inet address 1.1.1.2/32
set routing-instances VPLS1 protocols vpls no-tunnel-services
set routing-instances VPLS1 protocols vpls vpls-id 1
set routing-instances VPLS1 protocols vpls neighbor 1.1.1.1
set routing-instances VPLS1 interface ge-0/0/0.0
set routing-instances VPLS1 instance-type vpls
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface lo0.0
set protocols mpls no-cspf
set protocols mpls label-switched-path vSRX02-vSRX01 to 1.1.1.1
set protocols mpls label-switched-path vSRX02-vSRX01 primary MAIN
set protocols mpls path MAIN 1.1.1.1
set protocols mpls path MAIN 192.168.10.1 strict
set protocols mpls interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface lo0.0
set routing-options router-id 1.1.1.2
対向ルータ(vSRX01)の設定
vSRX02と内容が同じなのでConfigだけ記載しておきます
vsrx01のConfig
admin@vsrx01# run show configuration | display set | no-more
set version 20200319.130545_builder.r1095278
set system host-name vsrx01
set system root-authentication encrypted-password "xxxxx"
set system login user admin uid 2000
set system login user admin class super-user
set system login user admin authentication encrypted-password "xxxxx"
set system services ssh root-login allow
set system services netconf ssh
set system services rest http port 3000
set system services rest enable-explorer
set system services web-management http interface fxp0.0
set system time-zone Asia/Tokyo
set system name-server 8.8.8.8
set system name-server 8.8.4.4
set system syslog user * any emergency
set system syslog file messages any any
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set system license autoupdate url https://ae1.juniper.net/junos/key_retrieval
set system ntp server 133.243.238.243
set security forwarding-options family mpls mode packet-based
set interfaces ge-0/0/0 encapsulation ethernet-vpls
set interfaces ge-0/0/0 unit 0 family vpls
set interfaces ge-0/0/1 unit 0 family inet address 192.168.10.1/24
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces fxp0 unit 0 family inet dhcp
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
set routing-instances VPLS1 protocols vpls no-tunnel-services
set routing-instances VPLS1 protocols vpls vpls-id 1
set routing-instances VPLS1 protocols vpls neighbor 1.1.1.2
set routing-instances VPLS1 interface ge-0/0/0.0
set routing-instances VPLS1 instance-type vpls
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface lo0.0
set protocols mpls no-cspf
set protocols mpls label-switched-path vSRX01-vSRX02 to 1.1.1.2
set protocols mpls label-switched-path vSRX01-vSRX02 primary MAIN
set protocols mpls path MAIN 192.168.10.2 strict
set protocols mpls interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface lo0.0
set routing-options router-id 1.1.1.1
通信確認
VPLSコネクションのステータス確認
通信が成功した時のVPLSステータスを確認します
admin@vsrx02# run show vpls connections
Layer-2 VPN connections:
Instance: VPLS1
VPLS-id: 1
Neighbor Type St Time last up # Up trans
1.1.1.1(vpls-id 1) rmt Up May 6 14:29:24 2020 1
Remote PE: 1.1.1.1, Negotiated control-word: No
Incoming label: 262145, Outgoing label: 262145
Negotiated PW status TLV: No
Local interface: lsi.1048832, Status: Up, Encapsulation: ETHERNET
Description: Intf - vpls VPLS1 neighbor 1.1.1.1 vpls-id 1
Flow Label Transmit: No, Flow Label Receive: No
VPLSコネクションが失敗した時のエビデンス
LSPが確立されているところまで確認
admin@vsrx01# run show mpls lsp
Ingress LSP: 1 sessions
To From State Rt P ActivePath LSPname
1.1.1.2 1.1.1.1 Up 0 * MAIN vSRX01-vSRX02
Total 1 displayed, Up 1, Down 0
Egress LSP: 1 sessions
To From State Rt Style Labelin Labelout LSPname
1.1.1.1 1.1.1.2 Up 0 1 FF 3 - vSRX02-vSRX01
Total 1 displayed, Up 1, Down 0
Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0
VPLSの設定を追加すると、VPLSコネクションのステータスが”ST”になってました。
この時、vsrx01は"ST"ですがvsrx02側でVPLSコネクションを確認すると"UP"と表示されました。
admin@vsrx01# run show vpls connections
Layer-2 VPN connections:
Instance: VPLS1
VPLS-id: 1
Neighbor Type St Time last up # Up trans
1.1.1.2(vpls-id 1) rmt ST
その後、いろいろと設定をいじったりしましたが改善しませんでした。当初、vsrx01はJUNOSバージョンが12.xと古いバージョンだったので、vsrx02のインストーラで再デプロイして、まったく同じConfigを投入することで改善しました。
今回はここまで。