如何重发布特定的路由
2012-12-21 16:57:57   来源:   评论:0 点击:

如下配置可以实现的功能是:只把静态路由里面是192.168.0.0/16重发布OSPF里面,其它的所有静态路由不发布到OSPF。以下所有命令只能在CLI下面配置,不能在GUI配置。步骤一:新建一个access-list:config router ...

如下配置可以实现的功能是:只把静态路由里面是192.168.0.0/16重发布OSPF里面,其它的所有静态路由不发布到OSPF。以下所有命令只能在CLI下面配置,不能在GUI配置。

步骤一:新建一个access-list:

config router access-list
edit "static2ospf"
config rule
edit 1
set prefix 192.168.0.0 255.255.0.0
set exact-match disable
next
end
next
end

步骤二:新建一个route-map:

config router route-map
edit "static2ospf"
config rule
edit 1
set match-ip-address "static2ospf"
next
end
next
end

步骤三:配置动态路由协议并在重发布相关路由选项里面只重发布静态路由并引用上面定义的route-map:

config router ospf
set abr-type cisco
config area
edit 0.0.0.0
next
end
set default-metric 1
config network
edit 1
set prefix 172.16.0.0 255.255.0.0
next
end
config redistribute "connected"
end
config redistribute "static"
set status enable
set routemap "static2ospf"
end
config redistribute "rip"
end
config redistribute "bgp"
end
set restart-mode graceful-restart
set router-id 172.16.1.1
end

相关热词搜索:

上一篇:如何配置FortiGate BGP路由聚合
下一篇:设置FortiGate 静态路由和策略路由

分享到: 收藏