OSPF单域实验报告

1.1 实验任务
(1)    配置 Loopback 地址作为路由器的 ID
(2)    配置 OSPF 的进程并在相应的接口上启用。
(3)    OSPF 起来后,更新计时器。
 
1.2 实验环境和网络拓扑
 
 
1.3 完成标准
(1)    按照拓扑图正确连接三台路由器。
(2)    完成 Loopback 地址的配置。
(3)    完成 OSPF 单域路由协议的配置。
(4)    完成 OSPF 计数器的配置。
 
 
2 .详细操作步骤
 
Step 1: 配置 Loopback 地址
       配置路由器的 A B C 的接口 IP 地址和 Loopback 接口 IP 地址
 
路由器 A 配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho RA
RA(config)#interface loopback 0                                            // 配置 Loopback 接口 IP 地址
RA(config-if)#ip address 192.168.31.11 255.255.255.255
RA(config-if)#exit
RA(config)#in
RA(config)#interface f0/0                                                      // 配置端口 F0/0 IP 地址
RA(config-if)#ip address 192.168.1.1 255.255.255.0
RA(config-if)#no shut
RA(config-if)#exit
RA(config)#exit
RA#
*Dec  4 18:23:27.891: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
                                                        // 端口 F0/0 ,参数改变生效
*Dec  4 18:23:28.739: %SYS-5-CONFIG_I: Configured from console by console
                                                        // 通过 console 修改的配置
*Dec  4 18:23:28.891: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up                             // 在端口 F0/0 上的线路协议修改生效
*Dec  4 18:27:36.723: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with Switcher FastEthernet0/1 (full duplex).
// 发现此设备 F0/0 (半双工)和交换机 F0/1 (全双工)没有统一双工
RA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RA(config)#interface f0/0
RA(config-if)#duplex full                   // 接口 F0/0 开启全双工
RA(config-if)#exit
 
路由器 B 配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho RB
RB(config)#interface loopback 0                                             // 配置 Loopback 接口 IP 地址
RB(config-if)#ip address 192.168.31.22 255.255.255.255
RB(config-if)#exit
RB(config)#interface f0/0                                                      // 配置端口 F0/0 IP 地址
RB(config-if)#ip address 192.168.1.2 255.255.255.0
RB(config-if)#no shut
RB(config-if)#exit
RB(config)#exit
RB#
*Dec  4 18:25:15.427: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state t
o up
*Dec  4 18:25:15.875: %SYS-5-CONFIG_I: Configured from console by console
*Dec  4 18:25:16.427: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
*Dec  4 18:27:36.923: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with Router FastEthernet0/2 (full duplex).
 
RB#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RB(config)#interface f0/0
RB(config-if)#duplex full
RB(config-if)#exit
 
路由器 C 配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho RC
RC(config)#interface loopback 0                                             // 配置 Loopback 接口 IP 地址
RC(config-if)#ip address 192.168.31.33 255.255.255.255
RC(config-if)#exit
RC(config)#interface f0/0                                                      // 配置端口 F0/0 IP 地址
RC(config-if)#ip address 192.168.1.3 255.255.255.0
RC(config-if)#no shut
RC(config-if)#exit
RC(config)#exit
RC#
*Dec  4 18:27:03.515: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state t
o up
*Dec  4 18:27:03.595: %SYS-5-CONFIG_I: Configured from console by console
*Dec  4 18:27:04.515: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
*Dec  4 18:27:36.823: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on Fast
Ethernet0/0 (not full duplex), with Router FastEthernet0/3 (full duplex).
RC#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RC(config)#interface f0/0
RC(config-if)#duplex full
RC(config-if)#exit
*Dec  4 18:32:37.975: %SYS-5-CONFIG_I: Configured from console by console
 
交换机信息如下:
Switch#
*Mar  1 00:00:35.619: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on Fast
Ethernet0/3 (not half duplex), with RC FastEthernet0/0 (half duplex).
*Mar  1 00:00:48.463: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on Fast
Ethernet0/2 (not half duplex), with RB FastEthernet0/0 (half duplex).
*Mar  1 00:01:03.127: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on Fast
Ethernet0/1 (not half duplex), with RA FastEthernet0/0 (half duplex).
// 因为路由器所有接口默认半双工而交换机所有接口默认全双工,在不统一双工情况下每隔数秒便会在未统一双工的设备上出现提示信息。为路由器上接口配置全双工模式后以上提示信息停止。
 
