Type1----Non_Broadcast(默认)
我们在R2上show ip ospf neighbor,发现没有邻居。说明在这种情况下邻居需要手动配置!配置如下:
R2:
R2(config)#router ospf 10
R2(config-router)#neighbor 12.1.1.3
R3:
R3(config)#router ospf 10
R3(config-router)#neighbor 12.1.1.2
此时在R2上查看邻居:
R2#sho ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:01:46 12.1.1.3 Serial1/0
发现邻居已经形成并且有DR与BDR的选举!
在R2上查看接口
R2#show ip ospf interface
Serial1/0 is up, line protocol is up
Internet Address 12.1.1.2/24, Area 0
Process ID 10, Router ID 2.2.2.2, Network Type NON_BROADCAST, Cost: 64
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 3.3.3.3, Interface address 12.1.1.3
Backup Designated router (ID) 2.2.2.2, Interface address 12.1.1.2
Flush timer for old DR LSA due in 00:01:40
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
在这种网络 类型中,hello的间隔是30s。
打开debug信息,我们可以看到在这种网络类型中,OSPF的数据包是单播传送的。
R2#
*Aug 14 14:52:52.819: OSPF: Send hello to 12.1.1.3 area 0 on Serial1/0 from 12.1.1.2
R2#
*Aug 14 14:52:57.087: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.1.1.3
*Aug 14 14:52:57.091: OSPF: End of hello processing
Type2---- Broadcast
首先去掉刚才手动配置的邻居关系:
R2(config)#router ospf 10
R2(config-router)#no neighbor 12.1.1.3
R3(config)#router ospf 10
R3(config-router)#no neighbor 12.1.1.2
将R2和R3接口的网络类型改成broadcast
R2(config-router)#int s1/0
R2(config-if)#ip ospf network broadcast
R3(config-router)#int s1/1
R3(config-if)#ip ospf network broadcast
一会我们就看到了如下信息
R3#
*Aug 14 14:59:52.823: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done
这说明了在这种网络类型下是不需要手动配置邻居关系的!
R2#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:39 12.1.1.3 Serial1/0
有DR与BDR的选举。
R2#sho ip ospf int
Serial1/0 is up, line protocol is up
Internet Address 12.1.1.2/24, Area 0
Process ID 10, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 64
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 3.3.3.3, Interface address 12.1.1.3
Backup Designated router (ID) 2.2.2.2, Interface address 12.1.1.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello时间间隔为10s。
R2#
*Aug 14 15:02:20.443: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 12.1.1.2
*Aug 14 15:02:20.959: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.1.1.3
*Aug 14 15:02:20.963: OSPF: End of hello processing
使用224.0.0.5这个组播地址传送数据包。
Type3---- Point-to-Point
将R2,R3接口的网络类型改成Point-to-Point
R2(config-if)#ip ospf net point-to-point
R3(config-if)#ip ospf net point-to-point
很快我们就可以看到如下信息
R3(config-if)#
*Aug 14 15:06:07.559: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done
说明这种网络类型也不需要手动指定邻居
R2#sho ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:00:37 12.1.1.3 Serial1/0
没有DR/BDR的选举
R2#sh ip ospf int
Serial1/0 is up, line protocol is up
Internet Address 12.1.1.2/24, Area 0
Process ID 10, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello时间间隔为10s
R2#
*Aug 14 15:08:25.311: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 12.1.1.2
R2#
*Aug 14 15:08:30.259: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.1.1.3
*Aug 14 15:08:30.263: OSPF: End of hello processing
同样也是使用224.0.0.5这个组播地址传送数据。
Type4---- Point-to-Multipoint
将接口改为Point-to-Multipoint
R2(config-if)#ip ospf network point-to-multipoint
R3(config-if)#ip ospf network point-to-multipoint
*Aug 14 15:10:51.739: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done
同样也不需要手动指定邻居
R2#sho ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:01:48 12.1.1.3 Serial1/0
没有DR和BDR的选举
R2#sho ip ospf int
Serial1/0 is up, line protocol is up
Internet Address 12.1.1.2/24, Area 0
Process ID 10, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello时间间隔为30s
R2#
*Aug 14 15:12:49.759: OSPF: Send hello to 224.0.0.5 area 0 on Serial1/0 from 12.1.1.2
R2#
*Aug 14 15:12:57.443: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.1.1.3
*Aug 14 15:12:57.447: OSPF: End of hello processing
以224.0.0.5这个组播地址发送数据
Type5---- Point-to-Multipoint(Non_Broadcast)
改变接口类型为Point-to-Multipoint(Non_Broadcast)
R2(config-if)#ip ospf network point-to-multipoint non-broadcast
R3(config-if)#ip ospf network point-to-multipoint non-broadcast
这个时候邻居没有被自动发现。我们在R2上手动指定邻居
R2(config-if)#router ospf 10
R2(config-router)#neighbor 12.1.1.3
R2(config-router)#
*Aug 14 15:18:38.955: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on Serial1/0 from LOADING to FULL, Loading Done
邻居只要在一边指定即可。说明在这种网络类型下邻居需要手动指定。
R2#sho ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 0 FULL/ - 00:01:57 12.1.1.3 Serial1/0
同样没有DR和BDR的选取
R2#sho ip ospf int
Serial1/0 is up, line protocol is up
Internet Address 12.1.1.2/24, Area 0
Process ID 10, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64
Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello时间间隔为30s
R2#
*Aug 14 15:21:03.099: OSPF: Send hello to 12.1.1.3 area 0 on Serial1/0 from 12.1.1.2
*Aug 14 15:21:03.295: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.1.1.3
*Aug 14 15:21:03.299: OSPF: End of hello processing
使用单播传送OSPF数据。
总结:在NBMA网络下5种网络类型具体情况如下表所示:
网络类型 邻居自动发现 有无DR选举 Hello间隔 传输方式
Non_broadcast 否 有 30s 单播
Broadcast 是 有 10s 组播
Point-to-Point 是 无 10s 组播
Point-to-Multipoint 是 无 30s 组播
Point-to-Multipoint(非广播) 否 无 30s 单播
2009 安全CCIE v3.0 lab新书 (Cisco Press出品)
安全IE备考之- CISCO Devices Security
张sir 2010 CCNP4.0 642-902 视频 集合
Cisco WLC-4400系列上配置Dynemic interface
文章转载至http://bbs.net527.cn 无忧网客联盟
shop.net527.cn/