当前位置: 首页 > article >正文

带宽管理配置实验

一、实验拓扑

 配置流程:
1、带宽通道:整体带宽、每个用户带宽、连接数、优先级信息
2、带宽策略
3、策略+通道,引用
4、配置接口出入带宽

二、实验需求和配置 

1、基础配置 

接口配置 

[dianxin]interface GigabitEthernet 0/0/0
[dianxin-GigabitEthernet0/0/0]ip add 12.0.0.2 24

[liantong]interface GigabitEthernet 0/0/0
[liantong-GigabitEthernet0/0/0]ip add 13.0.0.2 24

[FW]interface GigabitEthernet 1/0/0
[FW-GigabitEthernet1/0/0]ip add 12.0.0.1 24
[FW]interface GigabitEthernet 1/0/1
[FW-GigabitEthernet1/0/1]ip add 13.0.0.1 24
[FW]int g 1/0/2.10
[FW-GigabitEthernet1/0/2.10]ip add 192.168.1.254 24
[FW]interface GigabitEthernet 1/0/2.20
[FW-GigabitEthernet1/0/2.20]int g 1/0/2.30
[FW-GigabitEthernet1/0/2.30]ip add 192.168.3.254 24
[FW-GigabitEthernet1/0/2.30]int g 1/0/2.40
[FW-GigabitEthernet1/0/2.40]ip add 192.168.4.254 24
[FW]interface GigabitEthernet 1/0/3
[FW-GigabitEthernet1/0/3]ip add 10.1.1.254 24

配置VLAN并划分接口 

