ospf综合大实验

拓扑图

实验要求

1、R4为ISP,其上只配置IP地址;R4与其他所直连设备间均使用公有IP;
2、R3-R5、R6、R7为MGRE环境,R3为中心站点;
3、整个OSPF环境IP基于172.16.0.0/16划分;除了R12有两个环回,其他路由器均有一个环回IP
4、所有设备均可访问R4的环回;
5、减少LSA的更新量,加快收敛,保障更新安全;
6、全网可达;

实验思路

1.路由规划(基于172.16.0.0/16划分)并配置内外网IP地址

area 0
总地址:172.16.0.0/19
用户地址:
172.16.0.0/24--P2P       
172.16.1.0/24--MA
172.16.2.0/24--R4
172.16.3.0/24--R5
172.16.4.0/24--R6(环回)
172.16.5.0/24--R7(环回)
172.16.6.0/24--隧道

area 1
总地址:172.16.32.0/19
用户地址:
172.16.32.0/24--P2P

172.16.33.0/24--MA

172.16.34.0/24--R1(环回)

172.16.35.0/24--R2(环回)

172.16.36.0/24--R3(环回)
area 2
总地址:172.16.64.0/19
用户地址:
172.16.64.0/24--P2P

172.16.65.8/24--MA

172.16.65.0/30

172.16.65.4/30
172.16.66.0/24--R11(环回)
area 3
总地址:172.16.96.0/19
用户地址:
172.16.96.0/24--P2P

172.16.97.0/24--MA

172.16.97.0/30

172.16.97.4/30
172.16.98.0/24--R8(环回)
area 4
总地址:172.16.128.8/19
用户地址:
172.16.128.0/24--P2P

172.16.129.0/24--MA

172.16.129.0/30
172.16.138.8/24--R9(环回)
172.16.131.8/24--R18(环回)
 

2.ip地址配置

R1

