配置需求或说明:
1.1适用产品系列
本案例适用于ComwareV7平台的MSR830-WiNet系列路由器,如MSR830-10BEI-WiNet、
MSR830-6EI-WiNet、MSR830-5BEI-WiNet、MSR830-6BHI-WiNet、MSR830-10BHI-WiNet
等
1.2配置需求及实现的效果
路由器作为企业网络的出口路由器,要实现WAN口配置PPPOE上网。此案例中,运营商给的
PPPOE的账户为abc,密码为123456,内网地址段为192.168.0.1/23,运营商的DNS地址为5.5.5.5
和6.6.6.6,内网电脑要自动获取地址访问互联网
二,组网:
三,配置步骤:
3.1 配置WAN接口地址
配置拨号口,拨号的用户名为abc,密码为123456
<H3C>system-view
[H3C] dialer-group 1 rule ip permit
[H3C] interface dialer 1
[H3C-Dialer1] dialer bundle enable
[H3C-Dialer1] dialer-group 1
[H3C-Dialer1] ip address ppp-negotiate
[H3C-Dialer1] dialer timer idle 0
[H3C-Dialer1] ppp chap user abc
[H3C-Dialer1] ppp chap password simple 123456
[H3C-Dialer1] ppp pap local-user abc password simple 123456
[H3C-Dialer1] ppp ipcp dns admit-any
[H3C-Dialer1] ppp ipcp dns request
[H3C-Dialer1] quit
将拨号口绑定实际的物理接口
[H3C]interface GigabitEthernet 0/0
[H3C-GigabitEthernet0/0] pppoe-client dial-bundle-number 1
3.2 配置内网网关
一般情况下Comware V7平台MSR830-WiNet系列路由器设备默认已经配置内网网关Vlan1地址为
192.168.0.1/23,DHCP 服务器已经默认开启,如果内网是192.168.0.1/23网段,则不需配置这一
步
<H3C>interface Vlan-interface1
[H3C-Vlan-interface1]ip address 192.168.0.1 255.255.254.0
[H3C-Vlan-interface1]quit
3.3 设置DHCP
缺省情况下,DHCP服务器已经默认开启,设备默认DHCP分配的网段为192.168.0.0/23,默认分
配的DNS地址是网关地址192.168.0.1,如果局域网电脑需要自动获取IP地址和DNS地址上网,那
就需要根据实际情况设置对应DHCP地址池的参数
#进入系统缺省VLAN1的DHCP地址池
[H3C]dhcp server ip-pool lan1
#配置要分配的地址网段
[H3C-dhcp-pool-lan1] network 192.168.0.0 mask 255.255.254.0
#配置指定客户端IP地址段
address range 192.168.0.100 192.168.0.200
#配置指定客户端禁止获取IP地址
dhcp enable
dhcp server forbidden-ip 192.168.0.1
dhcp server forbidden-ip 192.168.20.1
dhcp server forbidden-ip 192.168.22.1
dhcp server forbidden-ip 192.168.30.1
dhcp server forbidden-ip 192.168.40.1
#配置全局DNS代理
dns proxy enable
dns server 114.114.114.114
dns server 202.102.192.68
dns server 202.102.199.68
#配置客户端的网关地址
[H3C-dhcp-pool-lan1]gateway-list 192.168.0.1
#修改下发的dns地址,此处填写运营商实际提供的DNS地址,可以设置一个,也可以设置多个
[H3C-dhcp-pool-lan1] dns-list 5.5.5.5 6.6.6.6
[H3C-dhcp-pool-lan1]quit
3.4 在拨号口配置NAT,实现内网地址上网进行源地址转换
[H3C]interface Dialer 1
[H3C-Dialer1]nat outbound
[H3C]quit
3.5 配置默认路由
#默认路由下一跳地址配置运营商分配的网关地址
[H3C]ip route-static 0.0.0.0 0.0.0.0 Dialer 1
3.6 保存配置
[H3C]save force
MSR830-WiNet系列路由器基本上网(静态IP)命令行配置(V7):https://www.hao0564.com/4794.html