1.1 实验任务 <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

(1)    配置Loopback地址作为路由器的ID
(2)    配置OSPF的进程并在相应的接口上启用。
(3)    OSPF起来后,更新计时器。

 

1.2 实验环境和网络拓扑

 

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />

 

1.3 完成标准

(1)    按照拓扑图正确连接三台路由器。
(2)    完成Loopback地址的配置。
(3)    完成OSPF单域路由协议的配置。
(4)    完成OSPF计数器的配置。

 

 

2 .详细操作步骤

 

Step 1: 配置 Loopback 地址

       配置路由器的ABC的接口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 的进程并在相应的接口上启用

       配置路由器ABCOSPF单域路由协议

 

路由器A配置如下:
RA#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
RA(config)#router ospf 10                                              //配置OSPFID10

RA(config-router)#network 192.168.1.0 <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />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距离110Cost2,通过192.168.1.3,连接了310秒,接口F0/0

O       192.168.31.22 [110/2] via 192.168.1.2, 00:03:10, FastEthernet0/0
//OSPF路由:192.168.31.22距离110Cost2,通过192.168.1.2,连接了310秒,接口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 10ID 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
 //这个路由器上的区域数量11个普通区域,0个末端区域,0个非纯末端区域

 External flood list length 0                                     //外部泛洪列数长度 0

    Area BACKBONE(0)                                       //区域骨干 0

        Number of interfaces in this area is 2 (1 loopback)
        //在这个区域内接口数量21Loopback

        Area has no authentication                          //区域没有认证

        SPF algorithm last executed 00:04:21.380 ago
              //最短路径优先算法最后执行时间421380 以前

        SPF algorithm executed 7 times
              //最短路径优先算法执行了7

        Area ranges are                                         //区域范围

        Number of LSA 4. Checksum Sum 0x030A93
              //链路状态通告数量4,总和检查 总和 0x030A93

        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 0x0088C2 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
  //指定路由器(ID192.168.31.11,接口地址 192.168.1.1

  Backup Designated router (ID) 192.168.31.22, Interface address 192.168.1.2
  //备份指定路由器(ID192.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                                              //配置OSPFID20
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 0x030A93
        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 0x0088C2 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                                              //配置OSPFID30
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 0x030A93
        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 0x0088C2 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: 更新计时器

配置路由器ABC上的HelloDead计数器

 

路由器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 IDOSPF区域内唯一识别一台路由器的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)