本記事ではSRXのVRRP(認証設定)及び正常性方法についてご紹介させて頂きます。
>>参考記事: 「CCIEが語る!ネットワークエンジニアにオススメな本・参考書!」
>>参考記事: 「[まとめ] Juniper/Junosの検証結果を記事にまとめました!」
【Junos VRRP認証 検証】検証内容

まず最初に検証内容の以下にまとめました。
ネットワーク図
検証時のネットワーク環境は以下の通りです。

設定要件
以下の要件に基づきVRRPの設定を実施します。
- SRX-01とSRX-02のLANインターフェースでVRRPの認証設定を有効化する事
- 認証タイプはMD5,パスワードはjuniperで設定する事
- 外部IPアドレス(8.8.8.8)へのPingができる事
【Junos VRRP認証 検証】事前確認 ※飛ばしてOKです。

検証環境の事前設定値を以下に纏めております。
スキップしたい人は「4章:設定変更作業から」をクリックして下さい。
[br num=”1″]
※本検証前に予めVRRPの設定は実施済みです。
VRRPの設定に関する検証内容を確認したい人は、以下の記事をご確認下さい。
>>参考記事: 「SRX VRRP設定方法(vrrp-group, accept-data)を紹介」
では、検証前時点の各機器の設定内容やログは以下の通りです。
SRX-01 事前ログ
・「show configuration | display set | match」コマンドで設定情報を出力しております。
※以下の通り、VRRPの設定は実施済みです。
root@SRX-01> show configuration | display set | match ge-0/0/0 set security zones security-zone trust interfaces ge-0/0/0.0 set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.254/24 vrrp-group 1 virtual-address 192.168.100.252 set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.254/24 vrrp-group 1 priority 120 set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.254/24 vrrp-group 1 accept-data
SRX-02 事前ログ
・「show configuration | display set | match」コマンドで各設定情報を出力しております。
※以下の通り、VRRPの設定は実施済みです。
root@SRX-02> show configuration | display set | match ge-0/0/0 set security zones security-zone trust interfaces ge-0/0/0.0 set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.253/24 vrrp-group 1 virtual-address 192.168.100.252 set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.253/24 vrrp-group 1 priority 110 set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.253/24 vrrp-group 1 accept-data
[br num=”1″]
では、早速ですがVRRPの認証設定を実施してみましょう!
【Junos VRRP認証 検証】設定作業

では、VRRPの設定を進めてみましょう!
[br num=”1″]
VRRPは以下の順序で設定することが可能です。
- 「vrrp-group authentication-type」コマンドで認証タイプを設定
- 「vrrp-group authentication-key」コマンドでパスワードを設定
[br num=”1″]
それでは具体的な検証結果を交えて、紹介します!
手順1 : vrrp-group authentication-type で認証タイプを設定
それではSRX-01,SRX-02に対して、認証タイプ(MD5)の設定を実施してみましょう!
// SRX-01の設定 root@SRX-01> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.254/24 vrrp-group 1 authentication-type md5 // SRX-02の設定 root@SRX-02> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.253/24 vrrp-group 1 authentication-type md5
[br num=”1″]
双方の機器で認証タイプが異なっている場合、同じVRRPグループに所属する事ができません。
設定する際は気をつけましょうね!
[br num=”1″]
VRRPの認証タイプが異なる時の挙動やログは以下の記事で詳細を纏めております。
ご興味のある人はご確認下さい。
>>参考記事: 「VRRP誤設定時の挙動や検証ログを紹介」(現在作成中)
手順2 : vrrp-group authentication-key でパスワードを設定
次にSRX-01,SRX-02に対して、認証パスワード(juniper)の設定を実施してみましょう!
// SRX-01の設定 root@SRX-01> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.254/24 vrrp-group 1 authentication-key juniper // SRX-02の設定 root@SRX-02> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.253/24 vrrp-group 1 authentication-key juniper
[br num=”1″]
認証タイプと同様、双方の機器でパスワードが異なっている場合、同じVRRPグループに所属する事ができません。
設定する際は気をつけましょうね!
[br num=”1″]
VRRPのパスワードが異なる時の挙動やログは以下の記事で詳細を纏めております。
ご興味のある人はご確認下さい。
>>参考記事: 「VRRP誤設定時の挙動や検証ログを紹介」(現在作成中)
【Junos VRRP認証 検証】正常性確認

