ospf综合实验

 具体问题具体分析

R3-R5/6/7之间配置搭建一个MGRE环境,且R3为中心站点

这里我们需要配置隧道,注册中心,修改类型

网段划分

所有的设备可以访问R4的环回接口

通过配置NAT来访问R4的环回接口

减少LSA的更新量、加快收敛、保障更新安全

可以通过汇总来减少LSA的更新量

修改计时器来加快收敛

通过做认证保证数据

全网可达

通过协议和缺省实现路由信息的交互,两种协议之间可以通过ASBR设备来进行双向重发布传递路由

下面是路由器实际配置

R1

 sysname r1
#
interface GigabitEthernet0/0/0
 ip address 172.16.32.2 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$"L'f*dtHJL;)PiWW*Q1Cp4-L%$%$
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
 ip address 172.16.33.1 255.255.255.0 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  network 172.16.32.0 0.0.0.255 
  network 172.16.33.0 0.0.0.255 
  stub 

R2

 sysname r2
#
interface GigabitEthernet0/0/0
 ip address 172.16.32.3 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$luR7%xbWRGA'U$K!EZ:Np4p-%$%$
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
 ip address 172.16.34.1 255.255.255.0 
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.1 
  network 172.16.32.0 0.0.0.255 
  network 172.16.34.0 0.0.0.255 
  stub 

R3

 sysname r3
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255
#
interface Serial4/0/0
 link-protocol ppp
 ip address 34.0.0.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/0
 ip address 172.16.32.1 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$0Q@s$_9H.4e=_2O6+Z5!p3'T%$%$
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface LoopBack1
 ip address 172.16.1.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.1 255.255.255.0 
 tunnel-protocol gre p2mp
 source 34.0.0.1
 ospf network-type p2mp
 ospf timer hello 10
 nhrp entry multicast dynamic
 nhrp network-id 100
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
 area 0.0.0.1 
  abr-summary 172.16.32.0 255.255.224.0
  network 172.16.1.0 0.0.0.255 
  network 172.16.32.0 0.0.0.255 
  stub no-summary
#
ip route-static 0.0.0.0 0.0.0.0 34.0.0.2
ip route-static 172.16.32.0 255.255.224.0 NULL0

R4

 sysname isp
#
interface Serial2/0/0
 link-protocol ppp
 ip address 34.0.0.2 255.255.255.0 
#
interface Serial3/0/0
 link-protocol ppp
 ip address 54.0.0.2 255.255.255.0 
#
interface Serial4/0/0
 link-protocol ppp
 ip address 64.0.0.2 255.255.255.0 
#
interface GigabitEthernet0/0/0
 ip address 74.0.0.2 255.255.255.0 
#
interface LoopBack1
 ip address 4.4.4.4 255.255.255.0 

R5

 sysname r6
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface Serial4/0/0
 link-protocol ppp
 ip address 64.0.0.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/0
 ip address 172.16.64.1 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$jho.14lrb-Uq;N-HYL1Ip2>p%$%$
#
interface LoopBack1
 ip address 172.16.3.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.3 255.255.255.0 
 tunnel-protocol gre p2mp
 source Serial4/0/0
 ospf network-type p2mp
 ospf timer hello 10
 nhrp network-id 100
 nhrp entry 34.0.0.1 172.16.0.1 register
 nhrp entry 172.16.0.1 34.0.0.1 register
#
ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
  network 172.16.3.0 0.0.0.255 
 area 0.0.0.2 
  abr-summary 172.16.64.0 255.255.224.0
  network 172.16.64.0 0.0.0.255 
  nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 64.0.0.2
ip route-static 172.16.64.0 255.255.224.0 NULL0