Step 2: 配置 OSPF 的进程并在相应的接口上启用
       配置路由器 A B C OSPF 单域路由协议
 
路由器 A 配置如下:
RA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RA(config)#router ospf 10                                              // 配置 OSPF ID 10
RA(config-router)#network 192.168.1.0 0.0.0 .255 area 0   // 配置路由 IP 及区域 ID
RA(config-router)#network 192.168.31.0 0.0.0 .0 area 0     // 配置路由 IP 及区域 ID
RA(config-router)#exit
RA(config)#exit
RA#
*Dec  4 18:34:49.619: %SYS-5-CONFIG_I: Configured from console by console
RA#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, 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                                        // 未设置最终网关
 
     192.168.31.0/32 is subnetted, 3 subnets                    //192.168.31.0 网段分出 3 个子网
O       192.168.31.33 [110/2] via 192.168.1.3, 00:03:10, FastEthernet0/0
//OSPF 路由: 192.168.31.33 距离 110 Cost2 ,通过 192.168.1.3 ,连接了 3 10 秒,接口 F0/0
O       192.168.31.22 [110/2] via 192.168.1.2, 00:03:10, FastEthernet0/0
//OSPF 路由: 192.168.31.22 距离 110 Cost2 ,通过 192.168.1.2 ,连接了 3 10 秒,接口 F0/0
C       192.168.31.11 is directly connected, Loopback0
//192.168.31.11 是直连 Loopback0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
//192.168.1.0/24 网段是直连接口 F0/0
 
RA#show ip ospf                                                     // 查看 OSPF 信息
 Routing Process "ospf 10" with ID 192.168.31.11     // 路由进程 ospf 10 ID 192.168.31.11
 Supports only single TOS(TOS0) routes                   // 支持单个 TOS(TOS0) 类路由器
 Supports opaque LSA                                            // 支持不透明的 LSA
 Supports Link-local Signaling (LLS)                       // 支持本地连接信号( LLS
 Initial SPF schedule delay 5000 msecs                            // 初始 SPF 计划延期 5000 毫秒
 Minimum hold time between two consecutive SPFs 10000 msecs
 // 两个连续 SPF 之间最小保持时间 10000 毫秒
 Maximum wait time between two consecutive SPFs 10000 msecs
 // 两个连续 SPF 之间最大等待时间 10000 毫秒
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 // 最小 LSA 间隔时间 5 秒,最小 LSA 到达时间 1
 LSA group pacing timer 240 secs                                   //LSA 组调步计时器 240
 Interface flood pacing timer 33 msecs                      // 接口泛洪调步计时器 33 毫秒
 Retransmission pacing timer 66 msecs                      // 重传调步计时器 66 毫秒
 Number of external LSA 0. Checksum Sum 0x000000
 // 外部 LSA 数量 0 ,总和检查 总和 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 // 不透明自治系统 LSA 数量 0 ,总和检查 总和 0x000000
 Number of DCbitless external and opaque AS LSA 0
 // 外部非连接和非透明自治系统 LSA 数量 0
 Number of DoNotAge external and opaque AS LSA 0
 // 外部非老化和非透明自治系统 LSA 数量 0
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 // 这个路由器上的区域数量 1 1 个普通区域, 0 个末端区域, 0 个非纯末端区域
 External flood list length 0                                     // 外部泛洪列数长度 0
    Area BACKBONE(0)                                       // 区域骨干 0
        Number of interfaces in this area is 2 (1 loopback)
        // 在这个区域内接口数量 2 1 Loopback
        Area has no authentication                          // 区域没有认证
        SPF algorithm last executed 00:04:21.380 ago
              // 最短路径优先算法最后执行时间 4 21 380 以前
        SPF algorithm executed 7 times
              // 最短路径优先算法执行了 7
        Area ranges are                                         // 区域范围
        Number of LSA 4. Checksum Sum 0x 030A 93
              // 链路状态通告数量 4 ,总和检查 总和 0x 030A 93
        Number of opaque link LSA 0. Checksum Sum 0x000000
              // 非透明连接链路状态通告数量 0 ,总和检查 总和 0x000000
        Number of DCbitless LSA 0                       //DCbitless 链路状态通告数量 0
        Number of indication LSA 0                       // 指示 LSA 数量 0
        Number of DoNotAge LSA 0                            //DoNotAge LSA 数量 0
        Flood list length 0                                     // 泛洪列表长度 0
 
