CCNP——OSPF——基本配置

实验环境:GNS3 

备注:用wireshark在点到点链路上抓取OSPF的Hello、DBD、LSR、LSU、LSAck数据报文

CCNP——OSPF——基本配置_第1张图片 单区域 OSPF基本配置

 

R1配置如下:

R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface serial 1/0
R1(config-if)#ip address 212.102.11.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#
*Mar  1 00:17:22.267: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down

R1(config-if)#exit
R1(config)#int f0/1
R1(config-if)#ip add 192.168.0.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
*Mar  1 00:59:53.295: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar  1 00:59:54.295: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

R1(config)#int f0/0
R1(config-if)#ip add 10.0.0.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#
*Mar  1 01:00:11.831: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 01:00:12.831: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#exit

R1(config)#router ospf 110
R1(config-router)#network 10.0.0.0 0.0.0.255 area 0
R1(config-router)#network 192.168.0.0 0.0.0.255 area 0
R1(config-router)#network 212.102.11.0 0.0.0.255 area 0
R1(config-router)#
*Mar  1 01:03:29.999: %OSPF-5-ADJCHG: Process 110, Nbr 192.168.1.1 on FastEthernet0/0 from LOADING to FULL, Loading Done
R1(config-router)#
*Mar  1 01:06:22.267: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R1(config-router)#
*Mar  1 01:06:28.047: %OSPF-5-ADJCHG: Process 110, Nbr 172.13.1.1 on Serial1/0 from LOADING to FULL, Loading Done
R1(config-router)#

R2配置如下

R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int f0/1
R2(config-if)#ip add 192.168.1.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
*Mar  1 01:02:35.071: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar  1 01:02:36.071: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up


R2(config)#int f0/0
R2(config-if)#ip add 10.0.0.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
*Mar  1 01:02:54.227: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 01:02:55.227: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

R2(config)#router ospf 110
R2(config-router)#router-id 2.2.2.2  
R2(config-router)#network 192.168.1.0 0.0.0.255 area 0
R2(config-router)#network 10.0.0.0 0.0.0.255 area 0   
R2(config-router)#

R3配置如下:

R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#int lo 0
R3(config-if)#ip add 172.13.1.1 255.255.255.0
R3(config-if)#exit
*Mar  1 01:05:03.155: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R3(config)#int s1/0
R3(config-if)#ip add 212.102.11.2 255.255.255.0
R3(config-if)#clock rate 64000
R3(config-if)#no shut
R3(config-if)#exit
*Mar  1 01:06:08.515: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar  1 01:06:09.515: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up

R3(config)#router ospf 110
R3(config-router)#network 212.102.11.0 0.0.0.255 area 0
R3(config-router)#
*Mar  1 01:06:27.579: %OSPF-5-ADJCHG: Process 110, Nbr 212.102.11.1 on Serial1/0 from LOADING to FULL, Loading Done

PC1配置如下:

PC-1> ip 192.168.0.2 255.255.255.0 192.168.0.1
Checking for duplicate address...
PC1 : 192.168.0.2 255.255.255.0 gateway 192.168.0.1

pc2配置如下:

PC-2> ip 192.168.1.2 255.255.255.0 192.168.1.1
Checking for duplicate address...
PC1 : 192.168.1.2 255.255.255.0 gateway 192.168.1.1

检测结果和说明:(未完待续)

 

你可能感兴趣的:(CCNP,OSPF基础)