请问各位有没有什么办法能限制机器MAC上网的速度,带宽。
不行的话,限制IP的速度,通过同一个出口现在有些人下资料,影响其它人使用。
我们出口是静态的WAN的地址,做的nat。 pc---防火墙---电信宽带。
(0)
最佳答案
可以基于IP限速
内网主机通过Device与外网相连,通过在Device上配置带宽管理功能,实现当内网流量的出口发生拥塞时优先保证FTP业务的需求。具体要求如下:
· 限制内网用户,访问外网爱奇艺(iQiYiPPS)应用流量的上行最大带宽和下行最大带宽均为30720kbps。
· 保证内网用户,访问外网FTP应用流量的上行保证带宽和下行保证带宽均为30720kbps。
· 限制外网出接口的最大带宽为102400kbps。
图1-2 单通道模式带宽管理配置组网图
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] ip address 10.1.1.1 255.255.255.0
[Device-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
(2) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由。本举例假设设备Device到达外网服务器3.1.1.2/24的下一跳为20.1.1.2,实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ip route-static 3.1.1.2 24 20.1.1.2
(3) 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/0/1
[Device-security-zone-Trust] quit
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/0/2
[Device-security-zone-Untrust] quit
(4) 配置安全策略
# 配置名称为trust-untrust的安全策略规则,使内网主机可以访问Internet。具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name trust-untrust
[Device-security-policy-ip-1-trust-untrust] source-zone trust
[Device-security-policy-ip-1-trust-untrust] destination-zone untrust
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.2
[Device-security-policy-ip-1-trust-untrust] action pass
[Device-security-policy-ip-1-trust-untrust] quit
[Device-security-policy-ip] quit
(5) 配置带宽通道
# 创建名为aiqiyi的带宽通道,配置该带宽通道的上/下行最大带宽均为30720kbps。
[Device] traffic-policy
[Device-traffic-policy] profile name aiqiyi
[Device-traffic-policy-profile-aiqiyi] bandwidth upstream maximum 30720
[Device-traffic-policy-profile-aiqiyi] bandwidth downstream maximum 30720
[Device-traffic-policy-profile-aiqiyi] quit
# 创建名为profileftp的带宽通道,配置该带宽通道的上/下行保证带宽均为30720kbps。
[Device-traffic-policy] profile name profileftp
[Device-traffic-policy-profile-profileftp] bandwidth upstream guaranteed 30720
[Device-traffic-policy-profile-profileftp] bandwidth downstream guaranteed 30720
[Device-traffic-policy-profile-profileftp] quit
[Device-traffic-policy] quit
(6) 配置出接口的最大带宽
# 配置接口GigabitEthernet1/0/2的期望带宽为102400kbps。
[Device] interface gigabitethernet 1/0/2
[Device-GigabitEthernet1/0/2] bandwidth 102400
[Device-GigabitEthernet1/0/2] quit
(7) 配置带宽策略规则
# 创建名为aiqiyi的带宽策略规则,在带宽策略中引用预定义应用iQiYiPPS,配置带宽策略的动作为限流并引用带宽通道aiqiyi。
[Device] traffic-policy
[Device-traffic-policy] rule name aiqiyi
[Device-traffic-policy-rule-1-aiqiyi] application app iQiYiPPS
[Device-traffic-policy-rule-1-aiqiyi] action qos profile aiqiyi
[Device-traffic-policy-rule-1-aiqiyi] quit
# 创建名为ruleftp的带宽策略规则,在带宽策略中引用预定义应用ftp,配置带宽策略规则动作为限流并引用带宽通道profileftp。
[Device-traffic-policy] rule name ruleftp
[Device-traffic-policy-rule-2-ruleftp] application app ftp
[Device-traffic-policy-rule-2-ruleftp] action qos profile profileftp
[Device-traffic-policy-rule-2-ruleftp] quit
[Device-traffic-policy] quit
配置完成后,当出接口GigabitEthernet1/0/2的流量达到102400kbps后,爱奇艺应用的流量最大只能达到30720kbps,FTP应用的流量能够保证最少达到30720kbps。
(0)
能不能基于MAC这样? 或者说能不能基于IP同时,IP和mac做绑定。 IP 有些人老是自己改来该去。
,没办法基于MAC的,每IP限速
1-4 基于用户限速带宽管理配置组网图
(1) 配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] ip address 10.1.1.1 255.255.255.0
[Device-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
(2) 配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由。本举例假设设备Device到达外网服务器3.1.1.2/24的下一跳为20.1.1.2,实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ip route-static 3.1.1.2 24 20.1.1.2
(3) 配置接口加入安全域。
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/0/1
[Device-security-zone-Trust] quit
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/0/2
[Device-security-zone-Untrust] quit
(4) 配置安全策略。
# 配置名称为trust-untrust的安全策略规则,使内网Host访问外网Internet的报文可通,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name trust-untrust
[Device-security-policy-ip-1-trust-untrust] source-zone trust
[Device-security-policy-ip-1-trust-untrust] destination-zone untrust
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.2
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.3
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.4
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.5
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.6
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.21
[Device-security-policy-ip-1-trust-untrust] source-ip-host 10.1.1.22
[Device-security-policy-ip-1-trust-untrust] action pass
[Device-security-policy-ip-1-trust-untrust] quit
[Device-security-policy-ip] quit
# 创建名为student1的本地接入用户并设置密码。
[Device] local-user student1 class network
[Device-luser-network-student1] password simple student
# 指定用户student1可以使用的服务类型为IKE、Portal以及SSL VPN。
[Device-luser-network-student1] service-type ike
[Device-luser-network-student1] service-type portal
[Device-luser-network-student1] service-type sslvpn
[Device-luser-network-student1] quit
# 创建学生用户student2~student5,密码均为student;教师用户teacher1、teacher2,密码均为teacher。教师用户和学生用户可用服务均为IKE、Portal、SSL VPN。(具体配置步骤请参考上述学生用户student1的配置步骤)
# 创建名为student的用户组,并添加身份识别成员学生用户student1~student5。
[Device] user-group student
[Device-ugroup-student] identity-member user student1
[Device-ugroup-student] identity-member user student2
[Device-ugroup-student] identity-member user student3
[Device-ugroup-student] identity-member user student4
[Device-ugroup-student] identity-member user student5
[Device-ugroup-student] quit
# 创建名为teacher的用户组,并添加身份识别成员教师用户teacher1和teacher2。
[Device] user-group teacher
[Device-ugroup-teacher] identity-member user teacher1
[Device-ugroup-teacher] identity-member user teacher2
[Device-ugroup-teacher] quit
# 创建静态类型的身份识别用户并开启身份识别功能
[Device] user-identity static-user student1 bind ipv4 10.1.1.2
[Device] user-identity static-user student2 bind ipv4 10.1.1.3
[Device] user-identity static-user student3 bind ipv4 10.1.1.4
[Device] user-identity static-user student4 bind ipv4 10.1.1.5
[Device] user-identity static-user student5 bind ipv4 10.1.1.6
[Device] user-identity static-user teacher1 bind ipv4 10.1.1.21
[Device] user-identity static-user teacher2 bind ipv4 10.1.1.22
[Device] user-identity enable
(6) 配置带宽通道
# 创建名为profile-teacher的带宽通道,配置该带宽通道上/下行最大带宽均为10000kbps、每用户的最大连接数为10000,转发流量优先级为较低(2)。
[Device] traffic-policy
[Device-traffic-policy] profile name profile-teacher
[Device-traffic-policy-profile-profile-teacher] bandwidth upstream maximum per-user 10000
[Device-traffic-policy-profile-profile-teacher] bandwidth downstream maximum per-user 10000
[Device-traffic-policy-profile-profile-teacher] connection-limit count per-user 10000
[Device-traffic-policy-profile-profile-teacher] traffic-priority 2
[Device-traffic-policy-profile-profile-teacher] quit
# 创建名为profile-student的带宽通道,配置该带宽通道的上/下行最大带宽均为2000kbps、每用户的最大连接数为10000、转发流量优先级为最低(1)。
[Device-traffic-policy] profile name profile-student
[Device-traffic-policy-profile-profile-student] bandwidth upstream maximum per-user 2000
[Device-traffic-policy-profile-profile-student] bandwidth downstream maximum per-user 2000
[Device-traffic-policy-profile-profile-student] connection-limit count per-user 10000
[Device-traffic-policy-profile-profile-student] traffic-priority 1
[Device-traffic-policy-profile-profile-student] quit
(7) 配置带宽策略
# 创建名为rule-teacher的带宽策略规则,指定该带宽策略匹配报文的用户组为teacher,引用带宽通道profile-teacher,配置动作为限流。
[Device-traffic-policy] rule name rule-teacher
[Device-traffic-policy-rule-1-rule-teacher] user-group teacher
[Device-traffic-policy-rule-1-rule-teacher] action qos profile profile-teacher
[Device-traffic-policy-rule-1-rule-teacher] quit
# 创建名为rule-student的带宽策略规则,指定该带宽策略匹配报文的用户组为student,引用带宽通道profile-student,配置动作为限流。
[Device-traffic-policy] rule name rule-student
[Device-traffic-policy-rule-2-rule-student] user-group student
[Device-traffic-policy-rule-2-rule-student] action qos profile profile-student
[Device-traffic-policy-rule-2-rule-student] quit
[Device-traffic-policy] quit
(0)
问题是这个mac绑定没什么用, mac绑定是怎么个做法, 我是不是做错了。
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
,没办法基于MAC的,每IP限速