您的位置:首页 > 娱乐 > 明星 > 华为AR路由使用PPPoE获取IPv6地址上网

华为AR路由使用PPPoE获取IPv6地址上网

2024/12/21 20:28:30 来源:https://blog.csdn.net/wuhao0015/article/details/141672513  浏览:    关键词:华为AR路由使用PPPoE获取IPv6地址上网

公司搬家,从原有的思科设备换成华为AR路由器,有空研究了下华为AR路由器通过PPPoE拨号获取v6地址,且通过DHCPv6-PD给内网客户端分配地址。

全局开启IPv6

ipv6

基本PPPoE配置

interface Dialer1link-protocol pppppp chap user 011111063930ppp chap password cipher %^%#owP[R9/aFQA\~=4_*D+&N-ZU~$x&J$YIpz8<]3'G%^%#mtu 1492ipv6 enabletcp adjust-mss 1452ip address ppp-negotiatedialer user 011111063930dialer bundle 1ipv6 address auto link-local          #自动配置链路本地地址ipv6 address auto global default          #自动获取IPV6地址并添加默认路由nat outbound 3000 dhcpv6 client pd IPV6          #通过dhcpv6获取运营商前缀,前缀名称叫IPV6interface GigabitEthernet0/0/2pppoe-client dial-bundle-number 1 description To:ISPundo lldp enableacl number 3000  rule 5 permit ip source 192.168.0.0 0.0.255.255 

配置IPV6的DHCP服务器给客户端下发DNS服务器地址

dhcpv6 pool IPV6dns-server 240E:5A::6666dns-server 240E:5B::6666dns-domain-name iteachs.com

配置路由器接口

interface GigabitEthernet0/0/1description To:Inside-IPV6
#
interface GigabitEthernet0/0/1.186          #这边配置采用子接口的方式和客户端互联dot1q termination vid 186ipv6 enableipv6 address IPv6 ::1:0:0:0:1/64          #前缀拿到的地址可能是/60的,这里分配/64的网段从1开始ipv6 address auto link-localundo ipv6 nd ra halt          #开启RA功能,使客户端可以无状态获取地址ipv6 nd autoconfig managed-address-flag          #如果使用无状态获取地址可以不配置ipv6 nd autoconfig other-flag          #配置允许下发DNS地址ipv6 nd ns multicast-enable          #开启允许NS的组播功能,此功能不开启,无法解析下挂路由器的邻居,导致直连不通dhcpv6 server IPV6          #绑定dhcpv6的服务
#
interface GigabitEthernet0/0/1.188dot1q termination vid 188ipv6 enableip address 192.168.188.252 255.255.255.0ipv6 address IPv6 ::3:0:0:0:1/64ipv6 address auto link-localundo ipv6 nd ra haltipv6 nd autoconfig managed-address-flagipv6 nd autoconfig other-flagipv6 nd ns multicast-enabledhcpv6 server IPV6
#
interface GigabitEthernet0/0/1.189dot1q termination vid 189ipv6 enableipv6 address IPv6 ::4:0:0:0:1/64ipv6 address auto link-localundo ipv6 nd ra haltipv6 nd autoconfig managed-address-flagipv6 nd autoconfig other-flagipv6 nd ns multicast-enable              dhcpv6 server IPV6
#

至此配置完成。

查看IPv6地址

<XXX-IPV6-R1>dis ipv inter brief
*down: administratively down
(l): loopback
(s): spoofing
Interface                    Physical              Protocol   
Dialer1                      up                    up(s)      
[IPv6 Address] 240E:3A0:611:A77:5EE7:47D5:74DB:3F99
GigabitEthernet0/0/1.186     up                    up         
[IPv6 Address] 240E:3A2:610:4291::1
GigabitEthernet0/0/1.188     up                    up         
[IPv6 Address] 240E:3A2:610:4293::1
GigabitEthernet0/0/1.189     up                    up         
[IPv6 Address] 240E:3A2:610:4294::1

查看运营商获取的前缀

<XXXX-IPV6-R1>dis dhcpv6 client prefix 
Prefix name       : IPV6Prefix          : 240E:3A2:610:4290::/60Life time(sec): valid 7200 preferred 3600

查看NDP邻居

<XXXX-IPV6-R1>dis ipv6 neighbors GigabitEthernet 0/0/1.188
-----------------------------------------------------------------------------
IPv6 Address : 240E:3A2:610:4293:20C:29FF:FE98:DCDA              
Link-layer   : 000c-2998-dcda                     State : STALE        
Interface    : GE0/0/1.188                        Age   : 00h08m10s           
VLAN         : 188                                CEVLAN: -                   
VPN name     :                                    Is Router: FALSE            
Secure FLAG  : UN-SECURE                          IPv6 Address : 240E:3A2:610:4293:250:56FF:FE93:7BD9              
Link-layer   : 0050-5693-7bd9                     State : STALE        
Interface    : GE0/0/1.188                        Age   : 00h19m03s           
VLAN         : 188                                CEVLAN: -                   
VPN name     :                                    Is Router: TRUE             
Secure FLAG  : UN-SECURE                          IPv6 Address : 240E:3A2:610:4293:250:56FF:FE93:A987              
Link-layer   : 0050-5693-a987                     State : STALE        
Interface    : GE0/0/1.188                        Age   : 00h17m47s           
VLAN         : 188                                CEVLAN: -                   
VPN name     :                                    Is Router: FALSE            
Secure FLAG  : UN-SECURE                          IPv6 Address : 240E:3A2:610:4293:812:E449:C386:B09D              
Link-layer   : 0050-5693-a002                     State : STALE        
Interface    : GE0/0/1.188                        Age   : 00h02m09s           
VLAN         : 188                                CEVLAN: -                   
VPN name     :                                    Is Router: FALSE            
Secure FLAG  : UN-SECURE                          IPv6 Address : 240E:3A2:610:4293:1018:3A44:747:460               
Link-layer   : 0050-5693-a002                     State : STALE        
Interface    : GE0/0/1.188                        Age   : 00h02m19s           
VLAN         : 188                                CEVLAN: -                   
VPN name     :                                    Is Router: FALSE            
Secure FLAG  : UN-SECURE                          IPv6 Address : 240E:3A2:610:4293:498A:4483:85C7:931              
Link-layer   : 0050-5693-a002                     State : STALE        
Interface    : GE0/0/1.188                        Age   : 00h02m19s           
VLAN         : 188                                CEVLAN: -                   
VPN name     :                                    Is Router: FALSE            
Secure FLAG  : UN-SECURE                          

使用了一段时间没发现问题,从IPv6的流量上看,目前V6的流量是高于V4的。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com