一、配置步骤:
1、配置NAT、接口地址,并把NAT策略应用到外网口
2、配置DHCP地址池
3、配置DHCP 默认网关IP
4、配置DHCP DNS服务IP
5、配置DHCP 保留地址
6、配置默认路由
7、保存配置
二、配置:
<Quidway>sys
[Quidway]acl nu 2000
[Quidway-acl-basic-2000]rule 0 permit source 172.16.10.0 0.0.0.255
[Quidway-acl-basic-2000]q
[Quidway]nat address-group 0 202.99.99.100 202.99.99.100
[Quidway]int e0/0
[Quidway-Ethernet0/0]ip add 202.99.99.100 255.255.255.248
[Quidway-Ethernet0/0]nat outbound 2000 address-group 0
[Quidway-Ethernet0/0]q
[Quidway]int e0/1
[Quidway-Ethernet0/1]ip add 172.16.10.254 255.255.255.0
[Quidway-Ethernet0/1]q
[Quidway]dhcp server ip-pool 1
[Quidway-dhcp-pool-1]network 172.16.10.0 mask 255.255.255.0
[Quidway-dhcp-pool-1]gateway-list 172.16.10.254
[Quidway-dhcp-pool-1]dns-list 202.99.96.68
[Quidway-dhcp-pool-1]q
[Quidway]dhcp server forbidden-ip 172.16.10.1 172.16.10.20
[Quidway]ip route-static 0.0.0.0 0.0.0.0 202.99.99.99
[Quidway]q
<Quidway>save
The configuration will be written to the device.
Are you sure?[Y/N]y
Now saving current configuration to the device.
Saving configuration flash:/vrpcfg.cfg. Please wait...
...............
Current configuration has been saved to the device successfully.
[Quidway]dis cur
#
sysname Quidway
#
cpu-usage cycle 1min
#
nat address-group 0 202.99.99.100 202.99.99.100
#
radius scheme system
#
domain system
#
local-user admin
password cipher .]@USE=B,53Q=^Q`MAF4<1!!
service-type telnet terminal
level 3
service-type ftp
#
dhcp server ip-pool 1
network 172.16.10.0 mask 255.255.255.0
gateway-list 172.16.10.254
dns-list 202.99.96.68
#
acl number 2000
rule 0 permit source 172.16.10.0 0.0.0.255
#
interface Aux0
async mode flow
#
interface Ethernet0/0
ip address 202.99.99.100 255.255.255.248
nat outbound 2000 address-group 0
#
interface Ethernet0/1
ip address 172.16.10.254 255.255.255.0
#
interface Serial0/0
clock DTECLK1
link-protocol ppp
ip address dhcp-alloc
#
interface NULL0
#
FTP server enable
#
dhcp server forbidden-ip 172.16.10.1 172.16.10.20
#
ip route-static 0.0.0.0 0.0.0.0 202.99.99.99 preference 60
#
user-interface con 0
user-interface aux 0
user-interface vty 0 4
authentication-mode scheme
#
return