华为防火墙和路由器之间运行OSPF协议配置案例

转载自https://blog.51cto.com/13817711/2483789?source=dra

防火墙的动态路由

 防火墙和一台路由器之间配置OSPF过程如下:
华为防火墙和路由器之间运行OSPF协议配置案例(可跟做)

FW1:
ospf 1 router-id 10.10.10.10 ----------RID不能相同 
 area 0.0.0.0 
  network 202.100.1.0 0.0.0.255  ---------采用通配符方法 
  network 10.10.10.10 0.0.0.0  

放行OSPF安全策略

 默认情况防火墙只放行组播的报文,单播包不放行,需要配置安全策略
 OSPF网络类型------OSPF报文的单播还是组播--------是否需要放行安全策略
第一步: 定义OSPF服务

ip service-set OSPF type object
 service 0 protocol 89   

第二步:配置安全策略

 security-policy
 rule name permit_ospf
  source-zone local
  source-zone untrust
  destination-zone local
  destination-zone untrust
  source-address 202.100.1.10 mask 255.255.255.255
  source-address 202.100.1.254 mask 255.255.255.255
  destination-address 202.100.1.10 mask 255.255.255.255
  destination-address 202.100.1.254 mask 255.255.255.255
  service OSPF      调用OSPF对象
  action permit

检查:

<FW1>display security-policy  rule   permit_ospf  
  (13 times matched)    ----已经命令的安全策略
 rule name permit_ospf
  source-zone local
  source-zone untrust
  destination-zone local
  destination-zone untrust
  source-address 202.100.1.10 mask 255.255.255.255
  source-address 202.100.1.254 mask 255.255.255.255
  destination-address 202.100.1.10 mask 255.255.255.255
  destination-address 202.100.1.254 mask 255.255.255.255
  service OSPF
  action permit
<FW1>

查看OSPF的邻居关系

[FW1]display  ospf peer   
17:17:32  2019/10/13

         OSPF Process 1 with Router ID 10.10.10.10
                 Neighbors 

 Area 0.0.0.0 interface 202.100.1.10(G0/0/0)'s neighbors
 Router ID: 1.1.1.1          Address: 202.100.1.254    GR State: Normal     
   State: Full  Mode:Nbr is  Slave  Priority: 1
   DR: 202.100.1.254  BDR: 202.100.1.10  MTU: 0    
   Dead timer due in 36  sec 
   Neighbor is up for 00:02:23     
   Authentication Sequence: [ 0 ] 

查看路由表

[FW1]display ip routing-table protocol ospf  
17:18:13  2019/10/13
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public Routing Table : OSPF
         Destinations : 3           Routes : 3

OSPF Routing Table Status : <Active>
         Destinations : 1           Routes : 1

Destination/Mask    Proto   Pre  Cost     Flags NextHop         Interface

       1.1.1.1/32         OSPF    10   2           D  202.100.1.254   G0/0/0
==================================================
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值