上次提到了Cisco Document中 帧中继 配置和故障处理指南(上)

根据上面的指南,我们可以轻松地搭建在帧中继网络环境,并在其中中配置OSPF。

总体来说,我们根据这个表格来完成一下实验。

ospf-nbma

一、RFC定义的NBMA网络环境

以下配置实验参考了红头发的方法,完全可以参考本文开始提到的指南进行FR环境搭建,冷博客也实验成功了。

image

拓扑图来自cisco document(改)

1.配置命令

Spicey

interface Serial0/0
ip address 17.1.1.1 255.255.255.0
encapsulation frame-relay
ip ospf 11 area 0
no arp frame-relay
frame-relay map ip 17.1.1.2 102 broadcast
frame-relay map ip 17.1.1.3 103 broadcast
no frame-relay inverse-arp

router ospf 11
neighbor 17.1.1.2
neighbor 17.1.1.3

*说明:这里没有显示配置命令:neighbor 17.1.1.2 priority 0 和 neighbor 17.1.1.3 priority 0
这样阻止两个Hub路由器选作DR

Praslt

interface Loopback0
ip address 2.2.2.2 255.255.255.255
ip ospf 111 area 1
!
interface Serial0/0
ip address 17.1.1.2 255.255.255.0
encapsulation frame-relay
ip ospf 111 area 1
no arp frame-relay
frame-relay map ip 17.1.1.1 201 broadcast
no frame-relay inverse-arp

router ospf 111
log-adjacency-changes
neighbor 17.1.1.1

Aton

interface Loopback0
ip address 3.3.3.3 255.255.255.255
ip ospf 1 area 0
!
interface Serial0/0
ip address 17.1.1.3 255.255.255.0
encapsulation frame-relay
ip ospf 1 area 0
no arp frame-relay
frame-relay map ip 17.1.1.1 301 broadcast
no frame-relay inverse-arp

router ospf 1
neighbor 172.1.1.1

2.测试与改进

Aton#sh ip ospf inter s 0/0
Serial0/0 is up, line protocol is up
Internet Address 17.1.1.3/24, Area 0
Process ID 1, Router ID 3.3.3.3, Network Type NON_BROADCAST, Cost: 64
….

这里端口类型默认为Non_broadcast,所以没有修改。

Aton#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface
17.1.1.1          1   FULL/DR         00:01:58    17.1.1.1        Serial0/0

可以看到spoke路由器为DR,并且FULL邻接状态。

Aton#sh ip route ospf
2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/65] via 17.1.1.2, 00:19:31, Serial0/0

可以学到来自Praslt的IA路由条目。

Aton#p 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
…..
Success rate is 0 percent (0/5)

ping不通,虽然有路由条目和出口,还需要做一个DLCI复用,参见:帧中继 配置和故障处理指南(上)

配置:

Praslt(config)#inter s 0/0
Praslt(config-if)#frame-relay map ip 17.1.1.3 201

Aton(config)#inter s 0/0
Aton(config-if)#frame-relay map ip 17.1.1.2 301

Aton#p 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 288/373/476 ms

二、RFC定义的P2M网络环境

网络拓扑参见第一部分。

1.配置命令

Spicey

interface Serial0/0
ip address 10.1.1.1 255.255.255.248
encapsulation frame-relay
ip ospf network point-to-multipoint
serial restart-delay 0
no arp frame-relay
frame-relay map ip 10.1.1.2 102 broadcast
frame-relay map ip 10.1.1.3 103 broadcast
no frame-relay inverse-arp

interface Serial0/0

ip address 10.1.1.1 255.255.255.248

encapsulation frame-relay

ip ospf network point-to-multipoint

no arp frame-relay

frame-relay map ip 10.1.1.2 102 broadcast

frame-relay map ip 10.1.1.3 103 broadcast

no frame-relay inverse-arp

router ospf 11

network 10.1.1.1 0.0.0.0 area 0

Praslt

interface Loopback0

ip address 2.2.2.2 255.255.255.255

!

interface Serial0/0

ip address 10.1.1.2 255.255.255.248

encapsulation frame-relay

ip ospf network point-to-multipoint

no arp frame-relay

frame-relay map ip 10.1.1.1 201 broadcast

no frame-relay inverse-arp

router ospf 11

network 2.2.2.2 0.0.0.0 area 1

network 10.1.1.2 0.0.0.0 area 0

*注意:做p2m的时候,两个spoke路由器无需做DLCI复用。

Aton

interface Serial0/0

no ip address

encapsulation frame-relay

no arp frame-relay

no frame-relay inverse-arp

!

interface Serial0/0.1 multipoint

ip address 10.1.1.3 255.255.255.248

frame-relay map ip 10.1.1.1 301

ip ospf network point-to-multipoint

*注意:没有修改网络类型,可以正常建立邻接关系,无法学习和发出路由条目。

2.测试

Spicey#sh ip ospf nei

Neighbor ID     Pri   State           Dead Time   Address         Interface

10.1.1.2          0   FULL/  -        00:01:46    10.1.1.2        Serial0/0

10.1.1.3          0   FULL/  -        00:01:46    10.1.1.3        Serial0/0

Spicey#sh ip route ospf

