华为dhcp/nat

华为dhcp/nat_第1张图片
相关配置:
r1:

#
interface GigabitEthernet0/0/0
 ip address 118.188.18.1 255.255.255.240

r2:

 vlan batch 10
#
 nat address-group 0 118.188.18.3 118.188.18.3    #配置nat地址池
#
dhcp enable                                                           #开启dhcp功能
#
acl number 2000                                                       #配置acl
 rule 10 permit source 192.168.1.0 0.0.0.255
#
ip pool 000                                                             #配置dhcp
 gateway-list 192.168.1.1
 network 192.168.1.0 mask 255.255.255.0
 dns-list 219.141.136.10
#
ip pool vlan
 gateway-list 192.168.2.1
 network 192.168.2.0 mask 255.255.255.0
 dns-list 219.141.136.10
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password cipher OOCM4m($F4ajUn1vMEIBNUw#
 local-user admin service-type http
#
firewall zone Local
 priority 16
#
interface Vlanif10
 ip address 192.168.2.1 255.255.255.0
 dhcp select global
#
interface Ethernet0/0/0
 ip address 192.168.1.1 255.255.255.0
 nat outbound 2000 address-group 0
dhcp select global
#
interface Ethernet0/0/1
#
interface Serial0/0/0
 link-protocol ppp
#
interface Serial0/0/1
 link-protocol ppp
#
interface Serial0/0/2
 link-protocol ppp
#
interface Serial0/0/3
 link-protocol ppp
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
 ip address 118.188.18.2 255.255.255.240
 nat outbound 2000 address-group 0         #接口nat应用
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 118.188.18.1    #添加默认路由

你可能感兴趣的:(swich)