LAB1 2.1 virtual-link による迂回経路作成




条件
・R1が常にDRに選出されるようにしてください。
・R1-R2間にてOSPF通信をインターセプトさせないようにしてください。
・イーサネットセグメントは R1-R2間のframe-relayリンクがdownとなった場合だけ
 使用するようにしてください。
・backup interface コマンドは使用しないでください。
・ネットワークのdowntimeを少なくするため、R4-R5間のframe-relayのdownを
 一秒以内に検知できるようにしてください。


まず下記設定からスタートです。

R1
interface Serial1/0
ip add 192.168.0.1 255.255.255.0
encap frame-relay
frame-relay map ip 192.168.0.2 102 broadcast
frame-relay map ip 192.168.0.3 103 broadcast

interface F0/0
ip add 12.12.12.1 255.255.255.0

router ospf 1
net 192.168.0.0 0.0.0.255 area 0
net 12.12.12.0 0.0.0.255 area 12
neighbor 192.168.0.2
neighbor 192.168.0.3

R2
interface Serial1/0
ip add 192.168.0.2 255.255.255.0
encap frame-relay
frame-relay map ip 192.168.0.1 201 broadcast
frame-relay map ip 192.168.0.3 201 broadcast

interface F0/0
ip add 12.12.12.2 255.255.255.0

interface lo0
20.20.20.20 255.255.255.255

router ospf 1
net 192.168.0.0 0.0.0.255 area 0
net 12.12.12.0 0.0.0.255 area 12
net 20.20.20.20 0.0.0.0 area 12
neighbor 192.168.0.1

R3
interface Serial1/0
ip add 192.168.0.3 255.255.255.0
encap frame-relay
frame-relay map ip 192.168.0.1 201 broadcast
frame-relay map ip 192.168.0.3 201 broadcast

router ospf 1
net 192.168.0.0 0.0.0.255 area 0
neighbor 192.168.0.1


まず一問目の問題から。 ・R1が常にDRに選出されるようにしてください。

ハブアンドスポーク型のframe-relay のためOSPFを動かす場合ハブをDRにする必要があります。
設定は下記のとおり。

R1
int s1/0
ip ospf priority 200

R2
int s1/0
ip ospf priority 0

R3
int s1/0
ip ospf priority 0

数字は他のネイバーよりも値が高ければDRとして選出されます。
またゼロとすることでBDRにも選ばれず、DROTHERとなります。


R1#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
20.20.20.20       0   FULL/DROTHER    00:01:50    192.168.0.2     Serial1/0
192.168.0.3       0   FULL/DROTHER    00:01:49    192.168.0.3     Serial1/0
20.20.20.20       1   FULL/BDR        00:00:32    12.12.12.2      FastEthernet0/0

R1#sh ip ospf int
Serial1/0 is up, line protocol is up
  Internet Address 192.168.0.1/24, Area 0
  Process ID 1, Router ID 192.168.0.1, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 200
  Designated Router (ID) 192.168.0.1, Interface address 192.168.0.1

はい。二つ目の問題。 ・R1-R2間にてOSPF通信をインターセプトさせないようにしてください。
これは、OSPFの場合helloがマルチキャストで飛ぶので目的のネイバー以外にもパケットがとんでしまい
無駄なことをしてるのをやめましょ。という問題らしい。

ということで neighbor を設定すれば目的のネイバーだけにhelloがとびますねと。
今回は、non-broadcast のネットワークタイプで、すでにneighbor設定住みなので、オッケーです。

ちなみに debug ip ospf hello は下記なかんじです。


*Aug 23 23:09:18.463: OSPF: Rcv hello from 192.168.0.1 area 0 from Serial1/0 192.168.0.1
*Aug 23 23:09:18.467: OSPF: End of hello processing
*Aug 23 23:09:35.871: OSPF: Send hello to 192.168.0.1 area 0 on Serial1/0 from 192.168.0.3
*Aug 23 23:10:04.223: OSPF: Rcv hello from 192.168.0.1 area 0 from Serial1/0 192.168.0.1
*Aug 23 23:10:04.227: OSPF: End of hello processing
*Aug 23 23:10:05.875: OSPF: Send hello to 192.168.0.1 area 0 on Serial1/0 from 192.168.0.3