O IA    2.2.2.2 [110/65] via 10.1.1.2, 00:00:22, Serial0/0

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

O       10.1.1.2/32 [110/64] via 10.1.1.2, 00:00:22, Serial0/0

三、Cisco自有的NBMA P2M网络环境

这个和P2M非常类似,只不过由于是NBMA,要手动指定邻居neighbor,拓扑图和上两个也一样。
同样是无需DLCI复用。

1.配置命令

Spicey

interface Serial0/0

ip address 10.1.1.1 255.255.255.0

encapsulation frame-relay

ip ospf network point-to-multipoint non-broadcast

serial restart-delay 0

no arp frame-relay

frame-relay map ip 10.1.1.2 102 broadcast

frame-relay map ip 10.1.1.3 103 broadcast

no frame-relay inverse-arp

frame-relay lmi-type ansi

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

neighbor 10.1.1.3

neighbor 10.1.1.2

Praslt

interface Serial0/0

ip address 10.1.1.2 255.255.255.0

encapsulation frame-relay

ip ospf network point-to-multipoint non-broadcast

serial restart-delay 0

no arp frame-relay

frame-relay map ip 10.1.1.1 201 broadcast

no frame-relay inverse-arp

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

Aton

interface Serial0/0

ip address 10.1.1.3 255.255.255.0

encapsulation frame-relay

ip ospf network point-to-multipoint non-broadcast

serial restart-delay 0

no arp frame-relay

frame-relay map ip 10.1.1.1 301 broadcast

no frame-relay inverse-arp

frame-relay lmi-type ansi

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

2.测试

Spicey#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface

10.1.1.3          0   FULL/  -        00:01:56    10.1.1.3        Serial0/0

10.1.1.2          0   FULL/  -        00:01:56    10.1.1.2        Serial0/0

四、Cisco自有的P2P网络环境

ospf-nbma

拓扑图大概如上面,Aton只有s0,Praslt只有S0.1

1.配置命令

Spicey

interface Serial0/0

no ip address

encapsulation frame-relay

serial restart-delay 0

no arp frame-relay

no frame-relay inverse-arp

!

interface Serial0/0.1 point-to-point

ip address 10.1.1.1 255.255.255.0

frame-relay interface-dlci 102

!

interface Serial0/0.2 point-to-point

ip address 20.1.1.1 255.255.255.0

frame-relay interface-dlci 103

*注意:需要本地DLCI frame-relay interface-dlci 103  ,子接口继承物理接口属性。

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

Praslt

interface Serial0/0

no ip address

encapsulation frame-relay

no arp frame-relay

no frame-relay inverse-arp

!

interface Serial0/0.1 point-to-point

ip address 10.1.1.2 255.255.255.0

frame-relay interface-dlci 201

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

Aton

interface Serial0/0

ip address 20.1.1.2 255.255.255.0

encapsulation frame-relay

ip ospf network point-to-point

serial restart-delay 0

no arp frame-relay

frame-relay map ip 20.1.1.1 301 broadcast

no frame-relay inverse-arp

frame-relay lmi-type ansi

*注意:这里仍然要做DLCI映射,指定端口类型point-to-point

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

2.测试

Spicey#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface

20.1.1.2          0   FULL/  -        00:00:37    20.1.1.2        Serial0/0.2

10.1.1.2          0   FULL/  -        00:00:32    10.1.1.2        Serial0/0.1

Aton#sh ip route ospf

10.0.0.0/24 is subnetted, 1 subnets

O       10.1.1.0 [110/128] via 20.1.1.1, 00:01:35, Serial0/0

Aton#p 10.1.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 480/540/688 ms

五、Cisco自有的Broadcast网络环境

image

1.配置命令

Spicey

interface Serial0/0

ip address 10.1.1.1 255.255.255.0

encapsulation frame-relay

ip ospf network broadcast

ip ospf priority 255

no arp frame-relay

frame-relay map ip 10.1.1.2 102 broadcast

frame-relay map ip 10.1.1.3 103 broadcast

no frame-relay inverse-arp

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

Praslt

interface Serial0/0

ip address 10.1.1.2 255.255.255.0

encapsulation frame-relay

ip ospf network broadcast

no arp frame-relay

frame-relay map ip 10.1.1.1 201 broadcast

no frame-relay inverse-arp

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

Aton

interface Serial0/0

ip address 10.1.1.3 255.255.255.0

encapsulation frame-relay

ip ospf network broadcast

no arp frame-relay

frame-relay map ip 10.1.1.1 301 broadcast

no frame-relay inverse-arp

router ospf 11

network 0.0.0.0 255.255.255.255 area 0

2.测试

Spicey#sh ip route ospf

3.0.0.0/32 is subnetted, 1 subnets

O       3.3.3.3 [110/65] via 10.1.1.3, 00:05:49, Serial0/0

Spicey#sh ip os nei

Neighbor ID     Pri   State           Dead Time   Address         Interface

10.1.1.2          1   FULL/BDR        00:00:34    10.1.1.2        Serial0/0

20.1.1.2          1   EXSTART/DROTHER 00:00:35    10.1.1.3        Serial0/0

Spicey#p 3.3.3.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

!!!!!