拓扑
系统配置
[Huawei]dhcp enable
配置静态路由,所有IP下一跳(外网网关)
[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.1.254
创建及配置访问控制列表
[Huawei]acl number 2001
[Huawei-acl-basic-2001]rule 1 permit source 172.16.1.0 0.0.0.255
互联网配置
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.3.213 255.255.252.0
互联网端口执行acl 2001访问控制列表内容
[Huawei-GigabitEthernet0/0/0]nat outbound 2001
内网配置
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 172.16.1.1 255.255.255.0
[Huawei-GigabitEthernet0/0/1]dhcp select interface
[Huawei-GigabitEthernet0/0/1]dhcp server dns-list 114.114.114.114
以下为配置文件内容,红色为配置项
<Huawei>dis cu
[V200R003C00]
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
dhcp enable
#
acl number 2001
rule 1 permit source 172.16.1.0 0.0.0.255
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
priority 15
#
interface GigabitEthernet0/0/0
ip address 192.168.3.213 255.255.252.0
nat outbound 2001
#
interface GigabitEthernet0/0/1
ip address 172.16.1.1 255.255.255.0
dhcp select interface
dhcp server dns-list 114.114.114.114
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.254
#
user-interface con 0
authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
<Huawei>
原创文章请注明转载自技术小站本文地址:http://www.i5i6.net/post/212.html,标题:华为路由器接入互联网 DHCP接口方式 配置