苏志辉技术博客

  IT博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  11 随笔 :: 5 文章 :: 1 评论 :: 0 Trackbacks

网络类型
1.Broadcast
2.NonBroadcast
3.Point-to-Multimpoint
4.Point-to-Multimpoint NonBroadcast
5.Point-to-Point
****************************************************
**OSPF网络类型   DR/BDR        手工邻居        HELLO        单播/组播 **
**   P2P                 ---            ---             10S             组   **
**   P2MP               ---            ---             30S            单/组 **
**   NBMA                √             √              30S             单  **
**   Broadcast          √             ---            10S             组  **
**   P2MP-NBMA      ---             √              30S             单  **
****************************************************
--------------------------------
                        R1
                         |(S1/0)
                         |
R2(S1/0)------FR-SW-------(S1/0)R3
--------------------------------
1.NonBroadcast
R1#show run
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/0
 ip address 123.1.1.1 255.255.255.0
 encapsulation frame-relay 默认为NonBroadcast
 frame-relay map ip 123.1.1.3 103 默认为没有广播能力
 frame-relay map ip 123.1.1.2 102 
 no frame-relay inverse-arp
!
router ospf 100
 router-id 1.1.1.1
 log-adjacency-changes
 network 1.1.1.1 0.0.0.0 area 0
 network 123.1.1.1 0.0.0.0 area 0
 neighbor 123.1.1.3 priority 1 需要手工指定邻居
 neighbor 123.1.1.2 priority 1
!
R2#show run
interface Loopback0
 ip address 2.2.2.2 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/0
 ip address 123.1.1.2 255.255.255.0
 encapsulation frame-relay
 frame-relay map ip 123.1.1.3 203
 frame-relay map ip 123.1.1.1 201 
 no frame-relay inverse-arp
!
router ospf 100
 router-id 2.2.2.2
 log-adjacency-changes
 network 2.2.2.2 0.0.0.0 area 0
 network 123.1.1.2 0.0.0.0 area 0
 neighbor 123.1.1.3 priority 1
 neighbor 123.1.1.1 priority 1
!
R3#show run
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
 ip ospf network point-to-point
!
interface Serial1/0
 ip address 123.1.1.3 255.255.255.0
 encapsulation frame-relay
 ip ospf network broadcast
 frame-relay map ip 123.1.1.1 301
 frame-relay map ip 123.1.1.2 302 
 no frame-relay inverse-arp
!
router ospf 100
 router-id 3.3.3.3
 log-adjacency-changes
 network 3.3.3.3 0.0.0.0 area 0
 network 123.1.1.3 0.0.0.0 area 0
 neighbor 123.1.1.2 priority 1
 neighbor 123.1.1.1 priority 1
!

------------------------------
hello间隔为30s,单播更新
R1#debug ip ospf hello
OSPF hello events debugging is on
R1#
May  6 16:34:38.471: OSPF: Send hello to 0.0.0.1 area 0 on Serial1/0 from 123.1.1.1
R1#
May  6 16:34:44.999: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 123.1.1.3
May  6 16:34:45.003: OSPF: End of hello processing
R1#
May  6 16:34:57.035: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial1/0 123.1.1.2
May  6 16:34:57.039: OSPF: End of hello processing
R1#
May  6 16:35:08.475: OSPF: Send hello to 0.0.0.1 area 0 on Serial1/0 from 123.1.1.1
R1#
May  6 16:35:15.019: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 123.1.1.3
May  6 16:35:15.023: OSPF: End of hello processing
R1#
May  6 16:35:27.059: OSPF: Rcv hello from 2.2.2.2 area 0 from Serial1/0 123.1.1.2
May  6 16:35:27.063: OSPF: End of hello processing
R1#
May  6 16:35:38.479: OSPF: Send hello to 0.0.0.1 area 0 on Serial1/0 from 123.1.1.1
R1#
-----------------------
需要选择DR/BDR的,可以手工选择,通过 neighbor 123.1.1.1 priority 1的优先级来调整
R1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           1   FULL/DR         00:01:35    123.1.1.3       Serial1/0
2.2.2.2           1   FULL/DROTHER    00:01:47    123.1.1.2       Serial1/0
R1#
-----------------------
查看接口的OSPF网络类型
R1#show ip ospf interface s1/0
Serial1/0 is up, line protocol is up
  Internet Address 123.1.1.1/24, Area 0
  Process ID 100, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64 为NonBroadcast类型
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 3.3.3.3, Interface address 123.1.1.3
  Backup Designated router (ID) 1.1.1.1, Interface address 123.1.1.1
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:05
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 1
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 3.3.3.3  (Designated Router)
    Adjacent with neighbor 2.2.2.2
  Suppress hello for 0 neighbor(s)
R1#show frame-relay map
Serial1/0 (up): ip 123.1.1.3 dlci 103(0x67,0x1870), static,
              CISCO, status defined, active
Serial1/0 (up): ip 123.1.1.2 dlci 102(0x66,0x1860), static,
              CISCO, status defined, active
R1#
-----------------------
R1#show ip route
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, 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
     2.0.0.0/24 is subnetted, 1 subnets
O       2.2.2.0 [110/65] via 123.1.1.2, 00:01:08, Serial1/0
     3.0.0.0/24 is subnetted, 1 subnets
O       3.3.3.0 [110/65] via 123.1.1.3, 00:01:08, Serial1/0
     123.0.0.0/24 is subnetted, 1 subnets
C       123.1.1.0 is directly connected, Serial1/0
R1#

posted on 2009-05-16 16:36 苏志辉 阅读(189) 评论(1)  编辑 收藏 引用 所属分类: CCNP

评论

# re: OSPF Over NBMA----NonBroadcast 2009-05-16 20:49 苏志辉
也可以用
debug ip packet 查看hello发送的地址
debug ip ospf adj 查看邻居建立过程,是否选举DR/BDR
show ip ospf int f0/0查看接口的身份DR/BDR/DROther,接口的网络类型
  回复  更多评论
  

只有注册用户登录后才能发表评论。