RA#show ip ospf neighbor                                       // 查看 OSPF 邻居
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.31.22     1   FULL/BDR        00:00:32    192.168.1.2     FastEthernet0/
0
192.168.31.33     1   FULL/DROTHER    00:00:34    192.168.1.3     FastEthernet0/
0
RA#show ip ospf database                                        // 查看 OSPF 数据库
 
            OSPF Router with ID (192.168.31.11) (Process ID 10)
 
                Router Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.31.11   192.168.31.11   381         0x80000003 0x00D6B7 2
192.168.31.22   192.168.31.22   349         0x80000003 0x00AEBD 2
192.168.31.33   192.168.31.33   301         0x80000002 0x 0088C 2 2
 
                Net Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     192.168.31.11   301         0x80000002 0x00FC5D
show ip ospf interface f0/0                                       // 查看 OSPF 接口状态
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.1/24, Area 0
  Process ID 10, Router ID 192.168.31.11, Network Type BROADCAST, Cost: 1
  // 进程 ID 10 ,路由器 ID 192.168.31.11 ,网络类型 广播,代价: 1
  Transmit Delay is 1 sec, State DR , Priority 1
  // 传送延迟 1 秒,状态 指定路由器,优先级 1
  Designated Router (ID) 192.168.31.11, Interface address 192.168.1.1
  // 指定路由器( ID 192.168.31.11 ,接口地址 192.168.1.1
  Backup Designated router (ID) 192.168.31.22, Interface address 192.168.1.2
  // 备份指定路由器( ID 192.168.31.22 ,接口地址 192.168.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
  // 计数器间隔配置,握手 10 ,死亡 40 ,等待 40 ,重传 5
    oob-resync timeout 40                                      //oob-resync 超时 40
    Hello due in 00:00:06                                       // 握手在 6 秒间
  Index 1/1, flood queue length 0                             // 索引 1/1 ,泛洪列队长度 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1                     // 最后泛洪扫描长度 1 ,最大 1
  Last flood scan time is 0 msec, maximum is 0 msec
  // 最后泛洪扫描时间 0 毫秒,最大 0 毫秒
  Neighbor Count is 2, Adjacent neighbor count is 2  // 邻居数量 2 ,邻接的邻居数量 2
Adjacent with neighbor 192.168.31.22  (Backup Designated Router)
// 邻接的邻居 192.168.31.22 (备份指定路由器)
Adjacent with neighbor 192.168.31.33
// 邻接的邻居 192.168.31.33
  Suppress hello for 0 neighbor(s)                                   // 禁止握手的邻居数量 0
路由器 B 配置如下:
RB#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RB(config)#router ospf 20                                              // 配置 OSPF ID 20
RB(config-router)#network 192.168.1.0 0.0.0 .255 area 0   // 配置路由 IP 及区域 ID
RB(config-router)#network 192.168.31.0 0.0.0 .0 area 0     // 配置路由 IP 及区域 ID
RB(config-router)#exit
RB(config)#exit
RB#
*Dec  4 18:35:22.051: %SYS-5-CONFIG_I: Configured from console by console
RB#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, 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
 
     192.168.31.0/32 is subnetted, 3 subnets
O       192.168.31.33 [110/2] via 192.168.1.3, 00:03:16, FastEthernet0/0
C       192.168.31.22 is directly connected, Loopback0
O       192.168.31.11 [110/2] via 192.168.1.1, 00:03:16, FastEthernet0/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
RB#show ip ospf
 Routing Process "ospf 20" with ID 192.168.31.22
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 External flood list length 0
    Area BACKBONE(0)
        Number of interfaces in this area is 2 (1 loopback)
        Area has no authentication
        SPF algorithm last executed 00:05:19.312 ago
        SPF algorithm executed 5 times
        Area ranges are
        Number of LSA 4. Checksum Sum 0x 030A 93
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
 
