带宽管理配置实验

server/2025/3/15 5:49:30/

一、实验拓扑

 配置流程:
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.ppmy.cn/server/175072.html

相关文章

设计:用创意灵感勾勒界面灵魂,引领用户情感共鸣

在当今数字化飞速发展的时代&#xff0c;UI 设计已不再仅仅局限于构建美观的界面&#xff0c;它更是一门用创意灵感勾勒界面灵魂&#xff0c;从而引领用户情感共鸣的艺术。一个成功的 UI 设计能够在用户与产品之间搭建起一座无形的桥梁&#xff0c;使两者之间产生深度的情感连接…

《Python全栈开发》第8课:Python后端入门 - Flask框架基础

🌟 课程目标 掌握Flask开发环境搭建理解路由与视图函数工作原理学会处理请求与返回JSON响应完成第一个后端API开发一、Flask是什么?(餐厅服务员比喻) 1.1 前后端分工 #mermaid-svg-oHBE8WyDrAoZPoBY {font-family:"trebuchet ms",verdana,arial,sans-serif;fon…

HarmonyOS Next~HarmonyOS 应用开发利器:ArkData 深度解析

HarmonyOS 应用开发利器&#xff1a;ArkData 深度解析 ​ HarmonyOS 作为一款面向全场景的分布式操作系统&#xff0c;其应用开发工具链也在不断完善。ArkData 作为 HarmonyOS 应用开发中的重要一环&#xff0c;为开发者提供了高效、便捷的数据管理解决方案。本文将深入解析 A…

sqldef:一款免费的数据库变更管理工具

应用程序的升级通常伴随着数据库表结构的变更&#xff0c;为了维护各种环境的数据库变更&#xff0c;我们通常需要引入 Liquibase 或者 Flyaway 这样的数据库版本控制工具。不过&#xff0c;这类工具通常需要绑定某种编程语言&#xff0c;例如 Java&#xff1b;这次我们介绍一个…

kotlin与MVVM的结合使用总结(二)

在 MVVM&#xff08;Model - View - ViewModel&#xff09;架构中&#xff0c;M 层即 Model 层&#xff0c;主要负责数据的管理、存储和获取&#xff0c;它与业务逻辑和数据处理相关。在 Kotlin 中实现 MVVM 的 M 层&#xff0c;通常会涉及数据类的定义、数据的本地存储与远程获…

【蓝桥杯】第15届c++B组--R格式

问题描述 小蓝最近在研究一种浮点数的表示方法&#xff1a;RR 格式。对于一个大于 0 的浮点数 dd&#xff0c;可以用 RR 格式的整数来表示。给定一个转换参数 nn&#xff0c;将浮点数转换为 RR 格式整数的做法是: 将浮点数乘以 2n2n&#xff1b; 四舍五入到最接近的整数。 …

AWS Bedrock全托管接入国产大模型DeepSeek-R1[内涵免费使用DeepSeek-R1满血版]

国产大模型DeepSeek-R1全面登陆AWS Bedrock&#xff1a;企业级生成式AI的新标杆 一、技术突破&#xff1a;全托管服务正式上线 北京时间2025年3月11日&#xff0c;亚马逊云科技宣布国产大模型DeepSeek-R1正式成为首个在Amazon Bedrock平台提供全托管服务的中文大语言模型。此次…

侯捷 C++ 课程学习笔记:C++ 新标准11/14

演进、环境与资源 C2.0 &#xff08;C11/14&#xff09;新特性 语言&#xff08;只谈新东西&#xff09;&#xff0c;需要具备&#xff0c;C 语法和语意的基础 C Standard 之演化 C 98&#xff08;1.0&#xff09;、C 03&#xff08;TR1&#xff0c;Technical Report 1&…