华为AR2220E-S 设置限制上网时间

华为AR2220E-S 设置限制上网时间

<staff_AR2220e>dis version

Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.160 (AR2200 V200R007C00SPCb00)
Copyright (C) 2011-2016 HUAWEI TECH CO., LTD
Huawei AR2220E-S Router uptime is 0 week, 3 days, 2 hours, 48 minutes
BKP 0 version information:

  1. PCB Version : AR01BAK2C VER.B
  2. If Supporting PoE : No
  3. Board Type : AR2220E-S
  4. MPU Slot Quantity : 1
  5. LPU Slot Quantity : 6

以下为配置信息注意斜体部分需要修改。
[V200R007C00SPCb00]
#
sysname staff_AR2220e
#

  • time-range staff-workingday 17:30 to 23:00 working-day
    time-range staff-workingday 07:00 to 23:00 off-day *
    #上部分斜体为设置可上网时间
    drop illegal-mac alarm
    #
    clock timezone BeijingChongqingHongKongUrumqi add 08:00:00
    #设置时区
    ipv6
    #
    dns resolve
    dns server 114.114.114.114
    dns proxy enable
    #
    dhcp enable
    #
    ip accounting mismatched-threshold 8192
    #
    pki realm default
    enrollment self-signed
    #
    ssl policy default_policy type server
    pki-realm default
    #
    acl name ls2 2998
    acl name GigabitEthernet0/0/1 2999
    rule 5 permit
    #
    acl name staff 3996
    rule 5 permit ip source 10.1.0.0 0.0.0.128 time-range staff-workingday
    acl name xiaofangju_leader 3997
  • rule 1 permit ip source 10.1.0.1 0
    rule 2 permit ip source 10.1.0.2 0

    rule 50 permit ip source 10.1.0.0 0.0.0.255 time-range staff-workingday
    acl number 3998
    acl name test 3999
    #斜体部分IP不受上网时间限制 rule50为对剩余ip进行上网时间控制
    aaa
    authentication-scheme default
    authorization-scheme default
    accounting-scheme default
    domain default
    domain default_admin

#
firewall zone Local
priority 64
#
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
combo-port auto
#
interface GigabitEthernet0/0/1
ip address 123.123.123.123 255.255.255.248
nat outbound 3997
#斜体处ip与掩码需要更换为自己的
interface GigabitEthernet0/0/2
tcp adjust-mss 1200
ip address 10.1.0.1 255.255.255.0
dhcp select interface
dhcp server excluded-ip-address 10.1.0.2 10.1.0.100
dhcp server excluded-ip-address 10.1.0.200 10.1.0.227
dhcp server dns-list 10.1.0.1
ip accounting input-packets
ip accounting output-packets
#
interface GigabitEthernet0/0/3
description VirtualPort
#
interface Cellular0/0/0
#
interface Cellular0/0/1
#
interface NULL0
#
info-center timestamp log format-date
#

#
telnet server enable
#
http secure-server port 4433
http secure-server ssl-policy default_policy
http server enable
http secure-server enable
#
ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet0/0/1 123.123.123.122
#斜体出更换为自己网关
fib regularly-refresh disable
#
user-interface con 0
authentication-mode aaa
user-interface vty 0
authentication-mode aaa
user privilege level 15
user-interface vty 1 4
authentication-mode aaa
#
wlan ac
#
undo ntp-service enable
ntp-service cwmp unicast-server 120.25.115.20 first
#此处禁止时间服务器
voice
#
diagnose
#
ops
#
autostart
#
return

注意可使用以下命令查看时间段是否生效
<staff_AR2220e>dis time-range all

华为AR2220E-S 设置限制上网时间

使用以下命令查看路由器当前时间
<staff_AR2220e>dis clock
2018-08-25 21:15:27
Saturday
Time Zone(BeijingChongqingHongKongUrumqi) : UTC+08:00
<staff_AR2220e>

设置时间使用以下命令
<Bloomage_SD_staff_AR2220e>clock datetime

转载于:https://blog.51cto.com/rewardhunter/2164376

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值