寒假HCIP OSPF综合实验

一,地址规划

172.16.0.0  /19 ---area 0
 
172.16.0.0   /25  172.16.0.128 /25  172.16.1.0 /25  172.16.1.128/25....172.16.31.128  
 
172.16.0.0  /25     p2p 骨干  172.16.0.0/30  172.16.0.4/30
 
172.16.0.128 /25    MA 骨干   172.16.0.128 /29  --MGRE   172.16.0.136/29   
 
 
 
172.16.32.0  /19---area 1    
 
172.16.64.0  /19--- area 2
 
172.16.96.0  /19--- area3
 
172.16.128.0  /19---area 4
 
172.16.160.0  /19---rip   172.16.160.0/20    172.16.176.0/20   
 
 
172.16.192.0  /19
                          -----备用
172.16.224.0  /19

二,在R3--R5/R6/R7配置MGRE

R3:
#
interface LoopBack0
 ip address 172.16.34.1 255.255.255.128 
#
interface GigabitEthernet0/0/2
 ip address 43.1.1.1 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 43.1.1.2    ----缺省
 
#
interface Tunnel0/0/0
 ip address 172.16.0.129 255.255.255.248 
 tunnel-protocol gre p2mp
 source 43.1.1.1
 ospf network-type broadcast    ---修改默认点到点类型为broadcast 
 nhrp entry multicast dynamic
 nhrp network-id 100
 
R4:
 
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.0 
#
interface GigabitEthernet0/0/0
 ip address 43.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 45.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 46.1.1.1 255.255.255.0 
#
interface GigabitEthernet4/0/0
 ip address 47.1.1.1 255.255.255.0 
 
R5:
 
#
interface LoopBack0
 ip address 172.16.1.1 255.255.255.128 
#
interface GigabitEthernet0/0/0
 ip address 45.1.1.2 255.255.255.0 
#
ip route-static 0.0.0.0 0.0.0.0 45.1.1.1
#
interface Tunnel0/0/0
 ip address 172.16.0.130 255.255.255.248 
 tunnel-protocol gre p2mp
 source 45.1.1.2
 ospf network-type broadcast    ---修改默认点到点类型为broadcast 
 ospf dr-priority 0      -----修改DR优先级为0,不参与选举,使DR为R3
 nhrp network-id 100
 nhrp entry 172.16.0.129 43.1.1.1 register
 
R6:
 
#
interface LoopBack0
 ip address 172.16.1.129 255.255.255.128 
#
interface GigabitEthernet0/0/0
 ip address 46.1.1.2 255.255.255.0 
#
ip route-static 0.0.0.0 0.0.0.0 46.1.1.1
#
interface Tunnel0/0/0
 ip address 172.16.0.131 255.255.255.248 
 tunnel-protocol gre p2mp
 source 46.1.1.2
 ospf network-type broadcast ---修改默认点到点类型为broadcast 
 ospf dr-priority 0    -----修改DR优先级为0,不参与选举,使DR为R3
 nhrp network-id 100
 nhrp entry 172.16.0.129 43.1.1.1 register
 
R7:
 
#
interface LoopBack0
 ip address 172.16.2.1 255.255.255.128 
#
interface GigabitEthernet0/0/0
 ip address 47.1.1.2 255.255.255.0 
#
ip route-static 0.0.0.0 0.0.0.0 47.1.1.1
#
interface Tunnel0/0/0
 ip address 172.16.0.132 255.255.255.248 
 tunnel-protocol gre p2mp
 source 47.1.1.2
 ospf network-type broadcast ---修改默认点到点类型为broadcast 
 ospf dr-priority 0     -----修改DR优先级为0,不参与选举,使DR为R3
 nhrp network-id 100
 nhrp entry 172.16.0.129 43.1.1.1 register

三、配置OSPF和RIP

 
R1:
 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  network 172.16.0.0 0.0.255.255 
 
R2:
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.1 
  network 172.16.0.0 0.0.255.255 
 
R3:
 
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 172.16.0.129 0.0.0.0 
 area 0.0.0.1 
  network 172.16.32.0 0.0.3.255 
 
R5:
 
#
ospf 1 router-id 5.5.5.5 
 area 0.0.0.0 
  network 172.16.0.0 0.0.255.255 
 
R6:
 
#
ospf 1 router-id 6.6.6.6 
 area 0.0.0.0 
  network 172.16.0.0 0.0.1.255 
 area 0.0.0.2 
  network 172.16.64.1 0.0.0.0 
 
