OSPF对端网络类型不一致
拓扑就是三台路由器,中间一台模拟为一台FR,两边R1和R3各配一个换回口,我准备是想抓个包看看的,结果在将R1连FR的s1/1上更改为p2mp后,发现ospf邻接关系可以full(也就是说一边是p2mp,一边是nbma),但是路由表中没有对端换回口的路由,用sh ip os da发现数据库中有邻居发来的关于它换回口的LSA,但是为什么不装进路由表呢?有哪位大侠可以为小弟解决一下?? 本帖最后由 紫川凌 于 2012-4-10 13:05 编辑建议楼主把show run 和 show ip ospf da 信息发上来看看
我自己敲了一下,OSPF邻居能建立,但是没有环回接口信息。抓包也没有发现有关于环回口的LAS信息。
R1#show run
Building configuration...
Current configuration : 1095 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 11.11.11.11 255.255.255.0
!
interface Serial0/0
ip address 13.13.13.1 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
no arp frame-relay
frame-relay map ip 13.13.13.3 102 broadcast
no frame-relay inverse-arp
frame-relay lmi-type ansi
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 11.11.11.11 0.0.0.0 area 0
network 13.13.13.1 0.0.0.0 area 0
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R3#show run int s0/0
Building configuration...
Current configuration : 272 bytes
!
interface Serial0/0
ip address 13.13.13.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
serial restart-delay 0
no arp frame-relay
frame-relay map ip 13.13.13.1 201 broadcast
no frame-relay inverse-arp
frame-relay lmi-type ansi
end
R3#show run
Building configuration...
Current configuration : 1132 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 33.33.33.33 255.255.255.0
!
interface Serial0/0
ip address 13.13.13.3 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
serial restart-delay 0
no arp frame-relay
frame-relay map ip 13.13.13.1 201 broadcast
no frame-relay inverse-arp
frame-relay lmi-type ansi
!
interface Serial0/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial0/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 13.13.13.3 0.0.0.0 area 0
network 33.33.33.33 0.0.0.0 area 0
!
no ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end
R3#showip ospf database
OSPF Router with ID (3.3.3.3) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 568 0x80000002 0x00EA72 2
3.3.3.3 3.3.3.3 567 0x80000003 0x00D903 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
13.13.13.1 1.1.1.1 568 0x80000001 0x005AA3
R3#
R1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 592 0x80000002 0x00EA72 2
3.3.3.3 3.3.3.3 593 0x80000003 0x00D903 3
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
13.13.13.1 1.1.1.1 592 0x80000001 0x005
可以看到,一台R1发送的HELLO包是单播发送的。R3的HELLO包是发给组播地址224.0.0.5
没有路由的原因是因为配置点到多点的路由器需要选举DR、BDR,而且自己在这种情况下自己会成为BDR(见R1的show ip ospf nei ),二另一端是点到点,不选举DR、BDR。所以,BDR一直在等待DR发送LSR,所以收不到LSA。
R1#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/BDR 00:01:51 13.13.13.3 Serial0/0
R3#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 0 FULL/- 00:01:33 13.13.13.1 Serial0/0
你估计是把router-id当成了network 对于帧中继下的ospf,两边接口的网络类型不一致,即使有LSA在LSDB中,但还是没有路由的。
但是邻居建立是完全正常的。但是没有路由,有LSA但不装表 肯定建立不了邻居,PTMP网络类型Hello时间为30秒,Brocast网络类型Hello时间为10秒,这样邻居肯定会出现UP Down现象。楼主说能建立邻居关系哪应该是PTP网络类型和Brocast网络类型,这两个Hello时间是相同的10秒,这样出现情况就是邻居是正常的,LSA也有但是路由表是不正常的。 额,我把我的配置贴出来吧。
R1#sh run
Building configuration...
Current configuration : 1169 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
ip address 192.168.1.1 255.255.255.0
encapsulation frame-relay
ip ospf network point-to-multipoint
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 110
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end
R2#sh run
Building configuration...
Current configuration : 1162 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
!
frame-relay switching
--More--
*Apr 10 13:26:09.639: %SYS-5-CONFIG_I: Configured from console by console
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
no ip address
encapsulation frame-relay
serial restart-delay 0
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 102 interface Serial1/1 201
!
interface Serial1/1
no ip address
encapsulation frame-relay
serial restart-delay 0
frame-relay lmi-type ansi
frame-relay intf-type dce
frame-relay route 201 interface Serial1/0 102
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end
R3#sh run
Building configuration...
Current configuration : 1132 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
ip address 192.168.1.2 255.255.255.0
encapsulation frame-relay
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 110
router-id 3.3.3.3
log-adjacency-changes
network 3.3.3.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 0
!
no ip http server
no ip http secure-server
!
!
!
logging alarm informational
!
!
!
!
!
control-plane
!
!
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
!
!
end
这个是三台路由器的配置。我在R1的s1/1上配置的是p2mp网络类型,R3的s1/0是默认的nbma,所以两个建立邻居是没有任何阻碍的。
现在我查看R1的ospf database.
R1#
R1#sh ip os da
OSPF Router with ID (1.1.1.1) (Process ID 110)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 289 0x80000004 0x0005DC 3
3.3.3.3 3.3.3.3 290 0x80000003 0x007F64 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.1.2 3.3.3.3 290 0x80000001 0x000DA4
然后我再查看R1的路由表
R1#sh ip rou
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
C 192.168.1.0/24 is directly connected, Serial1/1
和二楼的差不多。我发这个帖子不是为了求证是否有这个实验现象,我验证了好几次。确认了配置是没有错误的。现在我的疑惑就如三楼所说。我知道有这种实验现象,但是我无法解释,为什么R1数据库中有了R3的loopback0口的路由,但是不装进路由表中。这个问题是关键。额,还有,二楼的P2MP好像不需要选择DR/BDR吧?额,另一端是NBMA,所有也需要选择DR/BDR,这个没有冲突的。呵呵,还请继续看看好吗? 本帖最后由 Jose 于 2012-4-10 23:38 编辑
在OSPF邻居状态都达到full,也就是邻居的LSDB都同步了之后,会根据SPF算法,构建路径,创建路由表.
不同的接口网络类型,它们的构建路径的方式是不同的.
例如类似于p2p这样的1对1网络类型,它需要type为1的"link"去构建路径,也就是link connected to another router
例如类似于广播这样的1对多网络类型,它需要type为2的"link"去构建路径,也就是link connected to a transit network
两个邻居,如果构建路径的方式不一致,就会被认为无法构建路径,自然也无法创建路由表.
以上内容在sh ip ospf da ro x.x.x.x里可以看到.
顺便提一下,1类lsa描述的就是始发路由器所关联的所有link.这些link有些是用来构建SPF路径的,例如上面提到的那两个,还有些是用来描述p2p网络的网段的,例如link connected to a stub network.那么什么用来描述广播网络的网段呢,答案就是2类LSA.
我没有做实验,p2mp可以看成是多个p2p,nbma和广播一样都是多路访问的,所以应该差不多. 听起来很有道理,还是第一次听说这个呢。你可以告诉我关于“不同的接口网络类型,它们的构建路径的方式是不同的.”这句话的更详细的资料吗?是不是RFC文档?
页:
[1]