当前位置: 首页 > news >正文

OSPF综合

实验拓扑
在这里插入图片描述
实验需求:
1 R4为ISP,其上只能配置IP地址;
R4与其他所有直连设备间均使用公有IP
2 R3-R5/6/7为MGRE环境,R3为中心站点 ;
3 整个OSPF环境IP基于172.16.0.0/16划分;
4 所有设备均可访问R4的环回;
5 减少LSA的更新量,加快收敛,保障更新安全;
6 全网可达

IP配置

先配置公网IP再配置私网IP

ISP(R4)

interface Serial3/0/0link-protocol pppip address 46.1.1.2 255.255.255.0 
#
interface Serial4/0/0link-protocol pppip address 34.1.1.2 255.255.255.0 
#
interface Serial4/0/1link-protocol pppip address 45.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/0ip address 47.1.1.2 255.255.255.0 
#
interface LoopBack0ip address 4.4.4.4 255.255.255.0 
#

R3

#
interface Serial4/0/0link-protocol pppip address 34.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/0ip address 172.16.32.131 255.255.255.248 
#
interface LoopBack0ip address 172.16.34.1 255.255.255.128 
#

R5

#
interface Serial4/0/0link-protocol pppip address 45.1.1.1 255.255.255.0 
#
interface LoopBack0ip address 172.16.1.1 255.255.255.128 
#

R6

#
interface Serial4/0/0link-protocol pppip address 46.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/0ip address 172.16.64.1 255.255.255.252 
#
interface LoopBack0ip address 172.16.1.129 255.255.255.128 
#

R7

#
interface GigabitEthernet0/0/0ip address 47.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/1ip address 172.16.96.1 255.255.255.252 
#
interface LoopBack0ip address 172.16.2.1 255.255.255.128 
#

配置私网IP

R1

#
interface GigabitEthernet0/0/0ip address 172.16.32.129 255.255.255.248 
#
interface LoopBack0ip address 172.16.33.1 255.255.255.128 
#

R2

#
interface GigabitEthernet0/0/0ip address 172.16.32.130 255.255.255.248 
#
interface LoopBack0ip address 172.16.33.129 255.255.255.128 
#

R8

#
interface GigabitEthernet0/0/0ip address 172.16.96.2 255.255.255.252 ospf authentication-mode md5 1 cipher %$%$-6D,Eji%RNS3W;WS1eq/sYl1%$%$ospf timer hello 5
#
interface GigabitEthernet0/0/1ip address 172.16.96.5 255.255.255.252 
#
interface LoopBack0ip address 172.16.97.1 255.255.255.128 
#

R9

#
interface GigabitEthernet0/0/1ip address 172.16.128.1 255.255.255.252 
#
interface LoopBack0ip address 172.16.129.1 255.255.255.128 
#

R10

#
interface GigabitEthernet0/0/0ip address 172.16.128.2 255.255.255.252 
#
interface LoopBack0ip address 172.16.129.129 255.255.255.128 
#

R11

#
interface GigabitEthernet0/0/0ip address 172.16.64.2 255.255.255.252 
#
interface GigabitEthernet0/0/1ip address 172.16.64.5 255.255.255.252 
#
interface LoopBack0ip address 172.16.65.1 255.255.255.128 
#

R12

#
interface GigabitEthernet0/0/0ip address 172.16.64.6 255.255.255.252 
#
interface LoopBack0ip address 172.16.160.1 255.255.240.0 
#
interface LoopBack1ip address 172.16.176.1 255.255.240.0 
#

配置公网路由

R3

#
ip route-static 0.0.0.0 0.0.0.0 34.1.1.2
ip route-static 172.16.32.0 255.255.224.0 NULL0
#

R5

#
ip route-static 0.0.0.0 0.0.0.0 45.1.1.2
#

R6

#
ip route-static 0.0.0.0 0.0.0.0 46.1.1.2
ip route-static 172.16.64.0 255.255.224.0 NULL0
#

R7

#
ip route-static 0.0.0.0 0.0.0.0 47.1.1.2
ip route-static 172.168.96.0 255.255.224.0 NULL0
#

配置MGRE

R3

#
interface Tunnel0/0/0ip address 172.16.0.129 255.255.255.248 tunnel-protocol gre p2mpsource 34.1.1.1ospf network-type broadcastnhrp entry multicast dynamic
#

R5

#
interface Tunnel0/0/0ip address 172.16.0.130 255.255.255.248 tunnel-protocol gre p2mpsource Serial4/0/0ospf network-type broadcastospf dr-priority 0nhrp entry 172.16.0.129 34.1.1.1 register
#

R6

#
interface Tunnel0/0/0ip address 172.16.0.131 255.255.255.248 tunnel-protocol gre p2mpsource Serial4/0/0ospf network-type broadcastospf dr-priority 0nhrp entry 172.16.0.129 34.1.1.1 register
#

R7

#
interface Tunnel0/0/0ip address 172.16.0.132 255.255.255.248 tunnel-protocol gre p2mpsource GigabitEthernet0/0/0ospf network-type broadcastospf dr-priority 0nhrp entry 172.16.0.129 34.1.1.1 register
#

