In Figure 1, GE0/0/1, GE0/0/2, and GE0/0/3 on the switch are connected to the PC, Device A, and Device B respectively. To prevent RA attacks, IPv6 RA guard needs to be configured on the three interfaces.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] interface gigabitethernet 0/0/1 [Switch-GigabitEthernet0/0/1] nd raguard role host [Switch-GigabitEthernet0/0/1] quit
[Switch] interface gigabitethernet 0/0/2 [Switch-GigabitEthernet0/0/2] nd raguard role router [Switch-GigabitEthernet0/0/2] quit
[Switch] acl ipv6 2000 [Switch-acl6-basic-2000] rule 1 permit source fc00:1:: 64 [Switch-acl6-basic-2000] quit [Switch] nd raguard policy p1 [Switch-nd-raguard-policy-p1] if-match prefix acl 2000 [Switch-nd-raguard-policy-p1] managed-address-flag on [Switch-nd-raguard-policy-p1] other-config-flag on [Switch-nd-raguard-policy-p1] quit [Switch] interface gigabitethernet 0/0/3 [Switch-GigabitEthernet0/0/3] nd raguard attach-policy p1 [Switch-GigabitEthernet0/0/3] quit