[SW1]vlan batch 10 20 30 40
[SW1]interface GigabitEthernet 0/0/1
[SW1-GigabitEthernet0/0/1]port link-type trunk 
[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20 30 40
[SW1]int g 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type access 
[SW1-GigabitEthernet0/0/2]port default vlan 10
[SW1]int g 0/0/3
[SW1-GigabitEthernet0/0/3]port link-type access 
[SW1-GigabitEthernet0/0/3]port default vlan 20
[SW1]int g 0/0/4
[SW1-GigabitEthernet0/0/4]port link-type access
[SW1-GigabitEthernet0/0/4]port default vlan 30
[SW1]int g 0/0/5
[SW1-GigabitEthernet0/0/5]port link-type access 
[SW1-GigabitEthernet0/0/5]port default vlan 40

划分安全区域 

 firewall zone untrust
 set priority 5
 add interface GigabitEthernet1/0/0
 add interface GigabitEthernet1/0/1

firewall zone trust
 set priority 85
 add interface GigabitEthernet0/0/0
 add interface GigabitEthernet1/0/2.10
 add interface GigabitEthernet1/0/2.20
 add interface GigabitEthernet1/0/2.30
 add interface GigabitEthernet1/0/2.40

firewall zone dmz
 set priority 50
 add interface GigabitEthernet1/0/3

配置路由 

[FW]ip route-static 0.0.0.0 0 12.0.0.2
[FW]ip route-static 0.0.0.0 0 13.0.0.2 

配置NAT策略 

nat-policy
 rule name 01
  source-zone trust
  action source-nat easy-ip 

2、带宽管理配置 

需求一 

 企业组织架构中存在部门A,部门A中存在销售组1和研发组2:
销售部门---->Email、ERP业务
可以对部门A中的销售组进行带宽资源细分,保证销售员工的业务流量正常转发:
1、部门A中的下行最大带宽不超过60M
2、部门A的销售组下行最大带宽不超过30M
3、部门A的销售组的Email业务下行最小带宽不低于20M

分析:需求之间存在父子关系
A部门带宽通道---最大60M
    部门A销售组带宽通道---最大30M
        部门A销售组Email业务带宽通道---最小20M

 带宽策略配置一

 [FW]traffic-policy  ---- 进入带宽策略配置视图
[FW-policy-traffic]profile 01    ----创建一个带宽通道,名称为01
[FW-policy-traffic-profile-01]bandwidth maximum-bandwidth whole downstream 60000   ----设定带宽,最大带宽,下行60M

[FW]traffic-policy
[FW-policy-traffic]display this  
 rule name 01      ----策略名称
  description A
  source-zone trust
  destination-zone untrust
  source-address 192.168.1.0 mask 255.255.255.0
  source-address 192.168.2.0 mask 255.255.255.0
  action qos profile 01        ----动作为限流,且调用带宽通道

 

[FW]traffic-policy    
[FW-policy-traffic]profile 02
[FW-policy-traffic-profile-02]bandwidth maximum-bandwidth whole downstream 30000

[FW]traffic-policy
[FW-policy-traffic]display this 
 rule name 02 parent 01
  description A_xiaoshou
  source-zone trust
  destination-zone untrust
  source-address 192.168.1.0 mask 255.255.255.0
  action qos profile 02

 

 [FW]traffic-policy
[FW-policy-traffic]display this 
 profile 03
  bandwidth guaranteed-bandwidth whole downstream 20000
 rule name 03 parent 02
  description A_xiaoshou_email
  source-zone trust
  destination-zone untrust
  source-address 192.168.1.0 mask 255.255.255.0
  action qos profile 03

 

安全策略 

[FW]security-policy 
[FW-policy-security]dis th
security-policy
 rule name 01
  description 带宽策略(01)引入
  source-zone trust
  destination-zone untrust
  source-address 192.168.1.0 mask 255.255.255.0
  source-address 192.168.2.0 mask 255.255.255.0
  action permit 

需求二 

给部门A和部门B划分可使用的带宽资源。要避免P2P业务占据较多的带宽,还需要限制部门A和部门B使用P2P业务的带宽总和。
1、部门A下行最大带宽60M
2、部门B下行最大带宽40M
3、部门A和部门B的P2P业务下行最大带宽不超过80M
4、P2P流量需要计算到各自部门的总流量中 

带宽策略配置二 

P2P带宽通道: 

 traffic-policy
     profile 05_P2P
      bandwidth reference-mode rule-shared
      bandwidth maximum-bandwidth whole downstream 80000 

 

[FW]traffic-policy
[FW-policy-traffic]dis th
 rule name 05 parent 01
  description A_P2P业务
  source-zone trust
  destination-zone untrust
  source-address 192.168.1.0 mask 255.255.255.0
  source-address 192.168.2.0 mask 255.255.255.0
  application app Oracle_MySQL
  action qos profile 05_P2P
 rule name 04
  description B
  source-zone trust
  destination-zone untrust
  source-address 192.168.3.0 mask 255.255.255.0
  source-address 192.168.4.0 mask 255.255.255.0
  action qos profile 04
 rule name 06 parent 04
  description B_P2P业务
  source-zone trust
  destination-zone untrust
  source-address 192.168.3.0 mask 255.255.255.0
  source-address 192.168.4.0 mask 255.255.255.0
  application app Oracle_MySQL
  action qos profile 05_P2P 

 

 

需求三 

在不影响正常用户上网和web服务器正常提供对外服务的情况下,实现以下功能:
1、将从ISP购买的100M带宽进行划分
    上网高峰期(工作日下午3点-6点),上网用户下行带宽60M(U-T),外用用户下行带宽40M(D-U)
2、2台web服务器,限制每一台web服务器对外提供的最大下行带宽不超过20M
3、假设,总共30个上网用户,在上网高峰期,限制每个用户访问Internet的最大下行带宽不超过2M 

新建时间段: 

 

带宽策略配置三

 profile 06
  bandwidth maximum-bandwidth whole downstream 60000
  bandwidth maximum-bandwidth per-ip downstream 2000
 rule name 07
  description 企业上网用户策略
  source-zone trust
  destination-zone untrust
  source-address 192.168.0.0 mask 255.255.0.0
  time-range time_01
  action qos profile 06 

 profile 07
  bandwidth maximum-bandwidth whole downstream 40000
  bandwidth maximum-bandwidth per-ip downstream 20000
 rule name 08
  description 外网用户访问服务器
  source-zone untrust
  destination-zone dmz
  destination-address 10.1.1.0 mask 255.255.255.0
  action qos profile 07 

 需求四

部门A的上网用户数量不固定,为了让用户公平的使用带宽,根据实际在线上网用户数量,平均分配带宽:
1、部门A的下行最大带宽60M
2、根据实时的上网用户数量,对部门A的60M带宽资源进行均分

动态均分功能:在配置了整体最大带宽的前提下,FW根据在线IP/用户的个数和带宽使用率,动态的对每一个IP/用户能够使用的最大带宽进行平均分配。 

 计算方式:每个IP/用户最大带宽=MAX(带宽最小值,整体最大带宽/IP用户数*平均分配系数) 

带宽通道: 

 profile 08
  bandwidth maximum-bandwidth whole downstream 60000
  bandwidth average per-ip manual multiplier 1 minimum 1000 

 

平均分配系数----与带宽使用率存在反比关系
0                <70%
1                70-75%
2                75-80%
3
4

带宽策略配置四 

 rule name 09
  description A_用户带宽分配
  source-zone trust
  destination-zone untrust
  source-address 192.168.1.0 mask 255.255.255.0
  source-address 192.168.2.0 mask 255.255.255.0
  action qos profile 08 

 需求五

 设定出入接口带宽:

电信购买带宽100M
联通购买带宽50M 

 

需求六–配额策略 

    运营商--->流量套餐--->对中小企业500G/月,超出部分,额外计费
    限额--->每一个员工规定上网时长
1、员工40人,10名管理人员+30名牛马
    高管-->20G/月
    牛马-->10G/月
2、牛马--->4h/日,流量500M/日
3、超额后限制
    牛马--->禁止上网
    高管--->超过配额后最大带宽限定为800K 

 

[FW]quota-policy       ----进入配额策略视图
[FW-policy-quota]profile niuma          -----创建配额通道
[FW-policy-quota-profile-niuma]stream-daily 500     -----每日流量限额
[FW-policy-quota-profile-niuma]stream-monthly 10240        ----每月流量配额
[FW-policy-quota-profile-niuma]time-daily 240      ------设定上网时长
[FW-policy-quota-profile-niuma]limit-bandwidth 0     -----超出配额后的限制带宽为0

[FW-policy-quota]rule name niuma
[FW-policy-quota-rule-niuma]user user-group /default/niuma   -----策略应用用户
[FW-policy-quota-rule-niuma]action quota profile niuma

 

 

quota-policy
 profile gaoguan
  stream-monthly 20480
  limit-bandwidth 800
 rule name gaoguan
  description 高管
  user user-group /default/gaoguan
  action quota profile gaoguan 

 

需求七—流量整形和流量监管 

无法在web界面实现 

流量监管:对进入接口的,超出限制速率的报文进行丢弃。
流量整形:对接口发送的,超出限制速率的报文先进行缓存,等待流量不超出速率时发送。 


http://www.kler.cn/a/585943.html

相关文章:

  • 从零开始学习PX4源码12(模式手动控制开关消息)
  • 2.2 企业级ESLint/Prettier规则定制
  • ESP32-H2芯片模组方案,设备物联网通信,智能化无线控制联动
  • 【Nexus】Maven 私服搭建以及上传自己的Jar包
  • 稀疏矩阵(信息学奥赛一本通-2042)
  • 【Spring】详细剖析Spring程序
  • 【AWS入门】2025 AWS亚马逊云科技账户注册指南
  • 华三防火墙-HA主备模式
  • 数据结构:UNSW新南学COMP9024真题讲解
  • Redis 事务底层实现
  • Windows下安装Git客户端
  • 438.找出字符串中所有字母异位词
  • 在 CentOS 上安装 Oracle 数据库
  • CentOS 7 系统上安装 SQLite
  • 进程管理:前后台切换
  • 基于OpenMV的车牌识别功能开发与优化研究
  • 落雪音乐Pro 8.8.6 | 内置8条音源,无需手动导入,纯净无广告
  • 【后端】【django】Django 自带的用户系统与 RBAC 机制
  • 面向对象Demo02
  • 面试总结:2024前端面试题