拨号上网怎么设置(简单拨号网络的配置PPPOE+DHCP+NAT配置——HUAWEI篇)

实验拓扑
拓扑说明: ISP 模拟营运商PPPOE Server路由器
client 模拟用户PPPOE Client路由器
实验要求: ISP 配置PPPOE认证方式为CHAP,账号密码均为 huawei
Client通过PPPOE拨号链接ISP,并作为DHCP Server为PC分配地址
在Client进行NAT转换,使PC可以访问外网
配置清单:
1、PPPOE部分配置
ISP配置
system-view
sysname ISP
ip pool pool1
gateway-list 202.100.1.1
network 202.100.1.0 mask 255.255.255.0 //配置分配给用户的地址池
aaa //配置CHAP认证的账号密码
local-user huawei password cipher huawei
local-user huawei service-type ppp
interface Virtual-Template1 //配置PPPOE 虚拟模板
ppp authentication-mode chap
remote address pool pool1
ip address 202.100.1.1 255.255.255.0
interface GigabitEthernet0/0/0 //端口绑定模板
pppoe-server bind Virtual-Template 1
Clent配置
system-view
sysname client
dialer-rule //配置拨号规则ip触发
dialer-rule 10 ip permit
interface Dialer1 //拨号口配置
link-protocol ppp
ppp chap user huawei
ppp chap password simple huawei
ip address ppp-negotiate //ip地址通过ppp协商获得
dialer user huawei
dialer bundle 2
dialer-group 10
mtu 1492
interface GigabitEthernet0/0/0 //绑定拨号口
pppoe-client dial-bundle-number 2
ip route-static 0.0.0.0 0.0.0.0 Dialer1 //配置默认路由,下一跳指向拨号口
实验测试,Client获取到IP地址,路由指向Dialer口


2、DHCP+NAT配置
Client配置
dhcp enable //开启DHCP服务
ip pool 10 //配置用户地址池
gateway-list 192.168.1.1
network 192.168.1.0 mask 255.255.255.0
lease day 0 hour 8 minute 0
dns-list 8.8.8.8
interface GigabitEthernet0/0/1 //配置用户网关接口,采用全局地址池
ip address 192.168.1.1 255.255.255.0
dhcp select global
acl number 2000 //配置ACL用来限定进行NAT的地址
rule 5 permit source 192.168.1.0 0.0.0.255
interface Dialer1
nat outbound 2000 //NAT采用EASY IP方式
PC端配置为自动获取方式

实验测试,PC获取到IP地址

实验测试,PC可以Ping通ISP

在Client查看NAT的会话信息