RB#show ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.31.11     1   FULL/DR         00:00:39    192.168.1.1     FastEthernet0/
0
192.168.31.33     1   FULL/DROTHER    00:00:31    192.168.1.3     FastEthernet0/
0
RB#show ip ospf database
 
            OSPF Router with ID (192.168.31.22) (Process ID 20)
 
                Router Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.31.11   192.168.31.11   430         0x80000003 0x00D6B7 2
192.168.31.22   192.168.31.22   398         0x80000003 0x00AEBD 2
192.168.31.33   192.168.31.33   351         0x80000002 0x 0088C 2 2
 
                Net Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     192.168.31.11   351         0x80000002 0x00FC5D
RB#show ip ospf interface f0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.2/24, Area 0
  Process ID 20, Router ID 192.168.31.22, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 192.168.31.11, Interface address 192.168.1.1
  Backup Designated router (ID) 192.168.31.22, Interface address 192.168.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:00
  Index 1/1, 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 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 192.168.31.11  (Designated Router)
    Adjacent with neighbor 192.168.31.33
  Suppress hello for 0 neighbor(s)
 
路由器 C 配置如下:
RC#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RC(config)#router ospf 30                                              // 配置 OSPF ID 30
RC(config-router)#network 192.168.1.0 0.0.0 .255 area 0   // 配置路由 IP 及区域 ID
RC(config-router)#network 192.168.31.0 0.0.0 .0 area 0     // 配置路由 IP 及区域 ID
RC(config-router)#exit
RC(config)#exit
RC#
*Dec  4 18:35:46.755: %SYS-5-CONFIG_I: Configured from console by console
RC#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, 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
 
     192.168.31.0/32 is subnetted, 3 subnets
C       192.168.31.33 is directly connected, Loopback0
O       192.168.31.22 [110/2] via 192.168.1.2, 00:03:25, FastEthernet0/0
O       192.168.31.11 [110/2] via 192.168.1.1, 00:03:25, FastEthernet0/0
C    192.168.1.0/24 is directly connected, FastEthernet0/0
RC#show ip ospf
 Routing Process "ospf 30" with ID 192.168.31.33
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 External flood list length 0
    Area BACKBONE(0)
        Number of interfaces in this area is 2 (1 loopback)
        Area has no authentication
        SPF algorithm last executed 00:06:02.584 ago
        SPF algorithm executed 3 times
        Area ranges are
        Number of LSA 4. Checksum Sum 0x 030A 93
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
 
RC#show ip ospf neighbor
 
Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.31.11     1   FULL/DR         00:00:31    192.168.1.1     FastEthernet0/
0
192.168.31.22     1   FULL/BDR        00:00:31    192.168.1.2     FastEthernet0/
0
RC#show ip ospf database
 
            OSPF Router with ID (192.168.31.33) (Process ID 30)
 
                Router Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.31.11   192.168.31.11   468         0x80000003 0x00D6B7 2
192.168.31.22   192.168.31.22   435         0x80000003 0x00AEBD 2
192.168.31.33   192.168.31.33   387         0x80000002 0x 0088C 2 2
 
                Net Link States (Area 0)
 
Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     192.168.31.11   387         0x80000002 0x00FC5D
RC#show ip ospf interface f0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.3/24, Area 0
  Process ID 30, Router ID 192.168.31.33, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DROTHER, Priority 1
  Designated Router (ID) 192.168.31.11, Interface address 192.168.1.1
  Backup Designated router (ID) 192.168.31.22, Interface address 192.168.1.2
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:05
  Index 1/1, 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 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 192.168.31.11  (Designated Router)
    Adjacent with neighbor 192.168.31.22  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)
 
 
Step 3: 更新计时器
配置路由器 A B C 上的 Hello Dead 计数器
 
路由器 A 配置如下:
RA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RA(config)#in
RA(config)#interface f0/0
RA(config-if)#ip ospf Hello-interval 5                                    // 配置 OSPF 握手间隔 5
RA(config-if)#ip ospf dead-interval 20                                    // 配置 OSPF 死亡间隔 20
RA(config-if)#exit
RA(config)#exit
RA#
*Dec  4 18:42:36.863: %SYS-5-CONFIG_I: Configured from console by console
RA#
*Dec  4 18:42:49.707: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.31.22 on FastEther
net0/0 from FULL to DOWN, Neighbor Down: Dead timer expired
 
