BSCI--Lab2 OSPF

BSCI 之
LAB2 ---OSPF for Multiple Areas and Frame Relay Nonbroadcast
 
 
配置多区域的OSPF
目标:
 ・回顾OSPF网络类型
 ・对OSPF进行配置
 ・验证OSPF邻居和ROUTER ID
 ・了解虚拟链路在OSPF中的作用
 ・设置设置虚拟链路
 ・验证端到端连接
 
实验开始之前要记得OSPF网络类型之中,Broadcast类型的邻居是自动发现的,而Nonbroadcast类型的邻居是必须要手动配置的。
本次实验用到四个7200Router 以及一个点到点的帧中继网络。
 
Router(config)#router ospf process-id    //在路由器启用OSPF进程
 
Router(config-router)#network network_address  [wildcard_mask] area number               //通告网段,并说明属于哪个区域
 
Router(config-router)#neighbor  ip_address  //在非广播网络中手动配置邻居
Router(config-if)#ip ospf priority 0   //禁止路由器接口参加DR选举
 
 
OK,那么开始实验
 
各个路由器的配置如下:
 
R1#conf term
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#network 10.1.2.0 0.0.0.255 area 0
R1(config-router)#network 1.1.1.1 0.0.0.0 area 0
R1(config-router)#neighbor 10.1.1.2
R1(config-router)#exit
1#show ip ospf int s1/0
Serial1/0 is up, line protocol is up
  Internet Address 10.1.1.1/24, Area 0
  Process ID 1, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 1.1.1.1, Interface address 10.1.1.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:23
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  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)
R1#R1#conf term
 
 
 
R2的配置
 
R2(config)#int s2/0
R2(config-if)#ip ospf priority 0
R2(config-if)#exit
R2(config)#router ospf 1
R2(config-router)#network 10.1.1.0 0.0.0.255 area 0
R2(config-router)#network 172.16.1.0 0.0.0.255 area 1
R2(config-router)#
R2(config-router)#net
*Mar 20 20:03:29.163: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on Serial2/0 from LOADING to FULL, Loading Done
R2(config-router)#network 172.16.1.0 0.0.0.255 area 1
R2(config-router)#network 2.2.2.2 0.0.0.0 area 0
R2(config-router)#end
R2#
R2#
R2#show ip ospf int s2/0
Serial2/0 is up, line protocol is up
  Internet Address 10.1.1.2/24, Area 0
  Process ID 1, Router ID 2.2.2.2, Network Type NON_BROADCAST, Cost: 64
  Transmit Delay is 1 sec, State DROTHER, Priority 0
  Designated Router (ID) 1.1.1.1, Interface address 10.1.1.1
  No backup designated router on this network
  Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
    oob-resync timeout 120
    Hello due in 00:00:19
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  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 1, Adjacent neighbor count is 1
    Adjacent with neighbor 1.1.1.1  (Designated Router)
  Suppress hello for 0 neighbor(s)
R2#
R2#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/DR         00:01:46    10.1.1.1        Serial2/0
R2#
 
 
 
R3配置
 
R3>en
R3#conf term
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#network 172.16.1.0 0.0.0.255 area 1
R3(config-router)#
*Mar 20 20:08:20.915: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
R3(config-router)#network 192.168.1.0 0.0.0.255 area 2
R3(config-router)#network 3.3.3.3 0.0.0.0 area 1
R3(config-router)#end
R3#show ip
*Mar 20 20:14:53.371: %SYS-5-CONFIG_I: Configured from console by console
R3#show ip ospf interface  fa0/0
FastEthernet0/0 is up, line protocol is up
  Internet Address 172.16.1.3/24, Area 1
  Process ID 1, Router ID 192.168.1.3, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 172.16.1.2
  Backup Designated router (ID) 192.168.1.3, Interface address 172.16.1.3
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  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 1, Adjacent neighbor count is 1
    Adjacent with neighbor 2.2.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)
R3#
R3#
R3#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:33    172.16.1.2      FastEthernet0/0
R3#
 
 
R4配置
 

R4>
R4>en
R4#
R4#
R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#network 192.168.1.0 0.0.0.255 area 2
R4(config-router)#network 4.4.4.4 0.0.0.0 area
*Mar 20 20:17:22.227: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.1.3 on GigabitEthernet1/0 from LOADING to FULL, Loading Done
R4(config-router)#network 4.4.4.4 0.0.0.0 area 2
 
 
 
 
到这里的时候,要开始进行虚拟链路的配置,否则区域2没法跟区域0联系。
区域2要配置命令来穿越区域1。
Router(config-router)# area number virtual-link route-id  //生成一条从路由器到区域0的虚链路。
注意:此命令必须要在虚链路两端进行配置。
number号是为了到达区域0而必须穿越的区域号;
router-id是虚链路另一端的路由器的Router ID。
 
首先对R2配置:
R2(config)#router ospf 1
R2(config-router)#area 1 virtual-link 3.3.3.3
R2(config-router)#end
 
接着配置R3:
R3(config)#router ospf 1
R3(config-router)#area 1 virtual-link 2.2.2.2
R3(config-router)#end
 
SHOW一下看看是否成功:
 
R3#SHOW IP OSPF VIRtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet0/0, Cost of using 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06
 
 
 
Summary:
 ・Reviewing OSPF network types
 ・Configuring OSPF
 ・Verifying OSPF neighbors and router IDs
 ・Verifying OSPF neighbors and router IDs
 ・Describing the need for virtual link
 ・Configuring virtual links
 ・Verifying end-to-end connectivity
 
 
后记:
 
        有一次配置这个实验的时候,遇到一个很奇怪的问题,就是配置好虚链路之后,在R2上面显示该链路是DOWN,而在R3上面显示是UP的。
下面是用来分析的错误信息:
R2#
*Mar 20 20:53:07.727: %OSPF-4-ERRRCV: Received invalid packet: mismatch area ID, from backbone area must be virtual-link but not found from 172.16.1.3, Ethernet1/1
 
R3#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router 2.2.2.2 is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet0/0, Cost of using 1
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
 
一开始不知道该怎么解决,在R2和R3上重新配置一次链路,还是显示这个信息,然后又SHOW 了一下R2的OSPF邻居,居然显示的是R3的192.168.1.3接口,估计是当初最初没有配置R3的回环接口,这样即使后来配置了也是没用。又想起邻居有生存时间间隔比较短暂,于是把R3关闭了,过了一会再重启,这样R2就能够重新学习到邻居,于是问题也就解决了。  
拓扑图如下:
(注:接口与实际接口不同,图片作为结构图参考)
 
 

你可能感兴趣的:(职场,休闲,ospf,ccnp)