OSPF实验作业

1.拓扑信息

2.需求分析

1.R4为ISP,其上只能配置IP地址 R4与其他所有直连设备间均使用共有IP

  isp只配置网络IP

2.R3-R5/6/7为MGRE环境,R3位中心站点

  使用非shortcut方式

3.整个OSPF环境IP基于172.16.0.0/16划分

4.所有设备均可以访问R4的环回

   需要做nat

5.减少LSA的更新数量,加快收敛,保障更新安全

   做认证

   ospf优化

6.全网可达

3.配置

配IP与空接口

r1:

<Huawei>sys

[Huawei]sys r1

[r1]int g0/0/0

[r1-GigabitEthernet0/0/0]ip add 172.16.16.1 29

[r1-GigabitEthernet0/0/0]int l 0

[r1-LoopBack0]ip add 172.16.17.1 24

r2:

<Huawei>sys

[Huawei]sys r2

[r2]int g0/0/0

[r2-GigabitEthernet0/0/0]ip add 172.16.16.2 29

[r2-GigabitEthernet0/0/0]int l 0

[r2-LoopBack0]ip add 172.16.18.1 24

r3:

<Huawei>sys

[Huawei]sys r3

[r3]int g0/0/0

[r3-GigabitEthernet0/0/0]ip add 172.16.16.3 29

[r3-GigabitEthernet0/0/0]int l 0

[r3-LoopBack0]ip add 172.16.19.1 24

[r3-LoopBack0]int s4/0/0

[r3-Serial4/0/0]ip add 34.0.0.3 24

r4:

<Huawei>sys

[Huawei]sys r4

[r4]int g0/0/0

[r4-GigabitEthernet0/0/0]ip add 47.0.0.4 24

[r4-GigabitEthernet0/0/0]int s4/0/0

[r4-Serial4/0/0]ip add 34.0.0.4 24

[r4-Serial4/0/0]int s4/0/1

[r4-Serial4/0/1]ip add 45.0.0.4 24

[r4-Serial4/0/1]int s3/0/0

[r4-Serial3/0/0]ip add 46.0.0.4 24

[r4-Serial3/0/0]int l 0

[r4-LoopBack0]ip add 4.4.4.4 32

r5:

<Huawei>sys

[Huawei]sys r5

[r5]int s4/0/0

[r5-Serial4/0/0]ip add 45.0.0.5 24

[r5-Serial4/0/0]int l 0

[r5-LoopBack0]ip add 172.16.1.1 24

r6:

<Huawei>sys

[Huawei]sys r6

[r6]int s4/0/0

[r6-Serial4/0/0]ip add 46.0.0.6 24

[r6-Serial4/0/0]int g0/0/0

[r6-GigabitEthernet0/0/0]ip add 172.16.33.1 30

[r6-GigabitEthernet0/0/0]int l 0

[r6-LoopBack0]ip add 172.16.2.1 24

r7:

<Huawei>sys

[Huawei]sys r7

[r7]int g0/0/0

[r7-GigabitEthernet0/0/0]ip add 47.0.0.7 24

[r7-GigabitEthernet0/0/0]int l 0

[r7-LoopBack0]ip add 172.16.3.1 24

[r7-LoopBack0]int g0/0/1

[r7-GigabitEthernet0/0/1]ip add 172.16.49.1 30

r8:

<Huawei>sys

[Huawei]sys r8

[r8]int g0/0/0

[r8-GigabitEthernet0/0/0]ip add 172.16.49.2 30

[r8-GigabitEthernet0/0/0]int g0/0/1

[r8-GigabitEthernet0/0/1]ip add 172.16.49.5 30

[r8-GigabitEthernet0/0/1]int l 0

[r8-LoopBack0]ip add 172.16.48.1 24

r9:

<Huawei>sys

[Huawei]sys r9

[r9]int g0/0/0

[r9-GigabitEthernet0/0/0]ip add 172.16.49.6 30

[r9-GigabitEthernet0/0/0]int l 0

r9-LoopBack0]ip add 172.16.64.1 24

[r9-LoopBack0]int g0/0/1

