DHCP配置
基于接口地址池
[FW] dhcp enable
[FW] interface GigabitEthernet 1/0/1
[FW-GigabitEthernet1/0/1] ip address 10.1.1.1 255.255.255.0
[FW-GigabitEthernet1/0/1] dhcp select interface
[FW-GigabitEthernet1/0/1] dhcp server lease day 30
[FW-GigabitEthernet1/0/1] dhcp server domain-name huawei.com
[FW-GigabitEthernet1/0/1] dhcp server dns-list 10.1.1.2
[FW-GigabitEthernet1/0/1] dhcp server excluded-ip-address 10.1.1.2
[FW-GigabitEthernet1/0/1] dhcp server static-bind ip-address 10.1.1.100 mac-address 286e-d488-b684
[FW-GigabitEthernet1/0/1] quit
[FW] display ip pool interface GigabitEthernet1/0/1
基于全局地址池
[FW] dhcp enable
[FW] ip pool dhcp-pool
[FW-ip-pool-dhcp-pool] network 10.1.1.0 mask 255.255.255.128
[FW-ip-pool-dhcp-pool] domain-name example.com
[FW-ip-pool-dhcp-pool] dns-list 10.1.1.2
[FW-ip-pool-dhcp-pool] excluded-ip-address 10.1.1.126
[FW-ip-pool-dhcp-pool] gateway-list 10.1.1.1
[FW-ip-pool-dhcp-pool] lease day 10 hour 12
[FW-ip-pool-dhcp-pool] static-bind ip-address 10.1.1.5 mac-address 0021-97cf-2238
[FW-ip-pool-dhcp-pool] reserved ip-address mac //保留IP地址分配记录
[FW] interface GigabitEthernet 1/0/1
[FW-GigabitEthernet1/0/1] ip address 10.1.1.1 255.255.255.128
[FW-GigabitEthernet1/0/1] dhcp select global
[FW] display dhcp server statistics
防火墙作为DHCP Relay(DHCP中继)
[FW] dhcp enable
[FW] interface GigabitEthernet 1/0/1
[FW-GigabitEthernet1/0/1] ip relay address 10.1.1.2
[FW-GigabitEthernet1/0/1] dhcp select relay
防火墙作为DHCP Client
[FW] interface GigabitEthernet 1/0/1
[FW-GigabitEthernet1/0/1] ip address dhcp-alloc
防火墙PPPoE拨号
配置dialer接口
interface Dialer0
link-protocol ppp
ppp chap user user1
ppp chap password cipher yourpassword
ppp pap local-user user password cipher yourpassowrd
ppp ipcp dns admit-any
ip address ppp-negotiate
dialer user user1
dialer bundle 1
绑定dialer到物理接口上
interface GigabitEthernet1/0/2
pppoe-client dial-bundle-number 1 ipv4