ー PR : Udemy 今セール中かも! ー

Udemyではパーソナライズオファーという「あなただけ割引になるお得な制度」が不定期で開催しております!
気になる方は今すぐ「Udemy公式サイト」を確認しましょう!

SRX VRRP設定方法(vrrp-group, accept-data)を紹介【Junos, Juniper】

SRX VRRP設定方法(vrrp-group, accept-data)を紹介【Junos, Juniper】

本記事ではSRXのゲートウェイ冗長化技術である「VRRP」の設定及び正常性確認に関する検証結果をご紹介させて頂きます。

目次[閉じる]

【Junos VRRP 検証】検証内容


まず最初に検証内容の以下にまとめました。

ネットワーク図

検証時のネットワーク環境は以下の通りです。

設定要件

以下の要件に基づきVrrpの設定を実施します。

  • SRX01をMasterルータにする事
  • VIPは192.168.100.252で設定し、Ping応答ができる事

【Junos VRRP 検証】事前確認 ※飛ばしてOKです。


本検証ネットワークの各種ステータスを以下に纏めております。
スキップしたい人は「4章:設定変更作業から」をクリックして下さい。

検証前時点の各機器の設定内容やログは以下の通りです。

SRX-01 事前ログ

・「show configuration | display set | match」コマンドで各インターフェース情報を出力しております。

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 

SRX-02 事前ログ

・「show configuration | display set | match」コマンドで各インターフェース情報を出力しております。

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の設定を実施してみましょう!

【Junos VRRP 検証】設定変更作業


では、VRRPの設定を実施してみます。

VRRPを設定する場合は「vrrp-group」コマンドで実装可能です。

SRX-01 VRRP設定

SRX-01(Master)側にてVIPのIPアドレス(192.168.100.252)、VRRPプライオリティ(120)を設定します。
VRRPプライオリティ値が一番高い機器がVRRPのMasterルータに選定されます。
また、accept-dataオプションを有効化することにより、VIP(Virtual IP)へのPing応答を許可することが可能です。

root@SRX-01> 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
root@SRX-01> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.254/24 vrrp-group 1 priority 120
root@SRX-01> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.254/24 vrrp-group 1 accept-data

SRX-02 VRRP設定

SRX-02(Backup)側にてVIPのIPアドレス(192.168.100.252)、VRRPプライオリティ(110)を設定します。
尚、SRX-02のVRRPプライオリティ値(110)はSRX-01のVRRPプライオリティ値(120)より低い為、SRX-02はBackupルータに選定されます。

root@SRX-02> 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
root@SRX-02> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.253/24 vrrp-group 1 priority 110
root@SRX-02> set interfaces ge-0/0/0 unit 0 family inet address 192.168.100.253/24 vrrp-group 1 accept-data

【Junos VRRP 検証】正常性確認


では、VRRPの正常確認してみましょう!

SRX-01 VRRP 正常性確認

まずは「show vrrp」「show vrrp detail」コマンドで確認します。

また、VRRP Group 1、Masterルータに選定されていることを確認しましょう!

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

また、SRX-01がVRRPプライオリティが120が設定されている事を確認しましょう!
※デフォルトでバージョンは2、仮想Macアドレスは00:00:5e:00:01:xx(VRRP Group番号)です。

root@SRX-01> show vrrp detail   
Physical interface: ge-0/0/0, Unit: 0, Address: 192.168.100.254/24
  Index: 66, 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: none
  Advertisement threshold: 3, Computed send rate: 0
  Preempt: yes, Accept-data mode: yes, VIP count: 1, VIP: 192.168.100.252    
  Advertisement Timer: 0.359s, Master router: 192.168.100.254
  Virtual router uptime: 00:41:47, Master router uptime: 00:41:41
  Virtual Mac: 00:00:5e:00:01:01
  Preferred: yes 
  Tracking: disabled 

SRX-02 VRRP 正常性確認

まずは「show vrrp」「show vrrp detail」コマンドで確認します。

また、VRRP Group 1、Backupルータに選定されていることを確認しましょう!

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

また、SRX-02がVRRPプライオリティが110が設定されている事を確認しましょう!
※デフォルトでバージョンは2、仮想Macアドレスは00:00:5e:00:01:xx(VRRP Group番号)です。

root@SRX-02> show vrrp detail   
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: none
  Advertisement threshold: 3, Computed send rate: 0
  Preempt: yes, Accept-data mode: yes, VIP count: 1, VIP: 192.168.100.252    
  Dead timer: 3.120s, Master priority: 120, Master router: 192.168.100.254 
  Virtual router uptime: 00:42:51
  Preferred: yes 
  Tracking: disabled  

PCからの疎通確認

ではPCから「ping」「traceroute」コマンドで疎通性を確認しましょう!

VRRP デフォルトGW(192.168.100.252)への疎通性

ping, tracerouteともに成功することを確認しましょう!

MacBook-Air:~ testuser$ ping 192.168.100.252
PING 192.168.100.252 (192.168.100.252): 56 data bytes
64 bytes from 192.168.100.252: icmp_seq=0 ttl=64 time=0.629 ms
64 bytes from 192.168.100.252: icmp_seq=1 ttl=64 time=0.828 ms
64 bytes from 192.168.100.252: icmp_seq=2 ttl=64 time=0.931 ms
64 bytes from 192.168.100.252: icmp_seq=3 ttl=64 time=0.898 ms
64 bytes from 192.168.100.252: icmp_seq=4 ttl=64 time=0.883 ms

MacBook-Air:~ testuser$ traceroute 192.168.100.252
traceroute to 192.168.100.252 (192.168.100.252), 64 hops max, 52 byte packets
 1  192.168.100.252 (192.168.100.252)  1.802 ms  1.277 ms  1.301 ms

外部IPアドレス(8.8.8.8)への疎通性

ping, tracerouteともに成功することを確認しましょう!

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=7.543 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=64 time=12.501 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=64 time=6.024 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=64 time=10.668 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=64 time=8.353 ms

MacBook-Air:~ testuser$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
 1  192.168.100.254 (192.168.100.254)  0.920 ms  0.512 ms  0.426 ms
 2  8.8.8.8 (8.8.8.8)  11.570 ms  9.666 ms  9.816 ms

Junosの勉強方法


Juniper機器は通信プロバイダーなどのミッションクリティカルが環境で多く導入されております。

その為、Junosを勉強すると、大規模なネットワークへ関わるチャンスが増えます!
Junosの勉強は以下の参考書で勉強を進めましょう!!

以下のアマゾンリンクから内容の詳細(価格/評価等)が確認出来ますので、ぜひ確認してみて下さいね!


まとめ


最後までお読み頂きましてありがとうございます。

Juniperに関する記事は以下にまとめております。
ご興味のある方は是非ご覧ください。

この記事をシェアする

記事一覧へ戻る

関連記事 Relation Entry