RA#show ip ospf interface f0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.1/24, Area 0
  Process ID 10, Router ID 192.168.31.11, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR , Priority 1
  Designated Router (ID) 192.168.31.11, Interface address 192.168.1.1
  No backup designated router on this network
  Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
  // 计数器间隔时间配置,握手 5 ,死亡 20 ,等待 20 ,重传 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
 
路由器 B 配置如下:
RB#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RB(config)#interface f0/0
RB(config-if)#ip ospf Hello-interval 5                                     // 配置 OSPF 握手间隔 5
RB(config-if)#ip ospf dead--interval 20                                          // 配置 OSPF 死亡间隔 20
*Dec  4 18:45:53.259: %OSPF-5-ADJCHG: Process 20, Nbr 192.168.31.11 on FastEther
net0/0 from LOADING to FULL, Loading Done
RB(config-if)#exit
RB(config)#exit
*Dec  4 18:46:07.163: %SYS-5-CONFIG_I: Configured from console by console
 
RB#show ip ospf
 interface f0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.2/24, Area 0
  Process ID 20, Router ID 192.168.31.22, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR , Priority 1
  Designated Router (ID) 192.168.31.22, Interface address 192.168.1.2
  Backup Designated router (ID) 192.168.31.33, Interface address 192.168.1.3
  Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 192.168.31.11
    Adjacent with neighbor 192.168.31.33  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)
 
路由器 C 配置如下:
RC#
RC#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RC(config)#interface f0/0
RC(config-if)#ip ospf Hello-interval 5                                     // 配置 OSPF 握手间隔 5
RC(config-if)#ip ospf dead-interval 20                                    // 配置 OSPF 死亡间隔 20
*Dec  4 18:47:07.731: %OSPF-5-ADJCHG: Process 30, Nbr 192.168.31.22 on FastEther
net0/0 from LOADING to FULL, Loading Done
*Dec  4 18:47:07.839: %OSPF-5-ADJCHG: Process 30, Nbr 192.168.31.11 on FastEther
net0/0 from LOADING to FULL, Loading Done
RC(config-if)#exit
RC(config)#exit
*Dec  4 18:47:14.779: %SYS-5-CONFIG_I: Configured from console by console
RC#show ip ospf interface f0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.1.3/24, Area 0
  Process ID 30, Router ID 192.168.31.33, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR , Priority 1
  Designated Router (ID) 192.168.31.33, Interface address 192.168.1.3
  Backup Designated router (ID) 192.168.31.11, Interface address 192.168.1.1
  Timer intervals configured, Hello 5, Dead 20, Wait 20, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:02
  Index 1/1, 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 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2
    Adjacent with neighbor 192.168.31.11  (Backup Designated Router)
    Adjacent with neighbor 192.168.31.22
  Suppress hello for 0 neighbor(s)
 
 
3 .实验总结
 
       通过配置 OSPF 路由协议,将更适合于规模较大的网络环境,收敛更快速,依据带宽来计算路径成本等。 OSPF 路由协议单域配置要点有:
 
l         Router ID OSPF 区域内唯一识别一台路由器的 IP 地址,获得方法先选取所有 Loopback 接口数值最高的 IP 地址;无 Loopback 接口 IP 情况下选物理端口数值最高的 IP 作为 Router ID
l         OSPF 保存的 3 张表是:邻居列表、链路状态数据库和路由表。
l         OSPF 定义 4 种网络类型:点到点网络 (Point-to-Point) 、广播多址网络 (Broadcast) 、非广播多址网络 (NBMA) 和点到多点网络 (Point-to-Multipoint)
l         DR(Designated Router) 同网络中其它路由器变成邻接关系并管理这个多址网络上的泛洪过程。 BDR(Backup Designated Router) 作为 DR 的备份与 DR 产生邻接并随时准备接替 DR 与其它路由器形成邻接关系。
l         泛洪过程使用两种类型 OSPF 报文,分别是:链路状态更新报文 (LinkStateUpdatepackets ,类型 4) 和链路状态确认报文 (LinkStateAcknowledgementpackets ,类型 5)
 
 

本文出自 “�a�i天命嘻哈” 博客,转载请与作者联系!

你可能感兴趣的:(网络,路由,休闲,ospf,单域)