OSPF实验

基础 IP 配置

复制代码
 R1
int g 0/0/0
ip add 172.16.33.1 255.255.255.248
int l 0
ip add 172.16.34.1 255.255.255.0
 R2
int g 0/0/0
ip add 172.16.33.2 255.255.255.248
int l 0
ip add 172.16.35.1 255.255.255.0
 R3
int g 0/0/0
ip add 172.16.33.3 255.255.255.248
int l 0
ip add 172.16.36.1 255.255.255.0
int s 4/0/0
ip add 34.0.0.1 255.255.255.252
 R4 (ISP)
int s 4/0/0
ip add 34.0.0.2 255.255.255.252
int s 4/0/1
ip add 54.0.0.2 255.255.255.0
int s 3/0/0
ip add 64.0.0.2 255.255.255.0
int g 0/0/0
ip add 74.0.0.2 255.255.255.0
int l 0
ip add 4.4.4.4 255.255.255.0
 R5
int s4/0/0
ip add 54.0.0.1 255.255.255.0
ip route-static 0.0.0.0 0 54.0.0.2
 R6
int s 4/0/0
ip add 64.0.0.1 255.255.255.0
int g 0/0/0
ip add 172.16.65.1 255.255.255.248
ip route-static 0.0.0.0 0 64.0.0.2
 R7
int g 0/0/0
ip add 74.0.0.1 255.255.255.0
int g 0/0/1
ip add 172.16.97.1 255.255.255.248
ip route-static 0.0.0.0 0 74.0.0.2
 R8
int g 0/0/0
ip add 172.16.97.2 255.255.255.248
int l 0
ip add 172.16.98.1 255.255.255.0
int g 0/0/1
ip add 172.16.97.3 255.255.255.248
 R9
int g 0/0/0
ip add 172.16.97.4 255.255.255.248
int g 0/0/1
ip add 172.16.129.1 255.255.255.248
int l0
ip add 172.16.130.1 255.255.255.0
 R10
int g 0/0/0
ip add 172.16.129.2 255.255.255.248
int l 0
ip add 172.16.131.1 255.255.255.0
 R11
int g 0/0/0
ip add 172.16.65.2 255.255.255.248
int l 0
ip add 172.16.66.1 255.255.255.0
int g 0/0/1
ip add 172.16.65.3 255.255.255.248
 R12
int g 0/0/0
ip add 172.16.65.4 255.255.255.248
int l 1
ip add 172.16.176.1 255.255.240.0
int l 0
ip add 172.16.160.1 255.255.240.0

MGRE 配置

复制代码
R3
int t 0/0/0
ip add 172.16.1.1 255.255.255.248
tunnel-protocol gre p2mp
source 34.0.0.1
nhrp network-id 100
nhrp entry multicast dynamic
R5
int t 0/0/0
ip add 172.16.1.2 255.255.255.248
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int l 0
ip add 172.16.2.1 255.255.255.0
R6
int t 0/0/0
ip add 172.16.1.3 255.255.255.248
tunnel-protocol gre p2mp
source s 4/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int l 0
ip add 172.16.3.1 255.255.255.0
R7
int t 0/0/0
ip add 172.16.1.4 255.255.255.248
tunnel-protocol gre p2mp
source g 0/0/0
nhrp network-id 100
nhrp entry 172.16.1.1 34.0.0.1 register
int l 0
ip add 172.16.4.1 255.255.255.0

OSPF RIP 配置

复制代码
R1
ospf 1 router-id 1.1.1.1
area 1
network 172.16.33.0 0.0.0.255
network 172.16.34.0 0.0.0.255
R2
ospf 1 router-id 2.2.2.2
area 1
network 172.16.33.0 0.0.0.255
network 172.16.35.0 0.0.0.255
R3
ospf 1 router-id 3.3.3.3
area 1
network 172.16.33.3 0.0.0.0
network 172.16.36.1 0.0.0.0
area 0
network 172.16.1.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R5
ospf 1 router-id 5.5.5.5
area 0
network 172.16.1.0 0.0.0.255
network 172.16.2.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R6
ospf 1 router-id 6.6.6.6
area 0
network 172.16.1.0 0.0.0.255
network 172.16.3.0 0.0.0.255
area 2
network 172.16.65.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R7
ospf 1 router-id 7.7.7.7
area 0
network 172.16.1.0 0.0.0.255
network 172.16.4.0 0.0.0.255
area 3
network 172.16.97.0 0.0.0.255
int t 0/0/0
ospf network-type p2mp
R8
ospf 1 router-id 8.8.8.8
area 3
network 172.16.97.0 0.0.0.255
network 172.16.98.0 0.0.0.255
R9
ospf 1 router-id 9.9.9.9
area 3
network 172.16.97.0 0.0.0.255
area 4
network 172.16.129.0 0.0.0.255
network 172.16.130.0 0.0.0.255
ospf 2 router-id 19.19.19.19
area 4
network 172.16.129.0 0.0.0.255
network 172.16.130.0 0.0.0.255
ospf 1
import-route ospf 2
R10
ospf 1 router-id 10.10.10.10
area 4
network 172.16.129.0 0.0.0.255
network 172.16.131.0 0.0.0.255
R11
ospf 1 router-id 11.11.11.11
area 2
network 172.16.65.0 0.0.0.255
network 172.16.66.0 0.0.0.255
R12
ospf 1 router-id 12.12.12.12
area 2
network 172.16.65.0 0.0.0.255
import-route rip 1