[r9-GigabitEthernet0/0/1]ip add 172.16.66.1 30

r10:

<Huawei>sys

[Huawei]sys r10

[r10]int g0/0/0

[r10-GigabitEthernet0/0/0]ip add 172.16.66.2 30

[r10-GigabitEthernet0/0/0]int l 0

[r10-LoopBack0]ip add 172.16.65.1 24

r11:

<Huawei>sys

[Huawei]sys r11

[r11]int g0/0/0

[r11-GigabitEthernet0/0/0]ip add 172.16.33.2 30

[r11-GigabitEthernet0/0/0]int g0/0/1

[r11-GigabitEthernet0/0/1]ip add 172.16.33.5 30

[r11-GigabitEthernet0/0/1]int l 0

[r11-LoopBack0]ip add 172.16.32.1 24

r12:

<Huawei>sys

[Huawei]sys r12

[r12]int g0/0/0

[r12-GigabitEthernet0/0/0]ip add 172.16.33.6 30

[r12-GigabitEthernet0/0/0]int l 0

[r12-LoopBack0]ip add 172.16.128.1 18

[r12-LoopBack0]int l 1

[r12-LoopBack1]ip add 172.16.192.1 18

R3567的MGRE环境

R3:

[r3]int t0/0/0

[r3-Tunnel0/0/0]ip add 172.16.0.1 24

[r3-Tunnel0/0/0]tunnel-protocol gre p2mp

[r3-Tunnel0/0/0]source 34.0.0.3

[r3-Tunnel0/0/0]nhrp entry multicast dynamic

[r3]ip route-static 0.0.0.0 0 34.0.0.4

R5:

[r5]int t0/0/0

[r5-Tunnel0/0/0]ip add 172.16.0.2 24

[r5-Tunnel0/0/0]tunnel-protocol gre p2mp

[r5-Tunnel0/0/0]source Serial 4/0/0

[r5-Tunnel0/0/0]nhrp entry 172.16.0.1 34.0.0.3 register

[r5]ip route-static 0.0.0.0 0 45.0.0.4

R6:

[r6]int t0/0/0

[r6-Tunnel0/0/0]ip add 172.16.0.3 24

[r6-Tunnel0/0/0]tunnel-protocol gre p2mp

[r6-Tunnel0/0/0]source Serial 4/0/0

[r6-Tunnel0/0/0]nhrp entry 172.16.0.1 34.0.0.3 register

[r6]ip route-static 0.0.0.0 0 46.0.0.4

R7:

[r7]int t0/0/0

[r7-Tunnel0/0/0]ip add 172.16.0.4 24

[r7-Tunnel0/0/0]tunnel-protocol gre p2mp

[r7-Tunnel0/0/0]source GigabitEthernet 0/0/0

[r7-Tunnel0/0/0]nhrp entry 172.16.0.1 34.0.0.3 register

[r7]ip route-static 0.0.0.0 0 47.0.0.4

OSPF进程启动

aera0:

R3:

[r3]ospf 1 router-id 3.3.3.3

[r3-ospf-1]area 0

[r3-ospf-1-area-0.0.0.0]network 172.16.0.1 0.0.0.0

改p2mp类型

[r3-ospf-1-area-0.0.0.0]int t0/0/0

[r3-Tunnel0/0/0]ospf network-type p2mp

减少Hello时间与死亡时间

[r3-Tunnel0/0/0]ospf timer hello 1

将环回类型(主机)改为broadcast 

[r6]int l 0

[r6-LoopBack0]ospf network-type broadcast

R5:

[r5]ospf 1 router-id 5.5.5.5

[r5-ospf-1]area 0

