カテゴリ:

前回のHSRPを続いてVRRP(Virtual Router Redundancy Protocol)の設定を行います。R1, R2, R4はそれぞれF0/0で124.124.124.0/24のネットワークで接続されています。R1はR3にシリアルケーブルで直結(13.13.13.0/24)、R2もR3にシリアルケーブルで直結(23.23.23.0/24)しています。

R1(config)#do sh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            124.124.124.1   YES manual up                    up
Serial1/2                  13.13.13.1      YES manual up                    up
Loopback0                  17.17.1.1       YES NVRAM  up                    up

R2(config)#do sh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            124.124.124.2   YES manual up                    up
Serial1/2                  23.23.23.2      YES manual up                    up
Loopback0                  17.17.2.2       YES NVRAM  up                    up

R3(config)#do sh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
Serial1/2                  13.13.13.3      YES manual up                    up
Serial1/3                  23.23.23.3      YES manual up                    up
Loopback0                  17.17.3.3       YES NVRAM  up                    up

R4(config)#do sh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            124.124.124.4   YES manual up                    up
Loopback0                  17.17.4.4       YES NVRAM  up                    up

R1, R2, R3では全てのインターフェースでEIGRPを有効にします。

R3(config)#router ei 100
R3(config-router)#no au
R3(config-router)#net 0.0.0.0
R3(config)#do sh ip rou ei
     17.0.0.0/24 is subnetted, 3 subnets
D       17.17.1.0 [90/2297856] via 13.13.13.1, 00:07:11, Serial1/2
D       17.17.2.0 [90/2297856] via 23.23.23.2, 00:07:11, Serial1/3
     124.0.0.0/24 is subnetted, 1 subnets
D       124.124.124.0 [90/2172416] via 23.23.23.2, 00:07:11, Serial1/3
                      [90/2172416] via 13.13.13.1, 00:07:11, Serial1/2

R1とR2のF0/0にVRRPを設定します。vrrpコマンドを利用して設定しますが、ここではグループ番号を124としています。また割り当てる仮想のIPアドレスは124.124.124.254とします。R1を優先的に利用するためプライオリティを110としました(指定しない場合は100)。

R1(config-router)#int f0/0
R1(config-if)#vrrp ?
  <1-255>  Group number

R1(config-if)#vrrp 124 ?
  authentication  Authentication
  description     Group specific description
  ip              Enable Virtual Router Redundancy Protocol (VRRP) for IP
  preempt         Enable preemption of lower priority Master
  priority        Priority of this VRRP group
  shutdown        Disable VRRP Configuration
  timers          Set the VRRP timers
  track           Event Tracking

R1(config-if)#vrrp 124 ip 124.124.124.254
R1(config-if)#vrrp 124 priority 110
R1(config-if)#do sh vrrp

R2(config-router)#int f0/0
R2(config-if)#vrr
R2(config-if)#vrrp 124 ip 124.124.124.254

設定を確認します。R1がMasterとなり、有効であることが分かります。

FastEthernet0/0 - Group 124
  State is Master 
  Virtual IP address is 124.124.124.254
  Virtual MAC address is 0000.5e00.017c
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 110
  Master Router is 124.124.124.1 (local), priority is 110
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.570 sec

R2(config-if)#do sh vrrp
FastEthernet0/0 - Group 124
  State is Backup 
  Virtual IP address is 124.124.124.254
  Virtual MAC address is 0000.5e00.017c
  Advertisement interval is 1.000 sec
  Preemption enabled
  Priority is 100
  Master Router is 124.124.124.1, priority is 110
  Master Advertisement interval is 1.000 sec
  Master Down interval is 3.609 sec (expires in 2.905 sec)

R4より124.124.124.254へのpingが実行できることを確認しています。

R4(config)#do pin 124.124.124.254

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 124.124.124.254, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 4/13/36 ms
R4(config)#do sh ip arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  124.124.124.254         0   0000.5e00.017c  ARPA   FastEthernet0/0

R4にデフォルトゲートウェイを124.124.124.254で設定します。

R4(config)#ip route 0.0.0.0 0.0.0.0 124.124.124.254
R4(config)#do sh ip rou sta
S*   0.0.0.0/0 [1/0] via 124.124.124.254

設定後、R3へのLo0へpingが実行できることが分かり、tracerouteコマンドでR1を経由していることも確認できます。

R4(config)#do trace 17.17.3.3

Type escape sequence to abort.
Tracing the route to 17.17.3.3

  1 124.124.124.1 4 msec 8 msec 8 msec
  2 13.13.13.3 16 msec *  24 msec

ここでR2でデバグを有効し、R1のF0/0をシャットします。

R2(config)#do deb vrrp
VRRP debugging is on

Nov 15 06:10:37.339: VRRP: Grp 124 Advertisement priority 0, ipaddr 124.124.124.1
Nov 15 06:10:37.343: VRRP: Grp 124 Event - Advert priority 0
Nov 15 06:10:37.959: VRRP: Grp 124 Event - Master down timer expired
Nov 15 06:10:37.963: %VRRP-6-STATECHANGE: Fa0/0 Grp 124 state Backup -> Master

R1のF0/0が使用不可能になると自動的にR2のF0/0を経由することがtracerouteコマンドで確認出来ます。

R4(config)#do trace 17.17.3.3

Type escape sequence to abort.
Tracing the route to 17.17.3.3

  1 124.124.124.2 8 msec 12 msec 4 msec
  2 23.23.23.3 8 msec *  16 msec