DRの選出をせずにframe-relayフルメッシュ




条件
・R1,R2,R3,R4 間のframe-relay接続についてDR,BDR選出をせずにospfを作りなさい。
・neighborコマンドは使ってはいけない。


下記の状態からスタート。

R1
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface Serial1/0
 ip address 192.168.0.1 255.255.255.0
 frame-relay map ip 192.168.0.2 102
 frame-relay map ip 192.168.0.3 103
 frame-relay map ip 192.168.0.4 104
!
router ospf 1
 network 192.168.0.0 0.0.0.255 area 0
 network 1.1.1.1 0.0.0.0 area 0

R2
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Serial1/0
 ip address 192.168.0.2 255.255.255.0
 frame-relay map ip 192.168.0.1 201
 frame-relay map ip 192.168.0.3 203
 frame-relay map ip 192.168.0.4 204
!
router ospf 1
 network 192.168.0.0 0.0.0.255 area 0
 network 2.2.2.2 0.0.0.0 area 0

R3
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Serial1/0
 ip address 192.168.0.3 255.255.255.0
 frame-relay map ip 192.168.0.1 301
 frame-relay map ip 192.168.0.2 302
 frame-relay map ip 192.168.0.4 304
!
router ospf 1
 network 192.168.0.0 0.0.0.255 area 0
 network 1.1.1.1 0.0.0.0 area 0

R4
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Serial1/0
 ip address 192.168.0.4 255.255.255.0
 frame-relay map ip 192.168.0.1 401
 frame-relay map ip 192.168.0.2 402
 frame-relay map ip 192.168.0.3 403
!
router ospf 1
 network 192.168.0.0 0.0.0.255 area 0
 network 4.4.4.4 0.0.0.0 area 0

INCERSE ARP を使おうとしたが、なんかうまくいかなかったので、static map を設定してます。
下記、sh frame-relay map で対向が見えているのが確認できます。
(INVERSE ARPだと右のところが dynamic になります。)

R1#sh frame-relay
Serial1/0 (up): ip 192.168.0.2 dlci 102(0x66,0x1860), static,
              CISCO, status defined, active
Serial1/0 (up): ip 192.168.0.3 dlci 103(0x67,0x1870), static,
              CISCO, status defined, active
Serial1/0 (up): ip 192.168.0.4 dlci 104(0x68,0x1880), static,
              CISCO, status defined, active

ここで sh ip route をやってもOSPF経路が入ってきません。
sh ip ospf int を見ると encap frame-replay のインターフェースは
NON_BROADCAST になるみたいね。
NON_BROADCAST の場合、neighbor を設定しないとダメですよねー

R1#sh ip ospf int
Loopback0 is up, line protocol is up
  Internet Address 1.1.1.1/32, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub Host
Serial1/0 is up, line protocol is up
  Internet Address 192.168.0.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64
ということで、まずは問題分にさからって neighbor を設定してみます。

R1
router ospf 1
neighor 192.168.0.2
neighor 192.168.0.3
neighor 192.168.0.4

R2
router ospf 1
neighor 192.168.0.1
neighor 192.168.0.3
neighor 192.168.0.4

R3
router ospf 1
neighor 192.168.0.1
neighor 192.168.0.2
neighor 192.168.0.4

R4
router ospf 1
neighor 192.168.0.1
neighor 192.168.0.2
neighor 192.168.0.3

ってかんじですね。
これで下記のようにルートが入ってきました。

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 192.168.0.2, 00:28:17, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.168.0.3, 00:28:17, Serial1/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 192.168.0.4, 00:28:17, Serial1/0
C    192.168.0.0/24 is directly connected, Serial1/0

ですがー、今日はneighbor 使っちゃだめなので消します。。
今回の構成の場合、OSPF を確立させて方法としては、ネットワークタイプを
broadcast にする方法と、point-to-multipoint にする方法があると思います。
まず broadcast にする場合、

R1
int s1/0
ip ospf network broadcast
frame-relay map ip 192.168.0.2 102 broadcast
frame-relay map ip 192.168.0.3 103 broadcast
frame-relay map ip 192.168.0.4 104 broadcast

R2
int s1/0
ip ospf network broadcast
frame-relay map ip 192.168.0.1 201 broadcast
frame-relay map ip 192.168.0.3 203 broadcast
frame-relay map ip 192.168.0.4 204 broadcast

R3
int s1/0
ip ospf network broadcast
frame-relay map ip 192.168.0.1 301 broadcast
frame-relay map ip 192.168.0.2 302 broadcast
frame-relay map ip 192.168.0.4 304 broadcast

R4
int s1/0
ip ospf network broadcast
frame-relay map ip 192.168.0.1 401 broadcast
frame-relay map ip 192.168.0.2 402 broadcast
frame-relay map ip 192.168.0.4 404 broadcast

ospf network type をbroadcastにしたので、frame-relayの設定も
broadcast対応の設定にします。

R1#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DROTHER    00:00:39    192.168.0.2     Serial1/0
3.3.3.3           1   FULL/DROTHER    00:00:36    192.168.0.3     Serial1/0
4.4.4.4           1   FULL/DR         00:00:39    192.168.0.4     Serial1/0

R1#sh ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 192.168.0.2, 00:00:33, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.168.0.3, 00:00:33, Serial1/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 192.168.0.4, 00:00:33, Serial1/0
C    192.168.0.0/24 is directly connected, Serial1/0

これで、neighbor 使わずにOSPF経路を受け取れました。
ですが、DR選出が行われているのでこの問題の正解にはなりませんね。

ということで、最後に point-to-multipoint を設定してみますか。

R1
s1/0
ip ospf network point-to-multipoint

R2
s1/0
ip ospf network point-to-multipoint

R3
s1/0
ip ospf network point-to-multipoint

R4
s1/0
ip ospf network point-to-multipoint


R1#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   FULL/  -        00:01:49    192.168.0.4     Serial1/0
3.3.3.3           0   FULL/  -        00:01:38    192.168.0.3     Serial1/0
2.2.2.2           0   FULL/  -        00:01:37    192.168.0.2     Serial1/0

R1#sh ip route
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 192.168.0.2, 00:00:00, Serial1/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 192.168.0.3, 00:00:00, Serial1/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/65] via 192.168.0.4, 00:00:00, Serial1/0
     192.168.0.0/24 is variably subnetted, 4 subnets, 2 masks
C       192.168.0.0/24 is directly connected, Serial1/0
O       192.168.0.2/32 [110/64] via 192.168.0.2, 00:00:00, Serial1/0
O       192.168.0.3/32 [110/64] via 192.168.0.3, 00:00:00, Serial1/0
O       192.168.0.4/32 [110/64] via 192.168.0.4, 00:00:00, Serial1/0
これで、DR選出が行われずに neighbor もつかわずに OSPF 経路を受け取ることができました。