[r5-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.255.255

改p2mp类型

[r5-ospf-1-area-0.0.0.0]int t0/0/0

[r5-Tunnel0/0/0]ospf network-type p2mp

减少Hello时间与死亡时间

[r5-Tunnel0/0/0]ospf timer hello 1

R6:

[r6]ospf 1 router-id 6.6.6.6

[r6-ospf-1]area 0

[r6-ospf-1-area-0.0.0.0]network 172.16.0.3 0.0.0.0

[r6-ospf-1-area-0.0.0.0]network 172.16.2.1 0.0.0.0

改p2mp类型

[r6-ospf-1-area-0.0.0.0]int t0/0/0

[r6-Tunnel0/0/0]ospf network-type p2mp

减少Hello时间与死亡时间

[r6-Tunnel0/0/0]ospf timer hello 1

R7:

[r7]ospf 1 router-id 7.7.7.7

[r7-ospf-1]area 0

[r7-ospf-1-area-0.0.0.0]network 172.16.0.0 0.15.255.255

改p2mp类型

[r7-ospf-1-area-0.0.0.0]int t0/0/0

[r7-Tunnel0/0/0]ospf network-type p2mp

减少Hello时间与死亡时间

[r7-Tunnel0/0/0]ospf timer hello 1

area1:

R1:

[r1]ospf 1 router-id 1.1.1.1

[r1-ospf-1]area 1

[r1-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255

减少Hello时间与死亡时间

[r1]int g0/0/0

[r1-GigabitEthernet0/0/0]ospf timer hello 1

R2:

[r2]ospf 1 router-id 2.2.2.2

[r2-ospf-1]area 1

[r2-ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255

减少Hello时间与死亡时间

[r2]int g0/0/0

[r2-GigabitEthernet0/0/0]ospf timer hello 1

R3:

[r3]ospf 1

[r3-ospf-1]area 1

[r3-ospf-1-area-0.0.0.1]network 172.16.16.0 0.15.255.255

减少Hello时间与死亡时间

[r3]int g0/0/0

[r3-GigabitEthernet0/0/0]ospf timer hello 1

area2:

R6:

[r6]ospf 1

[r6-ospf-1]area 2

[r6-ospf-1-area-0.0.0.2]network 172.16.33.1 0.0.0.0

减少Hello时间与死亡时间

[r6]int g0/0/0

[r6-GigabitEthernet0/0/0]ospf timer hello 1

R11:

[r11]ospf 1 router-id 11.11.11.11

[r11-ospf-1]area 2

[r11-ospf-1-area-0.0.0.2]network 0.0.0.0 255.255.255.255

减少Hello时间与死亡时间

[r11]int g0/0/0

[r11-GigabitEthernet0/0/0]ospf timer hello 1

[r11-GigabitEthernet0/0/0]int g0/0/1

[r11-GigabitEthernet0/0/1]ospf timer hello 1

R12:

[r12]ospf 1 router-id 12.12.12.12

[r12-ospf-1]area 2

[r12-ospf-1-area-0.0.0.2]network 172.16.33.6 0.0.0.0

减少Hello时间与死亡时间

[r12]int g0/0/0

[r12-GigabitEthernet0/0/0]ospf timer hello 1

起RIP

[r12-ospf-1-area-0.0.0.2]q

[r12-ospf-1]q

[r12]rip 1

[r12-rip-1]ver 2

[r12-rip-1]undo summary

[r12-rip-1]network 172.16.0.0

area3:

R7:

[r7]ospf 1

[r7-ospf-1]area 3

[r7-ospf-1-area-0.0.0.3]network 172.16.49.1 0.0.0.0

减少Hello时间与死亡时间

[r7]int g0/0/1

[r7-GigabitEthernet0/0/1]ospf timer hello 1

R8:

[r8]ospf 1 router-id 8.8.8.8

[r8-ospf-1]area 3

[r8-ospf-1-area-0.0.0.3]network 0.0.0.0 255.255.255.255

减少Hello时间与死亡时间

[r8]int g0/0/0

[r8-GigabitEthernet0/0/0]ospf timer hello 1

[r8]int g0/0/1

[r8-GigabitEthernet0/0/1]ospf timer hello 1

R9:

[r9]ospf 1 router-id 9.9.9.9

[r9-ospf-1]area 3

[r9-ospf-1-area-0.0.0.3]network 172.16.49.6 0.0.0.0

减少Hello时间与死亡时间

[r9]int g0/0/0

[r9-GigabitEthernet0/0/0]ospf timer hello 1

area4:

R9:

[r9]ospf 2 router-id 9.9.9.9

[r9-ospf-2]area 4

[r9-ospf-2-area-0.0.0.4]network 172.16.64.0 0.15.255.255

减少Hello时间与死亡时间

[r9-GigabitEthernet0/0/0]int g0/0/1

[r9-GigabitEthernet0/0/1]ospf timer hello 1

R10:

[r10]ospf 1 router-id 10.10.10.10

[r10-ospf-1]area 4

[r10-ospf-1-area-0.0.0.4]network 0.0.0.0 255.255.255.255

减少Hello时间与死亡时间

[r10]int g0/0/0

[r10-GigabitEthernet0/0/0]ospf timer hello 1

重发布

R12:

[r12]ospf 1

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

[r12-ospf-1]q

[r12]rip 1

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

R9:

[r9]ospf 1

[r9-ospf-1]import-route ospf 2

[r9-ospf-1]q

[r9]ospf 2

[r9-ospf-2]import-route ospf 1

OSPF路由汇总

R3:

[r3]ospf 1

[r3-ospf-1]area 1

[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.16.0 255.255.240.0

R6:

[r6]ospf 1

[r6-ospf-1]area 2

[r6-ospf-1-area-0.0.0.2]abr-summary 172.16.32.0 255.255.240.0

R7:

[r7]ospf 1

[r7-ospf-1]area 3

[r7-ospf-1-area-0.0.0.3]abr-summary 172.16.48.0 255.255.240.0

R9:

[r9]ospf 1

[r9-ospf-1]asbr-summary 172.16.64.0 255.255.240.0

R12:

[r12]ospf 1

[r12-ospf-1]asbr-summary 172.16.128.0 255.255.128.0

做特殊区域

Area 1做成Totally Stub Area

R1:

[r1]ospf 1

[r1-ospf-1]area 1

[r1-ospf-1-area-0.0.0.1]stub

R2:

[r2]ospf 1

[r2-ospf-1]area 1

[r2-ospf-1-area-0.0.0.1]stub

R3:

[r3]ospf 1

[r3-ospf-1]area 1

[r3-ospf-1-area-0.0.0.1]stub no-summary

Area 2做成Totally NSSA

R6:

[r6]ospf 1

[r6-ospf-1]area 2

[r6-ospf-1-area-0.0.0.2]nssa no-summary

R11:

[r11]ospf 1

[r11-ospf-1]area 2

[r11-ospf-1-area-0.0.0.2]nssa

R12:

[r12]ospf 1

[r12-ospf-1]area 2

[r12-ospf-1-area-0.0.0.2]nssa

Area 3做成Totally NSSA

R7:

[r7]ospf 1

[r7-ospf-1]area 3

[r7-ospf-1-area-0.0.0.3]nssa no-summary

R8:

[r8]ospf 1

[r8-ospf-1]area 3

[r8-ospf-1-area-0.0.0.3]nssa

R9:

[r9]ospf 1

[r9-ospf-1]area 3

[r9-ospf-1-area-0.0.0.3]nssa

下发一个缺省,不然R10中既没有缺省,也没有其他路由

[r9]ospf 2

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

NAT

R3:

[r3]acl 2000

[r3-acl-basic-2000]rule permit source 172.16.16.0 0.0.15.255

[r3-acl-basic-2000]q

[r3]int s4/0/0

[r3-Serial4/0/0]nat outbound 2000

R6:

[r6]acl 2000

[r6-acl-basic-2000]rule permit source 172.16.32.0 0.0.15.255

[r6-acl-basic-2000]rule permit source 172.16.128.0 0.0.254.255

[r6-acl-basic-2000]q

[r6]int s4/0/0

[r6-Serial4/0/0]nat outbound 2000

R7:

[r7]acl 2000

[r7-acl-basic-2000]rule permit source 172.16.48.0 0.0.15.255

[r7-acl-basic-2000]rule permit source 172.16.64.0 0.0.15.255

[r7-acl-basic-2000]q

[r7]int g0/0/0

[r7-GigabitEthernet0/0/0]nat outbound 2000

  • 12
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值