OSPF

先配置公网 Area0

R3

#
ospf 1 router-id 3.3.3.3 area 0.0.0.0 authentication-mode md5 1 cipher %$%$V2p(Ot,4>J<u_$ZlGD>Rs^P!%$%$network 172.16.0.129 0.0.0.0 
#

R5

#
ospf 1 router-id 5.5.5.5 area 0.0.0.0 authentication-mode md5 1 cipher %$%$uJ"tD%u5=),T65/K3x91s^xE%$%$network 172.16.0.0 0.0.255.255 
#

R6

#
ospf 1 router-id 6.6.6.6 area 0.0.0.0 authentication-mode md5 1 cipher %$%$gtkUAXe1W$Ba0*QPwH5Gs_3c%$%$network 172.16.0.0 0.0.1.255 
#

R7

#
ospf 1 router-id 7.7.7.7 area 0.0.0.0 authentication-mode md5 1 cipher %$%$r]Q`2E"07%UJj1D-:dr;s_e1%$%$network 172.16.0.0 0.0.3.255 
#

配置私网

Area1

R1

#
ospf 1 router-id 1.1.1.1 area 0.0.0.1 network 172.16.0.0 0.0.255.255 stub 
#

R2

#
ospf 1 router-id 2.2.2.2 area 0.0.0.1 network 172.16.0.0 0.0.255.255 stub 
#

R3

#area 0.0.0.1 abr-summary 172.16.32.0 255.255.224.0network 172.16.32.0 0.0.31.255 stub no-summary
#

Area2

R6

#area 0.0.0.2 abr-summary 172.16.64.0 255.255.224.0network 172.16.64.0 0.0.0.255 nssa no-summary
#

R11

#
ospf 1 router-id 11.11.11.11 area 0.0.0.2 network 172.16.0.0 0.0.255.255 nssa
#

R12

#
ospf 1 router-id 12.12.12.12 asbr-summary 172.16.160.0 255.255.224.0import-route rip 1area 0.0.0.2 network 172.16.64.6 0.0.0.0 nssa
#

Area3

R7

#area 0.0.0.3 abr-summary 172.16.96.0 255.255.224.0network 172.16.96.0 0.0.0.255 nssa no-summary
#

R8

#
ospf 1 router-id 8.8.8.8 area 0.0.0.3 network 172.16.0.0 0.0.255.255 nssa
#

R9

#
ospf 1 router-id 9.9.9.9 asbr-summary 172.16.128.0 255.255.224.0import-route ospf 2area 0.0.0.3 network 172.16.96.0 0.0.0.255 nssa
#

Area4

R9

#
ospf 2 default-route-advertisearea 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 
#

ACL控制访问

R3

#
acl number 2000  rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface Serial4/0/0nat outbound 2000
#

R6

#
acl number 2000  rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface Serial4/0/0nat outbound 2000
#

R7

#
acl number 2000  rule 5 permit source 172.16.0.0 0.0.255.255 
#
interface GigabitEthernet0/0/0nat outbound 2000
#

接口认证及更改Hello timer

进入各路由器启用接口配置一下命令

#ospf authentication-mode md5 1 cipher %$%$)&LKK$xK<!T`!]V87a#2sYKg%$%$ospf timer hello 5
#
http://www.lryc.cn/news/228490.html

相关文章:

  • vue分片上传视频并转换为m3u8文件并播放
  • 【MySQL】对表结构进行增删查改的操作
  • Hadoop原理,HDFS架构,MapReduce原理
  • 【Spring Boot】035-Spring Boot 整合 MyBatis Plus
  • Hafnium之强制性的接口
  • 计算机视觉:使用opencv实现银行卡号识别
  • 【Proteus仿真】【Arduino单片机】简易计算器设计
  • pychon/PIL/opencv/json学习过程中遇到的问题
  • YOLO目标检测——番茄数据集下载分享【含对应voc、coco和yolo三种格式标签】
  • (JAVA)线程
  • 【深度学习环境】windows安装 NVIDIA Docker
  • 【微信小程序】自定义组件(三)
  • Python语言:经典案例分析讲解2
  • dbeaver连接别人的数据库没有表
  • EXIT(1)
  • Qt信号量用于对共享资源进行同步
  • 在报错中学python something
  • 如何调用 DBMS_DISKGROUP 对 ASM 文件进行随机读取
  • UART学习
  • 洗地机哪个牌子最好用?洗地机品牌排行榜
  • 国际阿里云:Windows实例中数据恢复教程!!!
  • 浅谈二叉树
  • (二) 用QWebSocket 实现服务端和客户端(详细代码直接使用)
  • 关于我在配置zookeeper出现,启动成功,进程存在,但是查看状态却没有出现Mode:xxxxx的问题和我的解决方案
  • react及相关面试问题汇总
  • QT4到QT5移植出现的一些问题
  • 【可解释AI】Alibi explain: 解释机器学习模型的算法
  • No191.精选前端面试题,享受每天的挑战和学习
  • ROS基础—vscode创建工作空间
  • 机器学习复习(待更新)