一、组网需求

由于家里宽带有ipv6地址,需要访问家里的nas等等网络设备,当然我的办公网络是独立的,不会与公司内网相连。

通过PPPOE拨号,建立IPV4/IPV6双栈连接

  • 设备通过PPP认证与PPPoE Server建立IPv6/ipv4双栈连接。
  • 当连接断开后,每隔一段时间设备会自动再次尝试建立拨号连接。

如下图所示,网络拓扑

二、操作步骤

1.全局使能IPV6

<USG6300E>system-view  
Enter system view, return user view with Ctrl+Z.
[USG6300E]ipv6        //使能设备IPv6功能。

2.配置Dialer接口

[Router] interface dialer 1 
[Router-Dialer1] dialer user user2 
[Router-Dialer1] dialer bundle 1 
[Router-Dialer1] ppp chap user user1@system 
[Router-Dialer1] ppp chap password cipher YsHsjx_202206 
[Router-Dialer1] ip address ppp-negotiate

3.使能DHCPv6客户端功能,并向server获取地址前缀

 ipv6 enable
 ipv6 address auto link-local  //无状态自动配置IPv6(全球单播)地址
 ipv6 address auto global     //设置IPv6链路本地地址
 ipv6 mtu 1484                //MTU
 undo service-manage enable
 dhcpv6 client pd test   //通过DHCPv6 PD向ISP请求前缀,dhcpv6-prefixname自定义

4.建立PPPoE会话

interface WAN0/0/0
 pppoe-client dial-bundle-number 1
 undo shutdown
 anti-ddos flow-statistic enable
 undo service-manage enable

5.验证配置结果

<USG6300E>display  dhcpv6 client 
2025-02-06 10:40:16.630 +08:00
Dialer0 is in DHCPv6-PD client mode.
DHCPv6-PD client is in BOUND state.
Preferred server DUID   : FE8000000000000002005EFFFE000167
  Reachable via address : FE80::200:5EFF:FE00:167
IA PD IA ID 0x00000241 T1 86400 T2 138240
  Prefix name  : test                             //PD名称,自定义
  Obtained     : 2025-02-05 14:45:10
  Renews       : 2025-02-06 14:45:10
  Rebinds      : 2025-02-07 05:09:10
  Prefix       : 240E:332:EDE:9100::/56            //ISP分配到本地的前缀,自行将前缀进一步划分
    Lifetime valid 259200 seconds, preferred 172800 seconds
    Expires at 2025-02-08 14:45:10(187495 seconds left)
DNS server     : 240E:47:0:701::1
               : 240E:47:0:702::1

此时,已经通过pppoe获取到了ipv6地址,当前防火墙/路由器可以访问ipv6网络,dis ip int br dialer 1 接口已经获取到了ipv6地址。

可以进行下一步,让终端用户获取到ipv6地址,访问ipv6网络

6.创建地址池,下发DNS

[USG6300E]dhcpv6 pool dns
[USG6300E-dhcpv6-pool-dns]dis	
[USG6300E-dhcpv6-pool-dns]display  this 
2025-02-06 11:26:58.560 +08:00
#
dhcpv6 pool dns
 dns-server 240E:47:0:701::1
 dns-server 240E:47:0:702::1
 dns-domain-name test.com  //自定义名称
#
return
[USG6300E-dhcpv6-pool-dns]

7.进一步划分IPV6前缀,接口配置dhcp并分配给终端用户

interface Vlanif20
 ipv6 enable
 ip address 192.168.20.1 255.255.255.0
 ipv6 address test ::1:192:168:20:1/64    //划分的v6地址前缀     
 ipv6 address auto link-local
 ipv6 mtu 1484
 undo ipv6 nd ra halt
 ipv6 nd autoconfig managed-address-flag
 ipv6 nd autoconfig other-flag
 alias vlanif20
 undo service-manage enable
 dhcp server mask 255.255.255.0
 dhcp server ip-range 192.168.20.100 192.168.20.249
 dhcp select interface
 dhcpv6 server dns
 dhcp server gateway-list 192.168.20.1
 dhcp server dns-list 192.168.1.100
#
return

此时终端用户已经可以获取到ipv6地址

  • alipay_img
此作者没有提供个人介绍
最后更新于 2025-02-12