This section provides an example for configuring PPPoE dual-stack home user access to a VPN in ND unshared+PD mode. The BRAS implements RADIUS authentication and accounting and assigns IPv6 addresses to users through ND. This allows users to access the network.
On the network shown in Figure 1, home users belong to the domain isp1, and each user uses the dual-stack access mode. Only IPv4 users, but not IPv6 users, are connected to the VPN. Users are connected to DeviceA through a CPE. After the CPE initiates a PPPoE connection, DeviceA implements RADIUS authentication and accounting, as well as assigns IPv4 addresses to users from the local address pool and an IPv6 address to the CPE through ND. DeviceA authenticates and manages the CPE, which manages home terminals.
Configure AAA schemes.
Configure a RADIUS server group.
Configure IPv6 address pools.
Configure a user access domain.
Configure interfaces.
# Configure an authentication scheme.
<HUAWEI> system-view [~HUAWEI] sysname DeviceA [*HUAWEI] commit [~DeviceA] aaa [~DeviceA-aaa] authentication-scheme auth1 [*DeviceA-aaa-authen-auth1] authentication-mode radius [*DeviceA-aaa-authen-auth1] quit [*DeviceA-aaa] commit
# Configure an accounting scheme.
[~DeviceA-aaa] accounting-scheme acct1 [*DeviceA-aaa-accounting-acct1] accounting-mode radius [*DeviceA-aaa-accounting-acct1] quit [*DeviceA-aaa] quit [*DeviceA] commit
[~DeviceA] radius-server group rd1 [*DeviceA-radius-rd1] radius-server authentication 192.168.7.249 1645 [*DeviceA-radius-rd1] radius-server accounting 192.168.7.249 1646 [*DeviceA-radius-rd1] radius-server shared-key-cipher hello@123 [*DeviceA-radius-rd1] quit [*DeviceA] commit
[~DeviceA] ip vpn-instance vpn1 [*DeviceA-vpn-instance-vpn1] ipv4-family [*DeviceA-vpn-instance-vpn1-af-ipv4] route-distinguisher 200:200 [*DeviceA-vpn-instance-vpn1-af-ipv4] vpn-target 100:100 export-extcommunity [*DeviceA-vpn-instance-vpn1-af-ipv4] vpn-target 100:100 import-extcommunity [*DeviceA-vpn-instance-vpn1-af-ipv4] commit [~DeviceA-vpn-instance-vpn1-af-ipv4] quit [~DeviceA-vpn-instance-vpn1] quit
[~DeviceA] ip pool pool_v4 bas local [*DeviceA-ip-pool-pool_v4] vpn-instance vpn1 [*DeviceA-ip-pool-pool_v4] gateway 172.16.0.1 255.255.255.0 [*DeviceA-ip-pool-pool_v4] commit [~DeviceA-ip-pool-pool_v4] section 0 172.16.0.2 172.16.0.200 [~DeviceA-ip-pool-pool_v4] dns-server 10.179.155.161 10.179.155.177 [*DeviceA-ip-pool-pool_v4] commit [~DeviceA-ip-pool-pool_v4] quit
Configure a delegation prefix pool for ND users.
[~DeviceA] ipv6 prefix pre_nd delegation [*DeviceA-ipv6-prefix-pre_nd] prefix 2001:db8:1::/48 delegating-prefix-length 64 [*DeviceA-ipv6-prefix-pre_nd] slaac-unshare-only [*DeviceA-ipv6-prefix-pre_nd] commit [~DeviceA-ipv6-prefix-pre_nd] quit
[~DeviceA] ipv6 pool pool_nd bas delegation [*DeviceA-ipv6-pool-pool_nd] prefix pre_nd [*DeviceA-ipv6-pool-pool_nd] commit [~DeviceA-ipv6-pool-pool_nd] dns-server 2001:db8::2:2 2001:db8::2:3 [~DeviceA-ipv6-pool-pool_nd] quit
[~DeviceA] ipv6 prefix pre_pd delegation [*DeviceA-ipv6-prefix-pre_pd] prefix 2001:db8:2::/48 delegating-prefix-length 60 [*DeviceA-ipv6-prefix-pre_pd] pd-unshare-only [*DeviceA-ipv6-prefix-pre_pd] commit [~DeviceA-ipv6-prefix-pre_pd] quit
[~DeviceA] ipv6 pool pool_pd bas delegation [*DeviceA-ipv6-pool-pool_pd] prefix pre_pd [*DeviceA-ipv6-pool-pool_pd] dns-server 2001:db8::2:2 2001:db8::2:3 [*DeviceA-ipv6-pool-pool_pd] commit [~DeviceA-ipv6-pool-pool_pd] quit
[~DeviceA] aaa [~DeviceA-aaa] domain isp1 [*DeviceA-aaa-domain-isp1] authentication-scheme auth1 [*DeviceA-aaa-domain-isp1] accounting-scheme acct1 [*DeviceA-aaa-domain-isp1] radius-server group rd1 [*DeviceA-aaa-domain-isp1] commit [~DeviceA-aaa-domain-isp1] prefix-assign-mode unshared [~DeviceA-aaa-domain-isp1] ip-pool pool_v4 [~DeviceA-aaa-domain-isp1] ipv6-pool pool_nd [~DeviceA-aaa-domain-isp1] ipv6-pool pool_pd [~DeviceA-aaa-domain-isp1] vpn-instance vpn1 [~DeviceA-aaa-domain-isp1] quit [~DeviceA-aaa] quit
[~DeviceA] dhcpv6 duid llt [*DeviceA] commit
[~DeviceA] interface Virtual-Template1 [*DeviceA-Virtual-Template1] ppp authentication-mode pap chap [*DeviceA-Virtual-Template1] commit [~DeviceA-Virtual-Template1] quit
# sysname DeviceA # radius-server group rd1 radius-server shared-key-cipher %^%#Q'!i-TMV5&@=QE}g/QK2ouBHee8WB|s|mB%^% # radius-server authentication 192.168.7.249 1645 weight 0 radius-server accounting 192.168.7.249 1646 weight 0 # ip vpn-instance vpn1 ipv4-family route-distinguisher 200:200 apply-label per-route vpn-target 100:100 export-extcommunity vpn-target 100:100 import-extcommunity # aaa authentication-scheme auth1 authentication-mode radius accounting-scheme acct1 accounting-mode radius # ip pool pool_v4 bas local vpn-instance vpn1 gateway 172.16.0.1 255.255.255.0 section 0 172.16.0.2 172.16.0.200 dns-server 10.179.155.161 10.179.155.177 # ipv6 prefix pre_nd delegation prefix 2001:db8:1::/48 delegating-prefix-length 64 slaac-unshare-only # ipv6 pool pool_nd bas delegation prefix pre_nd dns-server 2001:db8::2:2 2001:db8::2:3 # ipv6 prefix pre_pd delegation prefix 2001:db8:1::/48 delegating-prefix-length 60 pd-unshare-only # ipv6 pool pool_pd bas delegation prefix pre_pd dns-server 2001:db8::2:2 2001:db8::2:3 # aaa domain isp1 authentication-scheme auth1 accounting-scheme acct1 radius-server group rd1 prefix-assign-mode unshared ip-pool pool_v4 ipv6-pool pool_nd ipv6-pool pool_pd vpn-instance vpn1 # dhcpv6 duid 0001000125a7625df063f9761497 # interface Virtual-Template1 ppp authentication-mode pap chap # interface Eth-Trunk 2 # interface Eth-Trunk2.10 pppoe-server bind Virtual-Template 1 ipv6 enable ipv6 address auto link-local user-vlan 3000 3799 qinq 2700 2955 bas # access-type layer2-subscriber default-domain authentication isp1 # interface GigabitEthernet0/1/1 ipv6 enable ipv6 address 2001:db8:8::7 128 ipv6 address auto link-local ip address 10.2.1.1 24 # # return