rip 1
version 2
network 172.16.0.0

减少LSA更新量

复制代码
[r3]ospf 1
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]abr-summary 172.16.32.0 255.255.224.0
[r3]ip route-static 172.16.32.0 19 NULL 0
[r6]ospf 1 
[r6-ospf-1]area 2 
[r6-ospf-1-area-0.0.0.2]abr-summary 172.16.64.0 255.255.224.0
[r6]ip route-static 172.16.64.0 19 NULL 0
[r7]ospf 1 
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]abr-summary 172.16.96.0 255.255.224.0
[r7]ip route-static 172.16.96.0 19 NULL 0
[r9]ospf 1 
[r9-ospf-1]asbr-summary 172.16.128.0 255.255.224.0
[r9]ip route-static 172.16.128.0 19 NULL 0
[r12]ospf 1 
[r12-ospf-1]asbr-summary 172.16.160.0 255.255.224.0
[r9]ip route-static 172.16.160.0  19 NULL 0
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]stub
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1]stub
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]stub  no-summary
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]nssa no-summary 
[r11-ospf-1]area 2
[r11-ospf-1-area-0.0.0.2]nssa 
[r12-ospf-1]area 2
[r12-ospf-1-area-0.0.0.2]nssa
[r7-ospf-1]area 3
[r7-ospf-1-area-0.0.0.3]nssa no-summary 
[r8-ospf-1]area 3
[r8-ospf-1-area-0.0.0.3]nssa 
[r9-ospf-1]area 3
[r9-ospf-1-area-0.0.0.3]nssa
[r9]ospf 2
[r9-ospf-2]default-route-advertise

加快收敛

复制代码
[r3]int t 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
[r5-Tunnel0/0/0]
[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

配置NAT环境,完成所有设备访问R4环回

复制代码
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255----R4环回的地址
[r3]int s 4/0/0
[r3-Serial4/0/0]nat outbound 2000
[r6]acl 2000
[r6-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r6-acl-basic-2000]int s 4/0/0
[r6-Serial4/0/0]nat outbound 2000
[r7]acl 2000
[r7-acl-basic-2000]rule permit source 172.16.0.0 0.0.255.255
[r7]int g 0/0/0
[r7-GigabitEthernet0/0/0]nat outbound 2000

全网可达

复制代码
[r1]ospf 1
[r1-ospf-1]a 1
[r1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[r2]ospf 1
[r2-ospf-1]a 1
[r2-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
[r3]ospf 1
[r3-ospf-1]a 1
[r3-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher 123456
相关推荐
her_heart5 小时前
把 ChatGPT 5.6 放进需求评审和测试设计之后,我反而减少了“一次成稿”的期待
网络·人工智能·网络协议·chatgpt·测试用例
HehuaTang5 小时前
ovs 中n-handler-threads n-revaidtor-threads作用
网络
讯展互联6 小时前
实体业态运营效率分析:装修门店投放自主与外包的人力模型对比
大数据·网络·经验分享·创业创新·学习方法
JL158 小时前
Agent工程-为什么Agent必须有观测和Tracing
服务器·网络·人工智能·安全
神州世通8 小时前
IP Office内置外显卡兼容性说明
服务器·网络·tcp/ip
GoFly开发者10 小时前
Go语言开发框架GoFlyGen新增 网站安全助手 插件,帮助开发者提供应用安全防护,保障平台系统数据安全。
网络·安全
happyprince11 小时前
07_NVIDIA_ModelOpt-Recipe配方系统
网络·modelopt
韦胖漫谈IT11 小时前
Apple M3 Max 与 Apple M5 Max 对比:本地算力的新旧王者之争
网络·人工智能·macos·transformer
treesforest12 小时前
做内容平台,IP地址精准定位和IP高精度定位查询怎么帮我们提升用户留存
网络·网络协议·tcp/ip
电商API_1800790524712 小时前
电商ERP 自动同步订单功能实现拆解与技术手段
服务器·前端·网络·爬虫