R7:
 
ospf 1 router-id 7.7.7.7 
 area 0.0.0.0 
  network 172.16.0.0 0.0.3.255 
 area 0.0.0.3 
  network 172.16.96.1 0.0.0.0 
 
 
R8:
 
#
ospf 1 router-id 8.8.8.8 
 area 0.0.0.3 
  network 172.16.0.0 0.0.255.255 
 
R9:
 
#
ospf 1 router-id 9.9.9.9 
 area 0.0.0.3 
  network 172.16.96.6 0.0.0.0 
 area 0.0.0.4 
  network 172.16.128.0 0.0.1.255 
 
R10:
 
#
ospf 1 router-id 10.10.10.10 
 area 0.0.0.4 
  network 172.16.0.0 0.0.255.255
 
 
R11:
 
#
ospf 1 router-id 11.11.11.11 
 area 0.0.0.2 
  network 172.16.0.0 0.0.255.255 
 
 
R12:
#
ospf 1 router-id 12.12.12.12 
 area 0.0.0.2 
  network 172.16.64.6 0.0.0.0 
#
rip 1
 version 2
 network 172.16.0.0

四,重发布

R9:
 
首先我们需要删除之前在R9上配置的area 4的ospf1进程
 
#
ospf 2 
 area 0.0.0.4 
  network 172.16.128.0 0.0.1.255 
 
#
ospf 1
 
import-route ospf 2    ----将进程2宣告给进程1
 
 
R12:
 
将RIP宣告进ospf 1 进程
 
#
ospf 1
 
import-route rip 1

五、路由汇总

区域间路由汇总
 
R3:
 
#
ospf 1 
 area 1 
  abr-summary 172.16.32.0 255.255.224.0
  
 
R6:
 
#
ospf 1 
 area 2 
  abr-summary 172.16.64.0 255.255.224.0
  
 
R7:
 
#
ospf 1 
 area 3 
  abr-summary 172.16.96.0 255.255.224.0
  
 
区域外路由汇总
 
R9:
 
#
ospf 1 
area 3 
 asbr-summary 172.16.128.0 255.255.224.0
 
 
rip路由汇总
 
R12:
 
ospf 1
area 2 
 asbr-summary 172.16.160.0 255.255.224.0
 
 
 六、配置缺省路由

area 1 完全末梢
 
R1:
 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.1 
  stub 
 
 
R2:
 
#
ospf 1 router-id 2.2.2.2
 area 0.0.0.1 
  stub 
 
R3:
 
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.1 
  stub no-summary
 
 
area 2   完全nssa
 
R6:
 
#
ospf 1 router-id 6.6.6.6 
 area 0.0.0.2 
  nssa no-summary
 
R11:
 
#
ospf 1 router-id 11.11.11.11
 area 0.0.0.2 
  nssa
 
r12:
 
#
ospf 1 router-id 12.12.12.12
 area 0.0.0.2 
  nssa
 
 
area 3  完全nssa
 
R7:
#
ospf 1 router-id 7.7.7.7 
 area 0.0.0.3 
  nssa no-summary
 
R8:
 
#
ospf 1 router-id 8.8.8.8 
 area 0.0.0.3 
  nssa
 
R9:
 
#
ospf 1 router-id 9.9.9.9
 area 0.0.0.3 
  nssa
 
 
R9-OSPF 缺省指向R10
 
 
R9:
#
ospf 2 
 default-route-advertise
 
 七、NAT

R3:
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
 
#
interface GigabitEthernet0/0/2
 nat outbound 2000
 
 
R6:
 
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
 
#
interface GigabitEthernet0/0/0
 nat outbound 2000
 
 
 
R7:
 
#
acl number 2000  
 rule 5 permit source 172.16.0.0 0.0.255.255 
 
#
interface GigabitEthernet0/0/0
 nat outbound 2000

八、设置防环空接口

设置空接口
 
R3:
 
#
ip route-static 172.16.32.0 255.255.224.0 NULL0
 
R6:
 
#
ip route-static 172.16.64.0 255.255.224.0 NULL0
 
R7:
 
#
ip route-static 172.16.96.0 255.255.224.0 NULL0
 
R9:
 
#
ip route-static 172.16.128.0 255.255.224.0 NULL0
 
R12:
 
#
ip route-static 172.16.160.0 255.255.224.0 NULL0
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值