登录站点

用户名

密码

Cisco启用VRF与Juniper防火墙OSPF互操作解决方案(原创)

热29已有 104 次阅读  2012-03-07 22:31   标签:  Cisco  VRF  Juniper  OSPF 
Cisco启用VRF与Juniper防火墙OSPF互操作解决方案(原创)

Bati-gol

概述
      本案例采用Cisco核心交换机与Juniper防火墙进行OSPF互操作,同时Cisco核心交换机启用VRF虚拟路由转发功能,
VRF(Turst)和VRF(DMZ)无法直接通信,VRF之间的互访流量需要经过Juniper防火墙做过滤,Cisco核心交换机与Juniper
防火墙实现OSPF互操作。


拓扑图



拓扑说明

1.Cisco核心交换机
启用VRF,新建VRF(Trust)和VRF(DMZ)
VRF trust(G 0/23,Lo 0)
VRF dmz(G 0/24,Lo 1)

G 0/23 IP  172.16.12.1/24
Lo 0   IP  1.1.1.1/24

G 0/24 IP 172.16.23.3/24
Lo 1   IP 3.3.3.3/24

2.Juniper防火墙
Trust接口 IP 172.16.12.2/24
DMZ接口 IP 172.16.23.2/24
Untrust接口IP 172.32.253.1/24
Loopback 1接口IP 2.2.2.2/24

3.Cisco和Juniper防火墙采用按区域OSPF进行互操作,实现VRF trust和VRF DMZ的互访。



配置说明

Cisco核心交换机配置

1.新建VRF
ip vrf trust
 rd 100:1
 route-target export 100:1
 route-target import 100:1
!
ip vrf dmz
 rd 100:2
 route-target export 100:2
 route-target import 100:2
!

2.分配接口
将Lo 0和G0/23分配进入VRF trust
interface Loopback0
 ip vrf forwarding trust
 ip address 1.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface GigabitEthernet0/23
 no switchport
 ip vrf forwarding trust
 ip address 172.16.12.1 255.255.255.0
!

将Lo 1和G0/24分配进入VRF dmz
interface Loopback1
 ip vrf forwarding dmz
 ip address 3.3.3.3 255.255.255.0
 ip ospf network point-to-point
!
interface GigabitEthernet0/24
 no switchport
 ip vrf forwarding dmz
 ip address 172.16.23.3 255.255.255.0
!

3.配置VRF OSPF
router ospf 100 vrf trust 和juniper的trust接口建立neighbor
 router-id 1.1.1.1
 log-adjacency-changes
 network 1.1.1.0 0.0.0.255 area 0
 network 172.16.12.0 0.0.0.255 area 0
!
router ospf 101 vrf dmz 和juniper的DMZ接口建立neighbor
 router-id 3.3.3.3
 log-adjacency-changes
 network 3.3.3.0 0.0.0.255 area 0
 network 172.16.23.0 0.0.0.255 area 0
!

Juniper防火墙OSPF配置

1.启用OSPF进程


2.设置OSPF router id 2.2.2.2

3.建立OSPF实例


4.启用OSPF功能,通告OSPF类型2默认路由


5.建立area 0



6.分配参与OSPF计算的接口(trust,dmz,loopback1接口)


7.新建接口loopback 1,2.2.2.2/24,链路类型改成point-to-point

8.将trust接口,dmz接口,loopback 1接口启用OSPF协议,绑定area 0

Turst接口


DMZ接口


Loopback 1 link-type改为point-to-point


9.按照实际需求配置Trust to DMZ,dmz to trust,trust to untrust,dmz to untrust方向的防火墙策略




验证配置

查看Cisco核心交换机

查看neighbor

VRF trust的路由表

show ip route vrf trust

2.2.2.0/24, 3.3.3.0/24, 172.16.23.0/24,0.0.0.0/0类型2的默认路由,下一条为Juniper的Trust接口IP 172.16.12.2


VRF dmz的路由表

show ip route vrf dmz

1.1.1.0/24, 2.2.2.0/24, 172.16.12.0/24, 0.0.0.0/0的类型2的默认路由,下一条为Juniper的DMZ接口IP 172.16.23.2



查看Juniper防火墙

查看neighbor


查看路由表

学习到VRF trust中Lo 0接口1.1.1.0/24网段 和VRF DMZ中Lo 1接口3.3.3.0/24网段路由

get route





验证连通性

检测VRF trust和VRF dmz的联通性

ping vrf trust 3.3.3.3 source 1.1.1.1


ping vrf dmz 1.1.1.1 source 3.3.3.3


检测VRF trust和VRF dmz互访的路径

1.1.1.1——>3.3.3.3

路径经过juniper trust接口IP 172.16.12.2

traceroute vrf trust 


3.3.3.3——>1.1.1.1

路径经过juniper dmz接口IP 172.16.23.2

traceroute vrf dmz


通过以上配置实现Cisco和Juniper的OSPF互操作,实现VRF trust和VRF dmz的互访。


好久没来写些东西了,有空一定多来溜溜,多些大家的支持!哈哈~ 


分享 举报

发表评论 评论 (21 个评论)

涂鸦板