では、VRRPの正常確認してみましょう!
VRRP 正常性確認
まずは「show vrrp」「show vrrp interface」コマンドでVRRPのステータスを確認してみましょう!
[br num=”1″]
確認1 : show vrrpの確認結果
正常にSRX-01がVRRP Group 1/Masterルータに選定されていること、SRX-02がVRRP Group 1/Backupルータに選定されていることを確認しましょう!
// SRX-01の結果
root@SRX-01> show vrrp
Interface State Group VR state VR Mode Timer Type Address
ge-0/0/0.0 up 1 master Active A 0.675 lcl 192.168.100.254
vip 192.168.100.252
// SRX-02の結果
root@SRX-02> show vrrp
Interface State Group VR state VR Mode Timer Type Address
ge-0/0/0.0 up 1 backup Active D 3.460 lcl 192.168.100.253
vip 192.168.100.252
[br num=”1″]
確認2 : show vrrp interface ge-0/0/0の確認結果
次にSRX-01,SRX-02のVRRPインターフェース(ge-0/0/0)にて認証設定がされていること、認証エラーが発生していない事を確認しましょう!
[br num=”1″]
具体的な確認項目としてはshow vrrp interface ge-0/0/0の結果にて、「Authentication type」がMD5になっていること、「Group VRRP PDU error statistics」の認証関連のエラーカウントが増えていないこと(本検証では0であること)を確認しましょう!
// SRX-01の結果
root@SRX-01> show vrrp interface ge-0/0/0
Interface: ge-0/0/0.0, Interface index :68, Groups: 1, Active :1
Interface VRRP PDU statistics
Advertisement sent :13
Advertisement received :0
Packets received :0
No group match received :0
Interface VRRP PDU error statistics
Invalid IPAH next type received :0
Invalid VRRP TTL value received :0
Invalid VRRP version received :0
Invalid VRRP PDU type received :0
Invalid VRRP authentication type received:0
Invalid VRRP IP count received :0
Invalid VRRP checksum received :0
Physical interface: ge-0/0/0, Unit: 0, Address: 192.168.100.254/24
Index: 68, SNMP ifIndex: 523, VRRP-Traps: disabled, VRRP-Version: 2
Interface state: up, Group: 1, State: master, VRRP Mode: Active
Priority: 120, Advertisement interval: 1, Authentication type: md5 // ← md5であること
Advertisement threshold: 3, Computed send rate: 0
Preempt: yes, Accept-data mode: yes, VIP count: 1, VIP: 192.168.100.252
Advertisement Timer: 0.105s, Master router: 192.168.100.254
Virtual router uptime: 00:21:02, Master router uptime: 00:06:18
Virtual Mac: 00:00:5e:00:01:01
Preferred: yes
Tracking: disabled
Group VRRP PDU statistics
Advertisement sent :13
Advertisement received :0
Group VRRP PDU error statistics
Bad authentication Type received :0 // ← 0であること
Bad password received :0 // ← 0であること
Bad MD5 digest received :0 // ← 0であること
Bad advertisement timer received :0
Bad VIP count received :0
Bad VIPADDR received :0
Group state transition statistics
Idle to master transitions :0
Idle to backup transitions :0
Backup to master transitions :0
Master to backup transitions :0
// SRX-02の結果
root@SRX-02> show vrrp interface ge-0/0/0
Interface: ge-0/0/0.0, Interface index :74, Groups: 1, Active :1
Interface VRRP PDU statistics
Advertisement sent :0
Advertisement received :19
Packets received :19
No group match received :0
Interface VRRP PDU error statistics
Invalid IPAH next type received :0
Invalid VRRP TTL value received :0
Invalid VRRP version received :0
Invalid VRRP PDU type received :0
Invalid VRRP authentication type received:0
Invalid VRRP IP count received :0
Invalid VRRP checksum received :0
Physical interface: ge-0/0/0, Unit: 0, Address: 192.168.100.253/24
Index: 74, SNMP ifIndex: 518, VRRP-Traps: disabled, VRRP-Version: 2
Interface state: up, Group: 1, State: backup, VRRP Mode: Active
Priority: 110, Advertisement interval: 1, Authentication type: md5 // ← md5であること
Advertisement threshold: 3, Computed send rate: 0
Preempt: yes, Accept-data mode: yes, VIP count: 1, VIP: 192.168.100.252
Dead timer: 2.691s, Master priority: 120, Master router: 192.168.100.254
Virtual router uptime: 00:46:14
Preferred: yes
Tracking: disabled
Group VRRP PDU statistics
Advertisement sent :0
Advertisement received :19
Group VRRP PDU error statistics
Bad authentication Type received :0 // ← 0であること
Bad password received :0 // ← 0であること
Bad MD5 digest received :0 // ← 0であること
Bad advertisement timer received :0
Bad VIP count received :0
Bad VIPADDR received :0
Group state transition statistics
Idle to master transitions :0
Idle to backup transitions :0
Backup to master transitions :0
Master to backup transitions :0
[br num=”1″]
Authentication typeは「md5」であり「Group VRRP PDU error statistics」の認証関連のエラーカウントが「0」である事が分かりますね!
[br num=”1″]
上記の通り、ログの内容が長くて分かりにくいので、トラブルシューティング時など特定のフィールドのみを確認したい場合はfindオプションやMatchオプションを活用して必要な部分のみフィルターすることがおすすめです。
PCから外部IPアドレス(8.8.8.8)へ疎通確認
ではPCから「ping」コマンドで疎通性を確認しましょう!
無事成功しておりますね!
MacBook-Air:~ testuser$ ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes 64 bytes from 8.8.8.8: icmp_seq=0 ttl=64 time=3.668 ms 64 bytes from 8.8.8.8: icmp_seq=1 ttl=64 time=4.392 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=64 time=12.299 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=64 time=4.143 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=64 time=5.431 ms 64 bytes from 8.8.8.8: icmp_seq=5 ttl=64 time=12.170 ms
Junosの勉強方法

では最後にJunosの勉強方法について紹介いたします。
[br num=”1″]
Juniper機器は通信プロバイダーなどのミッションクリティカルが環境で多く導入されております。
[br num=”1″]
その為、Junosを勉強すると、大規模なネットワークへ関わるチャンスが増えます!
Junosの勉強は以下の参考書で勉強を進めましょう!!
[br num=”1″]
以下のアマゾンリンクから内容の詳細(価格/評価等)が確認出来ますので、ぜひ確認してみて下さいね!
まとめ

最後までお読み頂きましてありがとうございます。
[br num=”1″]
Juniperに関する記事は以下にまとめております。
ご興味のある方は是非ご覧ください。
>>参考記事: 「[まとめ] Juniper/Junosの検証結果を記事にまとめました!」
>>参考記事: 「業務で役立つshow、clear、requestコマンドを紹介!」