ユニキャストでhelloが飛んでいることがわかりますね。

はい。次の問題。
・イーサネットセグメントは R1-R2間のframe-relayリンクがdownとなった場合だけ
 使用するようにしてください。
・backup interface コマンドは使用しないでください。


この問題のキモはというと、R1-R2 間のframe-relayがとぎれると、R3が 20.20.20.20 と通信するには
R3 -Area0- R1 -Area12- R2 -Area20 というように Area 12 をまたがなければならなくなる。
OSPFの使用として Area 0 は他エリアと直接通信しないといけないので、Area12 はまたげなくなる。

そこでどうしましょう。。というと Virtual-link の出番となる。
Area 12 を virtual-link として Area 0 の扱いとし、Area 20 と Area 0 が直接通信できるようにする。

R1
router ospf 1
area 12 virtual-link 20.20.20.20

int f0/0
ip ospf cost 100

R2
router ospf 1
area 12 virtual-link 192.168.0.1

int f0/0
ip ospf cost 100


上記設定すると、下記のかんじで neighborがはられます。
costの設定は frame-relay リンクのコストより大きくなればオケー
sirial リンクなので 1.544kbps でコストは 64 でしたね。


R2#sh ip ospf nei
*Aug 23 23:18:42.403: %SYS-5-CONFIG_I: Configured from console by console

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.0.1       0   FULL/  -           -        12.12.12.1      OSPF_VL0
192.168.0.1     200   FULL/DR         00:01:53    192.168.0.1     Serial1/0
192.168.0.1       1   FULL/DR         00:00:36    12.12.12.1      FastEthernet0/0


正常時は、Serial link が経路をとります。

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O IA    20.20.20.20 [110/65] via 192.168.0.2, 00:00:06, Serial1/0
C    192.168.0.0/24 is directly connected, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0


で、R1-R2 のserialに障害が発生すると、イーサネットが経路になります。ちゃんとコストが101になってますね。

Gateway of last resort is not set

     20.0.0.0/32 is subnetted, 1 subnets
O IA    20.20.20.20 [110/101] via 12.12.12.2, 00:00:00, FastEthernet0/0
C    192.168.0.0/24 is directly connected, Serial1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0

最後の問題。 ・ネットワークのdowntimeを少なくするため、R1-R2間のframe-relayのdownを
 一秒以内に検知できるようにしてください。

とりあえず、コマンドは下記のとおり。

R1
int s1/0
ip ospf dead-interval minimal hello-multiplier 3

R2
int s1/0
ip ospf dead-interval minimal hello-multiplier 3

R3
int s1/0
ip ospf dead-interval minimal hello-multiplier 3

R1 の検地のためなので R1 だけ設定しないところですが、インターフェースに設定する
必要があり、ネイバーとのhelloとdead間隔が一致していないといけないので、R2,R3
にも設定してあげる必要がある。

コマンドの意味としては、minimal が最小単位で 1秒です。
hello-multiplier はdead間隔の間にhelloを何回とばすか。上記では、1秒の間に3回hello
をとばすことになります。

参考
http://www.cisco.com/cisco/web/support/JP/docs/ANS/WideAreaAppServs/CacheSW/CR/001/iro_fast_hello.html?bid=0900e4b182528cac
下記確認すると、 Hello が 333 msec dead が1秒になっていることがわかりますね。


R2#sh ip ospf int s1/0
Serial1/0 is up, line protocol is up
  Internet Address 192.168.0.2/24, Area 0
  Process ID 1, Router ID 20.20.20.20, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DROTHER, Priority 0
  No designated router on this network
  No backup designated router on this network
  Timer intervals configured, Hello 333 msec, Dead 1, Wait 1, Retransmit 5
    oob-resync timeout 40
    Hello due in 89 msec
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
R2#


更新日:2012年8月23日