当前位置:首页>微思动态 > >详情
全国热线电话 400-881-4699

在线留言

【技术分享】策略路由配置

发布作者:微思网络   发布时间:2022-09-07   浏览量:0

图片

策略路由配置

实验拓扑

图片




实验要求
  1. 当市场部用户访问公司总部的时候走AR1-AR2-AR4

  2. 当财务部用户访问公司总部的时候走AR2-AR3-AR4





实验步骤

基本要求根据拓扑图所示配置IP地址;并且所有路由器运行ospf划分到区域0;实现全网互通

R1配置:

interface Serial2/0/0
 ip address 12.1.3.1 255.255.255.0 
#
interface GigabitEthernet0/0/0
 ip address 12.1.1.1 255.255.255.0 
 ospf cost 48
#
interface GigabitEthernet0/0/2
 ip address 10.1.1.254 255.255.255.0 
#
interface GigabitEthernet1/0/0
 ip address 10.1.2.254 255.255.255.0 

ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 10.1.1.254 0.0.0.0 
  network 10.1.2.254 0.0.0.0 
  network 12.1.1.1 0.0.0.0 
  network 12.1.3.1 0.0.0.0


R2配置:

interface GigabitEthernet0/0/0
 ip address 12.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 12.1.2.2 255.255.255.0 
#

ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 12.1.1.2 0.0.0.0 
  network 12.1.2.2 0.0.0.0


R3配置:

interface Serial2/0/0
ip address 12.1.3.3 255.255.255.0 
#
interface GigabitEthernet0/0/0
 ip address 12.1.4.3 255.255.255.0 
#

ospf 1 router-id 3.3.3.3 
 area 0.0.0.0                             
  network 12.1.3.3 0.0.0.0 
  network 12.1.4.3 0.0.0.0


R4配置:

interface GigabitEthernet0/0/0
 ip address 12.1.2.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 12.1.4.4 255.255.255.0 
#
interface GigabitEthernet0/0/2
 ip address 10.1.3.254 255.255.255.0 
#

ospf 1 router-id 4.4.4.4 
 area 0.0.0.0 
  network 10.1.3.254 0.0.0.0 
  network 12.1.2.4 0.0.0.0 
  network 12.1.4.4 0.0.0.0





配置策略路由

当市场部用户访问公司总部的时候走AR1-AR2-AR4

acl number 3000  
 rule 5 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.3.0 0.0.0.255
traffic classifier hcia1 operator or---定义流量分类
 if-match acl 3000
traffic behavior hcip1—定义流量行为
 redirect ip-nexthop 12.1.1.2
traffic policy hcie1—关联流量分类和行为
 classifier hcia1 behavior hcip1
interface GigabitEthernet0/0/2
 traffic-policy hcie1 inbound—在接口下调用

当财务部用户访问公司总部的时候走AR2-AR3-AR4

acl number 3001  
 rule 5 permit ip source 10.1.2.0 0.0.0.255 destination 10.1.3.0 0.0.0.255
traffic classifier hcia2 operator or
 if-match acl 3001
traffic behavior hcip2
 redirect ip-nexthop 12.1.3.3
traffic policy hcie2
 classifier hcia2 behavior hcip2
interface GigabitEthernet1/0/0
 traffic-policy hcie2 inbound




验证

图片


图片



返回顶部