电信静态公网ip上网

system
acl number 2000
rule permit source 192.168.2.0 0.0.0.255
quit
int vlan 1
ip address 192.168.2.1 255.255.255.0
quit
int eth0/0
ip address 公网ip ,子网掩码
nat outbound 2000
quit
dhcp server ip-pool server
network 192.168.2.0 mask 255.255.255.0
gateway 192.168.1.1
dns 202.106.0.20 8.8.8.8
quit
dhcp enable
dhcp server forbidden-ip 192.168.2.10 192.168.2.254
ip route 0.0.0.0 0.0.0.0(公网网关)
save

记得保存,配置好一断电,就会恢复出厂设置。

路由器pppoe配置文档和配置详解

<Quidway> system-view
 进入系统视图
 
[Quidway] dialer-rule 1 ip permit
 创建dialer-rule 1
 
[Quidway] acl number 2000
 创建访问控制列表
 
[Quidway-acl-basic-2000] rule 0 permit source 192.168.1.0 0.0.0.255
 配置允许nat转换的网段
 
[Quidway-acl-basic-2000] rule 1 deny
 
 
[Quidway-acl-basic-2000] quit
 
 
[Quidway] interface Dialer1
 进入dialer口
 
[Quidway-Dialer1] ppp chap user  (Adsl拔号的用户名)

 Adsl拔号的用户名,由运营商提供
 
[Quidway-Dialer1] ppp chap password simple (密码)

 Adsl拔号的密码,由运营商提供
 
[Quidway-Dialer1] ppp pap local-user 用户名 password simple 密码

 Adsl拔号的用户名和密码,由运营商提供
 
[Quidway-Dialer1] tcp mss 1024
 Tcp的最大分片单元
 
[Quidway-Dialer1] ip address ppp-negotiate
 IP地址通过PPP协商获取
 
[Quidway-Dialer1] dialer user huawei3com
 
 
[Quidway-Dialer1] dialer-group 1
 引用dialer-rule 1
 
[Quidway-Dialer1] dialer bundle 1
 

[Quidway-Dialer1] nat outbound 2000
 
 
[Quidway-Dialer1] quit
 
 
[Quidway] interface Ethernet0/1
 进入到lan口
 
[Quidway-Ethernet1/0] ip address 192.168.1.1 255.255.255.0
 配置lan口地址
 
[Quidway-Ethernet1/0] quit
 
 
[Quidway] interface Ethernet0/1
 进入WAN0口
 
[Quidway-Ethernet2/0] pppoe-client dial-bundle-number 1
 将dialer 1口绑定到WAN口
 
[Quidway-Ethernet2/0] quit
 
 
[Quidway] ip route-static 0.0.0.0 0.0.0.0 Dialer 1 preference 60
 配置dialer 1作为默认路由出口
 
[Quidway] quit
 
 
<Quidway> save
 保存配置