vs2012 做网站教程,网站开发承诺函,做网站全过程,电子商务网站推广的主要方式问题描述
R6通过主备份路径访问LSP#xff08;R1#xff09;#xff0c;主为R2#xff0c; 备为R3
解决方案
路由器1看作LSP#xff0c;配置loopback 0 ,地址为1.1.1.1 供测试使用#xff1b;路由器 236, LSW4和LSW5#xff0c; 运行ospf处于相同区域#xff0c;建立…问题描述
R6通过主备份路径访问LSPR1主为R2 备为R3
解决方案
路由器1看作LSP配置loopback 0 ,地址为1.1.1.1 供测试使用路由器 236, LSW4和LSW5 运行ospf处于相同区域建立邻居关系。其中2 3 对应的ISP接口在ospf下配置静默silent-interface g0/0/0在LSW4和LSW5上配置三层链路划分vlan中间采用聚合终端使用access。R2和R3需要连接LSP外网配静态路由ip route-static 0.0.0.0 0 10.0.12.1 pre 60 指向ISP。LSW4 和 LSW5 需要访问LSP 在R2和R3下将缺省路由传递出去在ospf进程下配置default-route-advertise type x R2 type 1 R3 type 2在LSW4和LSW5、R6中dis ip routing-table , dis ospf lsdbtracert 1.1.1.1 可以查看external router发现type1 路由 优于 type2 路由 即直接通过R2访问
追踪路径发现R5通过R2直接进行访问。—》发现问题
解决问题 在R3上修改静态缺省路由的优先级为200再次到R6踪到ISP路径发现路径没有切换还在R3写出没有切换的原因 dis ospf lsdb 在R3上ospf进程下配置default-router-advertise type 2 permit-calculate-other,再次追踪ISP路径发现路径切换到R2写出切换的原因 由于lsp是私网地址需要在接口处做地址转换操作 nat outbount xxx 配置命令如下所示
# R1, R2, R3, R6的接口ip地址要配好
R1:
int lo0
ip add 1.1.1.1
# R2, R3, R6, LSW4, LSW5 开启ospf
ospf r x.x.x.x
a 0
net 0.0.0.0 0.0.0.0 # 实际需要配置点对点的
# 在R2 和 R3与ISP的接口处配置静默
ospf 1
silent-int gx/x/x# 三层链路配置
LSW4 与 LSW 5 类似以4为例子
vlan b 24 45
int g0/0/1
port link-type access
port default vlan 24
int vlan 24
ip add 10.0.24.4 24
int e1
trunk-port g 0/0/8 0/0/9
port link-type trunk
port trunk allow-pass vlan 45
int vlan 45
ip add 10.0.45.4 24# 在R2和R3上配置静态路由
ip route-static 0.0.0.0 0.0.0.0 10.0.12.1
ip route-static 0.0.0.0 0.0.0.0 10.0.13.1# 在R2和R3将缺省广播出去
ospf 1
default-router-advertise type 1 # R2主
default-router-advertise type 2 # R3 备
# 在R6上查看路由表 dis ip routing-table 0.0.0.0, 发现走R3# 修改R3
ip route-static 0.0.0.0 0 10.0.13.1 pre 200
ospf 1
default-router-advertise type 2 permit-other# 在R6上查看路由表 dis ip routing-table 0.0.0.0, 发现走R2 成功# 在R2和R3与ISP的接口出配置nat
acl 2000
rule p
int xxx
nat outboutn 2000# 在R6上ping 1.1.1.1 在R2上使用dis nat session all 可看到nat转换# 测试默认走R2 R2对应的接口shutdown后走R3