|
华为路由器qos car+nat+dhcp+vlan配置心得
需求:
应该是个小型的办公网络,主要有两个部门,用vlan进行隔离,并对其进行限速,vlan1是3M,vlan2为1M(看来接vlan1的应该是领导级别的人物),同时运行dhcp,下面的pc使用自动获取ip.
不错,经典案例,值得收藏.
华为1821路由器具体配置如下:
#
sysname Quidway
#
clock timezone gmt-12:000 minus 12:00:00
#
cpu-usage cycle 1min
#
connection-limit disable
connection-limit default action deny
connection-limit default amount upper-limit 50 lower-limit 20
#
web set-package force flash:/http.zip
#
radius scheme system
#
domain system
#
local-user *******
password cipher .]@*********
service-type telnet terminal
level 3
service-type ftp
#
acl number 2000 配置nat Acl
rule 0 permit source 192.168.0.0 0.0.0.255
#
acl number 3000 配置nat Acl
rule 0 permit ip source 192.168.1.0 0.0.0.255
acl number 3001 配置 Firewall Acl
rule 0 deny ip destination 192.168.1.0 0.0.0.255
acl number 3002 配置 Firewall Acl
rule 0 deny ip destination 192.168.0.0 0.0.0.255
#
interface Ethernet1/0
ip address dhcp-alloc
#
interface Ethernet1/0.1
ip address 192.168.0.1 255.255.255.0
dhcp select interface dhcp 应用于子接口
dhcp server dns-list 202.106.0.20 202.106.196.115
firewall packet-filter 3001 inbound firewall ACL过滤应用于接口
vlan-type dot1q vid 2 子接口封装dot1q
qos car inbound any cir 3072000 cbs 153600 ebs 1000 green pass red discard
流量限速qos car 配置
qos car outbound any cir 3072000 cbs 153600 ebs 1000 green pass red discard
流量限速qos car 配置
#
interface Ethernet1/0.2
ip address 192.168.1.1 255.255.255.0
dhcp select interface dhcp 应用于子接口
dhcp server dns-list 202.106.0.20 202.106.196.115
firewall packet-filter 3002 inbound firewall ACL过滤应用于接口
vlan-type dot1q vid 3 子接口封装dot1q
qos car inbound any cir 1024000 cbs 51200 ebs 1000 green pass red discard
流量限速qos car 配置
qos car outbound any cir 1024000 cbs 51200 ebs 1000 green pass red discard
流量限速qos car 配置
#
interface Ethernet1/1
port access vlan 2 将e1/1端口加入vlan2
#
interface Ethernet1/2
port access vlan 3 将e1/1端口加入vlan2
#
interface Ethernet1/3
#
interface Ethernet1/4
#
interface Ethernet2/0 进入wan口配置
ip address X、X、X、X 255.255.255.224
nat outbound 3000
nat outbound 2000
#
interface NULL0
#
FTP server enable
#
ip route-static 0.0.0.0 0.0.0.0 y、y、y、y preference 60
#
user-interface con 0 用户登录配置
authentication-mode password
set authentication password cipher 0HB8%-MB%I^[Q1R','&6NQ!!
user-interface vty 0 4
user privilege level 3
set authentication password cipher 0HB8%-MB%I^[Q1R','&6NQ!!
#
return |
|