[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 172.16.33.1 24
[R1-GigabitEthernet0/0/0]int l0
[R1-LoopBack0]ip add 172.16.34.1 24
[R1]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.1/24       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.34.1/24       up         up(s)     
NULL0                             unassigned           up         up(s)     

R2

[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]ip add 172.16.33.2 24
[R2-GigabitEthernet0/0/0]int l0
[R2-LoopBack0]ip add 172.16.35.2 24
[R2-LoopBack0]q
[R2]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.2/24       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.35.2/24       up         up(s)     
NULL0                             unassigned           up         up(s)

R3

[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]ip add 172.16.33.3 24
[R3-GigabitEthernet0/0/0]int l0
[R3-LoopBack0]ip add 172.16.36.3 24
[R3-LoopBack0]int s 4/0/0
[R3-Serial4/0/0]ip add 34.0.0.3 24
[R3-Serial4/0/0]q
[R3]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 5
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 5
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.33.3/24       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.36.3/24       up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial1/0/0                       unassigned           down       down      
Serial1/0/1                       unassigned           down       down      
Serial4/0/0                       34.0.0.3/24          up         up        
Serial4/0/1                       unassigned           down       down 

R4

[R4]int s 4/0/0
[R4-Serial4/0/0]ip add 34.0.0.4 24
[R4-Serial4/0/0]int s 4/0/1
[R4-Serial4/0/1]ip add 45.0.0.4 24
[R4-Serial4/0/1]int s 3/0/0
[R4-Serial3/0/0]ip add 46.0.0.4 24
[R4-Serial3/0/0]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add 47.0.0.4 24
[R4-GigabitEthernet0/0/0]int l0
[R4-LoopBack0]ip add 172.16.2.4 24
[R4-LoopBack0]q
[R4]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 6
The number of interface that is DOWN in Physical is 7
The number of interface that is UP in Protocol is 6
The number of interface that is DOWN in Protocol is 7
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              47.0.0.4/24          up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.2.4/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial1/0/0                       unassigned           down       down      
Serial1/0/1                       unassigned           down       down      
Serial2/0/0                       unassigned           down       down      
Serial2/0/1                       unassigned           down       down      
Serial3/0/0                       46.0.0.4/24          up         up        
Serial3/0/1                       unassigned           down       down      
Serial4/0/0                       34.0.0.4/24          up         up        
Serial4/0/1                       45.0.0.4/24          up         up  

R5

[R5]int s 4/0/0
[R5-Serial4/0/0]ip add 45.0.0.5 24
[R5-Serial4/0/0]int l0
[R5-LoopBack0]ip add 172.16.3.5 24
[R5-LoopBack0]q
[R5]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 4
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 4
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              unassigned           down       down      
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.3.5/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       45.0.0.5/24          up         up        
Serial4/0/1                       unassigned           down       down 

R6

[R6]int s 4/0/0
[R6-Serial4/0/0]ip add 46.0.0.6 24
[R6-Serial4/0/0]int g 0/0/0
[R6-GigabitEthernet0/0/0]ip add 172.16.65.1 30
[R6-GigabitEthernet0/0/0]int l0
[R6-LoopBack0]ip add 172.16.4.6 24
[R6-LoopBack0]q
[R6]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 3
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 3
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.65.1/30       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.4.6/24        up         up(s)     
NULL0                             unassigned           up         up(s)     
Serial4/0/0                       46.0.0.6/24          up         up        
Serial4/0/1                       unassigned           down       down      

R7

[R7]int g 0/0/0
[R7-GigabitEthernet0/0/0]ip add 47.0.0.7 24
[R7-GigabitEthernet0/0/0]int g 0/0/1
[R7-GigabitEthernet0/0/1]ip add 172.16.97.1 30
[R7-GigabitEthernet0/0/1]int l0
[R7-LoopBack0]ip add 172.16.5.7 24
[R7-LoopBack0]q
[R7]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              47.0.0.7/24          up         up        
GigabitEthernet0/0/1              172.16.97.1/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.5.7/24        up         up(s)     
NULL0                             unassigned           up         up(s)     

R8

[R8]int g 0/0/0
[R8-GigabitEthernet0/0/0]ip add 172.16.97.2 30
[R8-GigabitEthernet0/0/0]int g 0/0/1 
[R8-GigabitEthernet0/0/1]ip add 172.16.97.5 30
[R8-GigabitEthernet0/0/1]int l0
[R8-LoopBack0]ip add 172.16.98.8 24
[R8-LoopBack0]q
[R8]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.97.2/30       up         up        
GigabitEthernet0/0/1              172.16.97.5/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.98.8/24       up         up(s)     
NULL0                             unassigned           up         up(s)

R9

[R9]int g 0/0/0
[R9-GigabitEthernet0/0/0]ip add 172.16.97.6 30
[R9-GigabitEthernet0/0/0]int g 0/0/1
[R9-GigabitEthernet0/0/1]ip add 172.16.128.1 30
[R9-GigabitEthernet0/0/1]int l0
[R9-LoopBack0]ip add 172.16.130.9 24
[R9-LoopBack0]q
[R9]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.97.6/30       up         up        
GigabitEthernet0/0/1              172.16.128.1/30      up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.130.9/24      up         up(s)     
NULL0                             unassigned           up         up(s)     


R10

[R10]int g 0/0/0
[R10-GigabitEthernet0/0/0]ip add 172.16.129.2 30
[R10-GigabitEthernet0/0/0]int l0
[R10-LoopBack0]ip add 172.16.131.10 24
[R10-LoopBack0]q
[R10]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.129.2/30      up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.131.10/24     up         up(s)     
NULL0                             unassigned           up         up(s)   

R11

[AR11-GigabitEthernet0/0/0]ip add 172.16.65.2 30.
[AR11-GigabitEthernet0/0/0]int g 0/0/1
[AR11-GigabitEthernet0/0/1]ip add 172.16.65.5 30
[AR11-GigabitEthernet0/0/1]int l0
[AR11-LoopBack0]ip add 172.16.66.11 24
[AR11-LoopBack0]q
[AR11]dis ip int b
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.65.2/30       up         up        
GigabitEthernet0/0/1              172.16.65.5/30       up         up        
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.66.11/24      up         up(s)     
NULL0                             unassigned           up         up(s)     

R12

[R12]int g 0/0/0
[R12-GigabitEthernet0/0/0]ip add 172.16.65.6 30
[R12-GigabitEthernet0/0/0]int l0
[R12-LoopBack0]ip add 172.16.160.12 24
[R12-LoopBack0]int l1
[R12-LoopBack1]ip add 172.16.161.12 24
[R12-LoopBack1]q
[R12]dis ip int b

*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 2
 
Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.65.6/30       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
GigabitEthernet0/0/2              unassigned           down       down      
LoopBack0                         172.16.160.12/24     up         up(s)     
LoopBack1                         172.16.161.12/24     up         up(s)     
NULL0                             unassigned           up         up(s)     

3.在R3-R5-R6-R7上配置缺省指向公网R4

[R3]ip route-static 0.0.0.0 0 34.0.0.4 

[R5]ip route-static 0.0.0.0 0 45.0.0.4

[R6]ip route-static 0.0.0.0 0 46.0.0.4

[R7]ip route-static 0.0.0.0 0 47.0.0.4 

4.配置MGRE R3作为中心站点 R5-R6-R7作为分支站点

R3

[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ip add 172.16.6.3 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source s4/0/0
[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry multicast dynamic

R5

[R5]int Tunnel 0/0/0
[R5-Tunnel0/0/0]ip add 172.16.6.5 24
[R5-Tunnel0/0/0]tunnel-protocol gre p2mp
[R5-Tunnel0/0/0]source s 4/0/0
[R5-Tunnel0/0/0]nhrp network-id 100
[R5-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

R6

[R6]int Tunnel 0/0/0
[R6-Tunnel0/0/0]ip add 172.16.6.6 24
[R6-Tunnel0/0/0]tunnel-protocol gre p2mp
[R6-Tunnel0/0/0]source s4/0/0
[R6-Tunnel0/0/0]nhrp network-id 100
[R6-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

R7

[R7]int Tunnel 0/0/0
[R7-Tunnel0/0/0]ip add 172.16.6.7 24
[R7-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R7-Tunnel0/0/0]source g 0/0/0
[R7-Tunnel0/0/0]nhrp network-id 100
[R7-Tunnel0/0/0]nhrp entry 172.16.6.3 34.0.0.3 register

5.启用ospf协议并优化路由(减少路由条目)

R1

[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]a 1
[R1-ospf-1-area-0.0.0.1]network 172.16.33.0 0.0.0.255 
[R1-ospf-1-area-0.0.0.1]network 172.16.34.0 0.0.0.255
[R1-ospf-1-area-0.0.0.1]stub no-summary

R2

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]a 1
[R2-ospf-1-area-0.0.0.1]net 172.16.33.0 0.0.0.255
[R2-ospf-1-area-0.0.0.1]net 172.16.35.0 0.0.0.255
[R2-ospf-1-area-0.0.0.1]stub no-summary

R3

[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]a 1
[R3-ospf-1-area-0.0.0.1]net 172.16.33.3 0.0.0.0
[R3-ospf-1-area-0.0.0.1]net 172.16.36.0 0.0.0.255
[R3-ospf-1-area-0.0.0.1]stub no-summary 

R5

[R5]ospf 1 router-id 5.5.5.5
[R5-ospf-1]a 0
[R5-ospf-1-area-0.0.0.0]net 172.16.3.0 0.0.0.255

R6

[R6]ospf 1 router-id 6.6.6.6
[R6-ospf-1]a 2
[R6-ospf-1-area-0.0.0.2]net 172.16.65.1 0.0.0.0
[R6-ospf-1-area-0.0.0.2]nssa no-summary
[R6-ospf-1-area-0.0.0.2]q
[R6-ospf-1]a 0
[R6-ospf-1-area-0.0.0.0]net 172.16.4.0 0.0.0.255

R7

[R7]ospf 1 router-id 7.7.7.7
[R7-ospf-1]a 3
[R7-ospf-1-area-0.0.0.3]net 172.16.97.1 0.0.0.0
[R7-ospf-1-area-0.0.0.3]nssa no-summary
[R7-ospf-1-area-0.0.0.3]q
[R7-ospf-1]a 0
[AR7-ospf-1-area-0.0.0.0]net 172.16.5.0 0.0.0.255

R8

[R8]ospf 1 router-id 8.8.8.8
[R8-ospf-1]a 3
[R8-ospf-1-area-0.0.0.3]net 172.16.97.2 0.0.0.0
[R8-ospf-1-area-0.0.0.3]net 172.16.97.5 0.0.0.0
[R8-ospf-1-area-0.0.0.3]net 172.16.98.0 0.0.0.255
[R8-ospf-1-area-0.0.0.3]nssa no-summary

R9

[R9]ospf 1 router-id 9.9.9.9
[R9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0
[R9-ospf-1-area-0.0.0.3]nssa no-summary
[R9-ospf-1]a 3
[R9-ospf-1-area-0.0.0.3]net 172.16.97.6 0.0.0.0
[R9]ospf 2 router-id 9.9.9.9
[R9-ospf-2]a 4
[R9-ospf-2-area-0.0.0.4]net 172.16.129.1 0.0.0.0
[R9-ospf-2-area-0.0.0.4]net 172.16.130.0 0.0.0.255


R9(将进程1和进程2互相发布到对方的OSPF进程中)

[R9]ospf 1	
[R9-ospf-1]import-route ospf 2
[R9-ospf-1]q
[R9]ospf 2	
[R9-ospf-2]import-route ospf 1


R9(发缺省:area 4 进入R9进程2 删掉进程1 发一条缺省给R10)

[R9-ospf-2]default-route-advertise

注:解决路由表中缺少area 4的问题

 R10

[R10]ospf 2 r	
[R10]ospf 2 router-id 10.10.10.10
[R10-ospf-2]a 4
[R10-ospf-2-area-0.0.0.4]net 172.16.129.2 0.0.0.0
[R10-ospf-2-area-0.0.0.4]net 172.16.131.0 0.0.0.255

R11

[R11]ospf 1 router-id 11.11.11.11
[R11-ospf-1]a 2
[R11-ospf-1-area-0.0.0.2]net 172.16.65.2 0.0.0.0
[R11-ospf-1-area-0.0.0.2]net 172.16.65.5 0.0.0.0
[R11-ospf-1-area-0.0.0.2]nssa no-summary

R12

[R12]ospf 1 router-id 12.12.12.12
[R12-ospf-1]a 2
[R12-ospf-1-area-0.0.0.2]net 172.16.65.6 0.0.0.0
R12配置rip
[R12]rip 1
[R12-rip-1]v 2
[R12-rip-1]undo summary
[R12-rip-1]net 172.16.0.0
重发rip到ospf上,优化R12的ospf配置
[R12]ospf 1
[R12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0


[R12-ospf-1]import-route rip 1


[R12-ospf-1]a 2
[R12-ospf-1-area-0.0.0.2]nssa no-summary

6.在MGRE和内网启用OSPF协议进行宣告

R3

[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ospf network-type broadcast

R5

[R5]int Tunnel 0/0/0
[R5-Tunnel0/0/0]ospf network-type broadcast
[R5-Tunnel0/0/0]ospf dr-priority 0

R6

[R6]int Tunnel 0/0/0
[R6-Tunnel0/0/0]ospf network-type broadcast
[R6-Tunnel0/0/0]ospf dr-priority 0

R7

[R7]int Tunnel 0/0/0
[R7-Tunnel0/0/0]ospf network-type broadcast
[R7-Tunnel0/0/0]ospf dr-priority 0

7、配置NULL 0接口防环

R3

[R3]ip route-static 172.16.32.0 19 NULL 0

R6

[R6]ip route-static 172.16.64.0 19 NULL 0

R7

[R7]ip route-static 172.16.96.0 19 NULL 0

R9

[R9]ip route-static 172.16.128.0 19 NULL 0

R12 

[R12]ip route-static 172.16.160.0 19 NULL 0

8、配置NAT

R3

[R3]acl 2000
[R3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R3-acl-basic-2000]q
[R3]int Serial 4/0/0
[R3-Serial4/0/0]nat outbound 2000

R6

[R6]acl 2000
[R6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R6-acl-basic-2000]q
[R6]int Serial 4/0/0
[R6-Serial4/0/0]nat outbound 2000

R7

[R7]acl 2000
[R7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[R7-acl-basic-2000]q
[R7]int GigabitEthernet 0/0/0
[R7-GigabitEthernet0/0/0]nat outbound 2000

 9、OSPF认证

[R1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456 
[R2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[R3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[R3-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 123456
[R5-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 123456
[R6-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 123456
[R6-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 123456
[R7-ospf-1-area-0.0.0.0]authentication-mode md5 1 cipher 123456
[R7-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 123456
[R9-ospf-1-area-0.0.0.3]authentication-mode md5 1 cipher 123456
[R9-ospf-2-area-0.0.0.4]authentication-mode md5 1 cipher 123456
[R10-ospf-1-area-0.0.0.4]authentication-mode md5 1 cipher 123456
[R11-ospf-1-area-0.0.0.2]authentication-mode md5 1 cipher 123456
[R12-GigabitEthernet0/0/0]ospf authentication-mode md5 1 cipher 123456

10.加快收敛

1.减少计时时间

[R3]int Tunnel 0/0/0
[R3-Tunnel0/0/0]ospf timer hello 10
[R5]int t 0/0/0	
[R5-Tunnel0/0/0]ospf timer hello 10
[R6]int t 0/0/0
[R6-Tunnel0/0/0]ospf timer hello 10
[R7]int t 0/0/0
[R7-Tunnel0/0/0]ospf timer hello 10

11.实验测试

查看路由表

至此实验结束

  • 8
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
OSPF路由综合实验是一个实验,旨在综合运用OSPF协议和相关配置,实现路由的建立和通信。 在实验中,可以手动指定Router ID,也可以使用随机生成的Router ID。当指定Router ID时,可以优先选择具有Loopback口的Router ID,或选择网段较大的Router ID。 [1] 在OSPF中,有五种报文用于实现邻居发现和路由更新:hello报文(用于打招呼),dd报文(用于本地概要),lsr报文(用于请求更新),lsu报文(用于向对方发送对方需要的LSA),lsack报文(用于确认)。在与邻居建立初始连接时,邻居的状态为"int",之后会变为"two-way"或"full"。 [1] 在进行OSPF协议配置时,可以通过命令行配置路由器的Router ID,如[R1ospf 1 router-id 1.1.1.1。同时,可以将路由器划分到指定的区域(area),如[R1-ospf-1area 1。可以通过配置网络地址来告知OSPF协议管理的网络范围,如[R1-ospf-1-area-0.0.0.1network 172.16.0.0 0.0.255.255。 [2] 在OSPF路由建立后,可以进行通信测试。在测试中,可能会发现可以PING通某些目标地址(如4.4.4.4),但无法PING通其他目标地址(如192.168.0.0和34.0.0.3),这是因为缺少返回的路由。解决这个问题的方法有多种:可以配置静态路由,也可以在R4上注入直连路由,还可以通过动态发布缺省路由。其中,后两种方法的实现原理相同,都是通过OSPF协议来传递路由信息。具体的配置命令可以是ospf 1 import-route direct或ospf 1 default-route-advertise。 [3] 综合实验的目的是通过综合运用OSPF协议和相关配置,实现路由的建立和通信。通过不断实践和调试,可以提高对OSPF协议和网络路由的理解和应用能力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

艾44

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值