- 创建dialer接口
acl 3998
rule 10 permit ip
interface Dialer1
link-protocol ppp
ppp ipcp default-route
ppp chap user pppoe-user
ppp chap password cipher 123456
ppp pap local-user pppoe-user password cipher 123456
ppp ipcp dns admit-any
ppp ipcp dns request
ipv6 enable
tcp adjust-mss 1452
ip address ppp-negotiate
dialer user pppoe-user
dialer bundle 1
dialer number 1 autodial
ipv6 address auto link-local
ipv6 address auto global default
ipv6 mtu 1492
nat outbound 3998
dhcpv6 client pd v6pd1
sa application-statistic enable
- 绑定pppoe会话到wan 0/0/9端口
interface GigabitEthernet0/0/9
pppoe-client dial-bundle-number 1
ip address 192.168.1.2 255.255.255.0
nat outbound 3997
ip accounting input-packets
ip accounting output-packets
sa application-statistic enable
- 配置lan口
dhcpv6 pool pool1
dns-server FD11::1
interface Vlanif101
mtu 1492
ipv6 enable
ip address 192.168.101.1 255.255.255.0
ipv6 address v6pd1 ::1:0:0:0:1/64
ipv6 address FD11::1/64
ipv6 address auto link-local
ipv6 address auto global
ipv6 mtu 1492
undo ipv6 nd ra halt
ipv6 nd autoconfig other-flag
dhcp select interface
dhcpv6 server pool1
dhcp server dns-list 192.168.101.1
注意:
如果ipv6不稳定可以添加以下配置:
tcp ipv6 max-mss 1432
在lan口上配置mtu是因为路由器的path mtu不能正常起作用,正常情况下是不需要的。