R6

 sysname r7
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface GigabitEthernet0/0/0
 ip address 74.0.0.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/1
 ip address 172.16.96.1 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$3fA_*_|{{:c]_<VVd,R!p5<N%$%$
#
interface LoopBack1
 ip address 172.16.4.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.4 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 ospf timer hello 10
 nhrp network-id 100
 nhrp entry 34.0.0.1 172.16.0.1 register
 nhrp entry 172.16.0.1 34.0.0.1 register
#
ospf 1 router-id 7.7.7.7 
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
  network 172.16.4.0 0.0.0.255 
 area 0.0.0.3 
  abr-summary 172.16.96.0 255.255.224.0
  network 172.16.96.0 0.0.0.255 
  nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 74.0.0.2
ip route-static 172.16.96.0 255.255.224.0 NULL0

R7

 sysname r7
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface GigabitEthernet0/0/0
 ip address 74.0.0.1 255.255.255.0 
 nat outbound 2000
#
interface GigabitEthernet0/0/1
 ip address 172.16.96.1 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$3fA_*_|{{:c]_<VVd,R!p5<N%$%$
#
interface LoopBack1
 ip address 172.16.4.1 255.255.255.0 
#
interface Tunnel0/0/0
 ip address 172.16.0.4 255.255.255.0 
 tunnel-protocol gre p2mp
 source GigabitEthernet0/0/0
 ospf network-type p2mp
 ospf timer hello 10
 nhrp network-id 100
 nhrp entry 34.0.0.1 172.16.0.1 register
 nhrp entry 172.16.0.1 34.0.0.1 register
#
ospf 1 router-id 7.7.7.7 
 area 0.0.0.0 
  network 172.16.0.0 0.0.0.255 
  network 172.16.4.0 0.0.0.255 
 area 0.0.0.3 
  abr-summary 172.16.96.0 255.255.224.0
  network 172.16.96.0 0.0.0.255 
  nssa no-summary
#
ip route-static 0.0.0.0 0.0.0.0 74.0.0.2
ip route-static 172.16.96.0 255.255.224.0 NULL0

R8

 sysname r8
#
interface GigabitEthernet0/0/0
 ip address 172.16.96.2 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$=([@'V&aiEt~tE*Er\-Sp5-G%$%$
#
interface GigabitEthernet0/0/1
 ip address 172.16.97.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
 ip address 172.16.98.1 255.255.255.0 
#
ospf 1 router-id 8.8.8.8 
 area 0.0.0.3 
  network 172.16.0.0 0.0.255.255 
  nssa

R9

 sysname r9
#
interface GigabitEthernet0/0/0
 ip address 172.16.97.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 172.16.128.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
 ip address 172.16.129.1 255.255.255.0 
#
ospf 1 router-id 9.9.9.9 
 asbr-summary 172.16.128.0 255.255.224.0
 import-route ospf 2
 area 0.0.0.3 
  network 172.16.97.0 0.0.0.255 
  nssa
#
ospf 2 router-id 9.9.9.9 
 default-route-advertise always
 area 0.0.0.4 
  network 172.16.128.0 0.0.0.255 
  network 172.16.129.0 0.0.0.255 
#
ip route-static 172.16.128.0 255.255.224.0 NULL0

R10

 sysname r10
#
interface GigabitEthernet0/0/0
 ip address 172.16.128.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
 ip address 172.16.130.1 255.255.255.0 
#
ospf 1 router-id 10.10.10.10 
 area 0.0.0.4 
  network 172.16.128.0 0.0.0.255 
  network 172.16.130.0 0.0.0.255 

R11

 sysname r11
#
interface GigabitEthernet0/0/0
 ip address 172.16.64.2 255.255.255.0 
 ospf authentication-mode md5 1 cipher %$%$Ab[r/fObbML\>96r8)R<p3D#%$%$
#
interface GigabitEthernet0/0/1
 ip address 172.16.65.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack1
 ip address 172.16.66.1 255.255.255.0 
#
ospf 1 router-id 11.11.11.11 
 area 0.0.0.2 
  network 172.16.64.0 0.0.0.255 
  network 172.16.65.0 0.0.0.255 
  network 172.16.66.0 0.0.0.255 
  nssa

R12

 sysname r12
#
interface GigabitEthernet0/0/0
 ip address 172.16.65.2 255.255.255.0 
#
interface LoopBack1
 ip address 172.16.160.1 255.255.240.0 
#
interface LoopBack2
 ip address 172.16.176.1 255.255.240.0 
#
ospf 1 router-id 12.12.12.12 
 asbr-summary 172.16.160.0 255.255.224.0
 import-route rip 1
 area 0.0.0.2 
  network 172.16.65.0 0.0.0.255 
  nssa
#
rip 1
 version 2
 network 172.16.0.0
#
ip route-static 172.16.160.0 255.255.224.0 NULL0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
OSPF(开放最短路径优先)是一种用于路由的动态路由协议,它是根据路由器之间的链路状态来计算最短路径的。 在一个OSPF综合实验案例中,可以模拟一个复杂的网络拓扑,包括多个路由器和连接它们的链路。假设有5个路由器A、B、C、D和E,它们之间通过不同的链路相连。 首先,需要配置每个路由器上的OSPF进程,并为它们分配一个路由器ID。然后,在每个链路上配置正确的IP地址和子网掩码。接下来,通过在OSPF进程中启用不同的区域,将路由器分成不同的区域。 然后,需要配置每个路由器之间的OSPF邻居关系。这可以通过指定邻居的路由器ID和链路上的IP地址来完成。路由器之间的邻居关系建立后,它们将开始交换链路状态信息(LSA)。 每个路由器将根据接收到的LSA计算自己的链路状态数据库(LSDB)。然后,通过运行Dijkstra算法,每个路由器将计算出到达其他路由器的最短路径。最后,每个路由器将根据最短路径选择相应的接口进行路由。 在这个实验案例中,还可以模拟链路故障的情况,观察OSPF的快速收敛性。当某个链路出现故障时,路由器将发送通告信息给邻居,通知它们链路状态已经改变。邻居将更新自己的LSDB,并重新计算最短路径。 通过这个综合实验案例,可以深入了解OSPF协议的工作原理和功能。同时,还可以通过观察实验结果,了解OSPF网络中的优势和效率。这些知识和经验将帮助网络工程师更好地设计、优化和故障排除复杂的网络拓扑。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值