- 创建dialer接口
interface Dialer0
link-protocol ppp
ppp chap user pppoe-user
ppp chap password cipher 123456
ppp pap local-user pppoe-user password cipher 123456
ppp ipcp dns admit-any
mtu 1492
ipv6 enable
ip address ppp-negotiate
dialer user pppoe-user
dialer bundle 1
dialer number 0 autodial
ipv6 address auto link-local
ipv6 address auto global
ipv6 mtu 1492
healthcheck wan0
service-manage https permit
service-manage ssh permit
redirect-reverse
ipv6 redirect-reverse
dhcpv6 client pd v6pd1
- 创建健康检查
healthcheck name wan0
destination 223.5.5.5 interface Dialer0 protocol dns
- 创建NAT
nat-policy
rule name Internet
source-zone 办公网
egress-interface Dialer0
action source-nat easy-ip
- 创建默认路由
ip route-static 0.0.0.0 0 Dialer0
ipv6 route-static :: 0 Dialer0
- 绑定pppoe会话到wan0口
interface WAN0/0/0
pppoe-client dial-bundle-number 1
undo shutdown
anti-ddos flow-statistic enable
service-manage https permit
service-manage ssh permit
- 配置lan口
dhcpv6 pool pool1
dns-server FD06::1
interface Vlanif6
ipv6 enable
ip address 192.168.2.1 255.255.255.0
ipv6 address v6pd1 ::1:0:0:0:1/64
ipv6 address FD06::1/64
ipv6 address auto link-local
ipv6 address auto global
ipv6 mtu 1492
undo ipv6 nd ra halt
ipv6 nd autoconfig other-flag
alias Vlanif6
service-manage http permit
service-manage https permit
service-manage ping permit
service-manage ssh permit
dhcp server mask 255.255.255.0
dhcp server ip-range 192.168.2.1 192.168.2.254
dhcp select interface
dhcpv6 server pool1
dhcp server gateway-list 192.168.2.1
dhcp server dns-list 192.168.2.1
注意:
如果拨号成功后ipv6不通,可以删除并重新配置以下命令:
ipv6 address auto link-local
ipv6 address auto global
dhcpv6 client pd v6pd1
如果ipv6上网不稳定还可以配置以下命令:
tcp ipv6 max-mss 1432
Views: 1