このブログを検索

ラベル portfast の投稿を表示しています。 すべての投稿を表示
ラベル portfast の投稿を表示しています。 すべての投稿を表示

2012/02/03

ループガード

loopガード。bpduが途絶えると検知する。
cata1#sho run interface fastEthernet 0/3
Building configuration...

Current configuration : 134 bytes
!
interface FastEthernet0/3
switchport access vlan 10
switchport mode access
spanning-tree portfast
spanning-tree guard loop
end

cata1#
02:48:31: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
02:48:32: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down
02:48:35: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
02:48:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up



cata1#sho spanning-tree

VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 10
Address 0016.9da0.4ec0
Cost 19
Port 3 (FastEthernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 000f.90b3.b380
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Back BLK 19 128.2 P2p
Fa0/3 Root FWD 19 128.3 P2p




Cata2950_2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Cata2950_2(config)#no spanning-tree vlan 10
Cata2950_2(config)#end




cata1#sho spanning-tree

VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 10
Address 0016.9da0.4ec0
Cost 19
Port 3 (FastEthernet0/3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 000f.90b3.b380
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Back BLK 19 128.2 P2p
Fa0/3 Desg BKN*19 128.3 P2p *LOOP_Inc

cata1#
02:49:47: %SPANTREE-2-LOOPGUARD_BLOCK: Loop guard blocking port FastEthernet0/3 on VLAN0010.
cata1#sho spanning-tree

VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 32778
Address 000f.90b3.b380
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 000f.90b3.b380
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Back BLK 19 128.2 P2p
Fa0/3 Desg BKN*19 128.3 P2p *LOOP_Inc

cata1#
cata1#sho spanning-tree interface fastEthernet 0/3 detail
Port 3 (FastEthernet0/3) of VLAN0010 is broken (Loop Inconsistent)
Port path cost 19, Port priority 128, Port Identifier 128.3.
Designated root has priority 32778, address 000f.90b3.b380
Designated bridge has priority 32778, address 000f.90b3.b380
Designated port id is 128.3, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is point-to-point by default
Loop guard is enabled on the port
BPDU: sent 2, received 28
cata1#



cata1#show spanning-tree inconsistentports


Name Interface Inconsistency
-------------------- ---------------------- ------------------
VLAN0010 FastEthernet0/3 Loop Inconsistent

Number of inconsistent ports (segments) in the system : 1
「portfastとループガードは同時に設定できない」と、黒本に書いてあり、ciscoのサイトにもそういう記述があったけど、 設定できるぜぇ?
cata1#sho spanning-tree interface fastEthernet 0/3 detail

 Port 3 (FastEthernet0/3) of VLAN0010 is forwarding
   Port path cost 19, Port priority 128, Port Identifier 128.3.
   Designated root has priority 16394, address 000b.fdb9.a680
   Designated bridge has priority 32778, address 000f.90b3.b380
   Designated port id is 128.3, designated path cost 19
   Timers: message age 0, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   The port is in the portfast mode
   Link type is point-to-point by default
   Loop guard is enabled on the port
   BPDU: sent 250, received 0
cata1#

ね?

BPDUガード

portfastを設定したポートにスイッチをつないでループが発生する状況を作ろうと思ったが、どうしてもできない。

ループが発生するのは2つのスイッチで両方spanning treeを無効にした場合だけである。
2つのスイッチのvlan 10に所属する二つのポートをそれぞれportfastに設定して2本のケーブルでつないだら、 全部FWDになってループが発生すると思ったのだが、ちゃんと一個がBLKになる。どうしてだろう・・・?

portfastを設定したことによってループが発生することになる例が思いつかない。

基本的なところから確認していこう。 まず、STPに対応していないL2スイッチを、ループが発生するようなトポロジで、つまり、2本のケーブルで同じセグメントを接続してみたらどうなるか。

1本目のケーブルを接続すると、LIS, LRNを経てFWDになる。 2本目を接続すると、即時BLKとなる。 この、2本目を接続するポートをportfastにしたらループが発生しそうだ。 

やってみよう。 ・・・が、ポートはやはり即時BLKとなる。

Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Back BLK 19 128.2 P2p


fa0/1,0/2をともにportfastに設定してSTPに対応していないスイッチングハブに接続したが、ひとつがBLKになり、 ループは発生しない。これでループが発生しないなら問題ないでしょ・・・・

でも、どうして両方portfastにしても片方がBLKになるんだろう? STP未対応のスイッチングハブでも、BPDUは転送するから、ひとつのポートから送信されたBPDUをもう一方で受信することでBLKになるのか。

http://www.cisco.com/cisco/web/support/JP/100/1007/1007812_65-j.html

どうやら、portfastを設定することによりループが発生することにはならないようだ。 portfastを設定することによって問題となる可能性のあるのは、そのポートにL2スイッチを接続してそれがルートになることにより、トポロジに予期しない変化が発生することのようだ。

そこで、bpduguardを設定する。これはグローバルに設定する。 bpduguardを設定した状態で、portfastを設定したポートにSTP対応スイッチを接続すると、 リンクアップするがすぐにerrdisableになる。

cata1(config)#spanning-tree portfast ?
bpdufilter Enable portfast bdpu filter on this switch
bpduguard Enable portfast bpdu guard on this switch
default Enable portfast by default on all access ports

cata1(config)#spanning-tree portfast bpduguard
cata1(config)#end
cata1#
02:19:08: %SYS-5-CONFIG_I: Configured from console by console
cata1#sho spanning-tree



VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 32778
Address 000f.90b3.b380
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 000f.90b3.b380
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Back BLK 19 128.2 P2p





cata1#
02:19:30: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to up
02:19:30: %SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port FastEthernet0/3 with BPDU Guard enabled. Disabling port.
02:19:30: %PM-4-ERR_DISABLE: bpduguard error detected on Fa0/3, putting Fa0/3 in err-disable state
02:19:32: %LINK-3-UPDOWN: Interface FastEthernet0/3, changed state to down
cata1#
cata1#sho spanning-tree

VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 32778
Address 000f.90b3.b380
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 000f.90b3.b380
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Back BLK 19 128.2 P2p


bpduguardの意味が、やっとわかった。

2008/02/09

HSRPとportfastの実験

 2514_1       2514_2
  |.101        |.102
  |            |
  |   (.100)   |
  |            |
  |   ------   |
  +---+ SW +---+
      ------
        |      192.168.1.0/24
    pc

2514_1
priority:100 (default)
preemptあり

2514_2
priority:90
preemptなし



この状態から 2514_1をダウンさせる。
2514_2#debug standby events
HSRP Events debugging is on
2514_2#
2514_1がリンクダウン
2514_2#
00:13:15: SB1: Et0 Standby: c/Active timer expired (192.168.1.101)
00:13:15: SB1: Et0 Active router is local, was 192.168.1.101
00:13:15: SB: Et0 Remove active hash 192.168.1.101 (vIP 192.168.1.100)
00:13:15: SB: Et0 Add passive hash 192.168.1.101
00:13:15: SB: Et0 Add active hash 192.168.1.102 (vIP 192.168.1.100)
00:13:15: SB1: Et0 Standby router is unknown, was local
00:13:15: SB1: Et0 Standby - Active
00:13:15: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Standby -> Active
00:13:15: SB1: Et0 Redundancy "hsrp-Et0-1" state Standby -> Active
00:13:15: SB: Et0 Redirect adv stop
00:13:15: SB1: Et0 Changing interface MAC address to 0000.0c07.ac01
2514_2#
2514_2#sho standby
Ethernet0 - Group 1
Local state is Active, priority 90
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.140
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is unknown
Virtual mac address is 0000.0c07.ac01
8 state changes, last state change 00:00:19
IP redundancy name is "hsrp-Et0-1" (default)
2514_2がactiveになった。

ここで2514_1がリンクアップすると、

2514_2#
00:14:14: SB1: Et0 Active: j/Coup rcvd from higher pri router (100/192.168.1.101)
00:14:14: SB1: Et0 Active router is 192.168.1.101, was local
00:14:14: SB: Et0 Remove active hash 192.168.1.102 (vIP 192.168.1.100)
00:14:14: SB: Et0 Remove passive hash 192.168.1.101 (frc 0)
00:14:14: SB: Et0 Add active hash 192.168.1.101 (vIP 192.168.1.100)
00:14:14: SB1: Et0 Active -> Speak
00:14:14: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Active -> Speak
00:14:14: SB1: Et0 Redundancy "hsrp-Et0-1" state Active -> Speak
00:14:14: SB: Et0 Redirect adv start
00:14:24: SB1: Et0 Speak: d/Standby timer expired (unknown)
00:14:24: SB1: Et0 Standby router is local
00:14:24: SB1: Et0 Speak -> Standby
00:14:24: SB1: Et0 Redundancy "hsrp-Et0-1" state Speak -> Standby
priorityが高い2514_1が現れ、preemptが設定されているため、
2514_1がactiveになり、2514_2はstandbyになる。

2514_1#sho standby
Ethernet0 - Group 1
Local state is Active, priority 100, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 0.044
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is 192.168.1.102, priority 90 expires in 8.620
Virtual mac address is 0000.0c07.ac01
11 state changes, last state change 00:02:53
IP redundancy name is "hsrp-Et0-1" (default)
2514_2#sho standby
Ethernet0 - Group 1
Local state is Standby, priority 90
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 2.064
Virtual IP address is 192.168.1.100 configured
Active router is 192.168.1.101, priority 100 expires in 7.828
Standby router is local
10 state changes, last state change 00:00:12
IP redundancy name is "hsrp-Et0-1" (default)
2台のルータのhsrpのconfigは以下のとおり。
2514_1#sho run
Building configuration...

!
interface Ethernet0
ip address 192.168.1.101 255.255.255.0
standby 1 ip 192.168.1.100
standby 1 preempt
!

2514_2#sho run
Building configuration...

interface Ethernet0
ip address 192.168.1.102 255.255.255.0
standby 1 ip 192.168.1.100
standby 1 priority 90
!
2をdownさせるとstandbyがいなくなるだけで、1はactiveのまま。

2514_2をupさせると、preemptが設定されてはいるが、1のほうがpriorityが高いのでやはり1がactiveのまま。

2514_2がup
2514_1#
00:40:46: SB1: Et0 Hello in 192.168.1.102 Active pri 90 ip 192.168.1.100
00:40:46: SB1: Et0 Active: h/Hello rcvd from lower pri Active router (90/192.168.1.102)
00:40:49: SB1: Et0 Redundancy group hsrp-Et0-1 state Active -> Active
00:40:52: SB1: Et0 Redundancy group hsrp-Et0-1 state Active -> Active
00:40:56: SB1: Et0 Standby router is 192.168.1.102
2514_1#
2514_1#sho standby
Ethernet0 - Group 1
Local state is Active, priority 100
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 2.498
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is 192.168.1.102, priority 90 expires in 7.912
Virtual mac address is 0000.0c07.ac01
14 state changes, last state change 00:02:59
IP redundancy name is "hsrp-Et0-1" (default)
ではここから1をdown&upさせたらどうなるか。
1がdownすると当然2がactiveになるが、1をupさせるとpriorityの高い1がactiveになった。
1にはpreemptを設定していないのに・・・・
2514_2#
00:41:49: SB1: Et0 Standby: c/Active timer expired (192.168.1.101)
00:41:49: SB1: Et0 Active router is local, was 192.168.1.101
00:41:49: SB: Et0 Remove active hash 192.168.1.101 (vIP 192.168.1.100)
00:41:49: SB: Et0 Add passive hash 192.168.1.101
00:41:49: SB: Et0 Add active hash 192.168.1.102 (vIP 192.168.1.100)
00:41:49: SB1: Et0 Standby router is unknown, was local
00:41:49: SB1: Et0 Standby -> Active
00:41:49: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Standby -> Active
00:41:49: SB1: Et0 Redundancy "hsrp-Et0-1" state Standby -> Active
00:41:49: SB: Et0 Redirect adv stop
00:41:49: SB1: Et0 Changing interface MAC address to 0000.0c07.ac01
2514_2#
2514_2#sho stand
Ethernet0 - Group 1
Local state is Active, priority 90, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.584
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is unknown
Virtual mac address is 0000.0c07.ac01
26 state changes, last state change 00:00:33
IP redundancy name is "hsrp-Et0-1" (default)
2514_1がup

2514_1#
00:43:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to up
00:43:31: SB: Et0 Interface up
00:43:31: SB: Et0 Starting minimum interface delay (1 secs)
00:43:32: SB: Et0 Interface min delay expired
00:43:32: SB1: Et0 Init: a/HSRP enabled
00:43:32: SB1: Et0 Init -> Listen
00:43:32: SB1: Et0 Redundancy "hsrp-Et0-1" state Init -> Backup
00:43:32: SB: Et0 Redirect adv start
00:43:42: SB1: Et0 Listen: c/Active timer expired (unknown)
00:43:42: SB1: Et0 Listen -> Speak
00:43:42: SB1: Et0 Redundancy "hsrp-Et0-1" state Backup -> Speak
00:43:52: SB1: Et0 Speak: d/Standby timer expired (unknown)
00:43:52: SB1: Et0 Standby router is local
00:43:52: SB1: Et0 Speak -> Standby
00:43:52: SB1: Et0 Redundancy "hsrp-Et0-1" state Speak -> Standby
00:43:52: SB1: Et0 Standby: c/Active timer expired (unknown)
00:43:52: SB1: Et0 Active router is local
00:43:52: SB: Et0 Add active hash 192.168.1.101 (vIP 192.168.1.100)
00:43:52: SB1: Et0 Standby router is unknown, was local
00:43:52: SB1: Et0 Standby -> Active
00:43:52: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Standby -> Active
00:43:52: SB1: Et0 Redundancy "hsrp-Et0-1" state Standby -> Active
00:43:52: SB: Et0 Redirect adv stop
00:43:52: SB1: Et0 Changing interface MAC address to 0000.0c07.ac01
00:43:58: SB1: Et0 Hello in 192.168.1.102 Active pri 90 ip 192.168.1.100
00:43:58: SB1: Et0 Active: h/Hello rcvd from lower pri Active router (90/192.168.1.102)
00:44:01: SB1: Et0 Redundancy group hsrp-Et0-1 state Active -> Active
00:44:04: SB1: Et0 Redundancy group hsrp-Et0-1 state Active -> Active
00:44:08: SB1: Et0 Standby router is 192.168.1.102
2514_1#2514_1#sho standby
Ethernet0 - Group 1
Local state is Active, priority 100
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.010
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is 192.168.1.102, priority 90 expires in 9.536
Virtual mac address is 0000.0c07.ac01
17 state changes, last state change 00:00:22
IP redundancy name is "hsrp-Et0-1" (default)
では、両方preemptを消して見よう。
こうすると1を down upさせても 2がactiveのままになるはず。

2514_1がdown
2514_2#debug stand eve
HSRP Events debugging is on

01:00:31: SB1: Et0 Standby: c/Active timer expired (192.168.1.101)
01:00:31: SB1: Et0 Active router is local, was 192.168.1.101
01:00:31: SB: Et0 Remove active hash 192.168.1.101 (vIP 192.168.1.100)
01:00:31: SB: Et0 Add passive hash 192.168.1.101
01:00:31: SB: Et0 Add active hash 192.168.1.102 (vIP 192.168.1.100)
01:00:31: SB1: Et0 Standby router is unknown, was local
01:00:31: SB1: Et0 Standby -> Active
01:00:31: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Standby -> Active
01:00:31: SB1: Et0 Redundancy "hsrp-Et0-1" state Standby -> Active
01:00:31: SB: Et0 Redirect adv stop
01:00:31: SB1: Et0 Changing interface MAC address to 0000.0c07.ac01
2514_2#
2514_2#sho stand
Ethernet0 - Group 1
Local state is Active, priority 90
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 0.396
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is unknown
Virtual mac address is 0000.0c07.ac01
34 state changes, last state change 00:00:14
IP redundancy name is "hsrp-Et0-1" (default)
2514_1がup
2514_2#
01:01:26: SB1: Et0 Active: j/Coup rcvd from higher pri router (100/192.168.1.101)
01:01:26: SB1: Et0 Active router is 192.168.1.101, was local
01:01:26: SB: Et0 Remove active hash 192.168.1.102 (vIP 192.168.1.100)
01:01:26: SB: Et0 Remove passive hash 192.168.1.101 (frc 0)
01:01:26: SB: Et0 Add active hash 192.168.1.101 (vIP 192.168.1.100)
01:01:26: SB1: Et0 Active -> Speak
01:01:26: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Active -> Speak
01:01:26: SB1: Et0 Redundancy "hsrp-Et0-1" state Active -> Speak
01:01:26: SB: Et0 Redirect adv start
01:01:36: SB1: Et0 Speak: d/Standby timer expired (unknown)
01:01:36: SB1: Et0 Standby router is local
01:01:36: SB1: Et0 Speak -> Standby
01:01:36: SB1: Et0 Redundancy "hsrp-Et0-1" state Speak -> Standby
2514_2#
2514_2#sho stand
Ethernet0 - Group 1
Local state is Standby, priority 90
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 1.296
Virtual IP address is 192.168.1.100 configured
Active router is 192.168.1.101, priority 100 expires in 7.560
Standby router is local
36 state changes, last state change 00:01:08
IP redundancy name is "hsrp-Et0-1" (default)
あれ、おかしいな、1がactiveになった・・・

これは、2台のルータを接続しているcatalystのポートがデフォルト設定のままのため、link upまでに30秒かかっていることが原因と思われる。portfastを設定して即時リンクアップするようにしたら1が復帰しても2がactiveのままになった。

では、portfastを設定した状態で、priorityの低い2だけにpreemptを設定した場合をもう一度やってみる。

まず、1:active, 2:standyで、1をdown upさせた場合。
2514_2#sho stand
Ethernet0 - Group 1
Local state is Standby, priority 90, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 0.750
Virtual IP address is 192.168.1.100 configured
Active router is 192.168.1.101, priority 100 expires in 9.340
Standby router is local
10 state changes, last state change 00:00:13
IP redundancy name is "hsrp-Et0-1" (default)
2514_1がDOWN
2514_2#
00:16:35: SB1: Et0 Standby: c/Active timer expired (192.168.1.101)
00:16:35: SB1: Et0 Active router is local, was 192.168.1.101
00:16:35: SB: Et0 Remove active hash 192.168.1.101 (vIP 192.168.1.100)
00:16:35: SB: Et0 Add passive hash 192.168.1.101
00:16:35: SB: Et0 Add active hash 192.168.1.102 (vIP 192.168.1.100)
00:16:35: SB1: Et0 Standby router is unknown, was local
00:16:35: SB1: Et0 Standby -> Active
00:16:35: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Standby -> Active
00:16:35: SB1: Et0 Redundancy "hsrp-Et0-1" state Standby -> Active
00:16:35: SB: Et0 Redirect adv stop
00:16:35: SB1: Et0 Changing interface MAC address to 0000.0c07.ac01
2514_2#
2514_2#sho stand
Ethernet0 - Group 1
Local state is Active, priority 90, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 2.712
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is unknown
Virtual mac address is 0000.0c07.ac01
11 state changes, last state change 00:00:09
IP redundancy name is "hsrp-Et0-1" (default)
2514_1がup
2514_2#sho stand
Ethernet0 - Group 1
Local state is Active, priority 90, may preempt
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 2.684
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is 192.168.1.101, priority 100 expires in 9.036
Virtual mac address is 0000.0c07.ac01
11 state changes, last state change 00:00:55
IP redundancy name is "hsrp-Et0-1" (default)
1のほうがpriorityが高いが、preemptを設定していないので、2がactiveのままとなる。

では、preemptを設定した2をdown upさせる。

2514_2がdown
2514_2#
00:17:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0, changed state to down
00:17:53: SB: Et0 Interface down
00:17:53: SB1: Et0 Active: b/HSRP disabled
00:17:53: SB1: Et0 Active router is unknown, was local
00:17:53: SB: Et0 Remove active hash 192.168.1.102 (vIP 192.168.1.100)
00:17:54: SB1: Et0 Standby router is unknown, was 192.168.1.101
00:17:54: SB1: Et0 Active -> Init
00:17:54: %STANDBY-6-STATECHANGE: Ethernet0 Group 1 state Active -> Init
00:17:54: SB1: Et0 Redundancy "hsrp-Et0-1" state Active -> Init
2514_2#
2514_2#sho standby
Ethernet0 - Group 1
Local state is Init (interface down), priority 90, may preempt
Hellotime 3 sec, holdtime 10 sec
Virtual IP address is 192.168.1.100 configured
Active router is unknown
Standby router is unknown
12 state changes, last state change 00:00:06
IP redundancy name is "hsrp-Et0-1" (default)
2514_2#


2514_1#debug stand eve
HSRP Events debugging is on
2514_1#2514_1#sho stand
Ethernet0 - Group 1
Local state is Active, priority 100
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 0.096
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is unknown
Virtual mac address is 0000.0c07.ac01
14 state changes, last state change 00:00:43
IP redundancy name is "hsrp-Et0-1" (default)
2514_2がup
2514_1#2514_1#sho stand
Ethernet0 - Group 1
Local state is Active, priority 100
Hellotime 3 sec, holdtime 10 sec
Next hello sent in 0.038
Virtual IP address is 192.168.1.100 configured
Active router is local
Standby router is 192.168.1.102, priority 90 expires in 8.944
Virtual mac address is 0000.0c07.ac01
14 state changes, last state change 00:01:27
IP redundancy name is "hsrp-Et0-1" (default)
00:19:18: SB1: Et0 Standby router is 192.168.1.102
2にはpreemptを設定してあるが、priorityが1より低いため、その機能は有効にならない。

HSRPはRFC2281、VRRPはRFC2338で定義(?)されている。
しかし2281はCategory: informationalで、2338は Proposal Standardである。
HSRPはcisco独自の規格であり、VRRPは汎用化されたためにそうなっているようであるが、
VRRPはHSRPを元に作られたようで、動きもそっくりなようだ。

・・・

やっぱり実際に設定して動かして見ないとわかんないね。
portfastとのカラミでおかしなことになるのもいい勉強になった。