IPV6静态配置

假设运营商给客户提供了设备的WAN侧ipv6地址2408:861A:A0EE:6::2/64和LAN侧ipv6地址240E:640:E840:2::1/64

Alt text

模拟网关:

#
interface GigabitEthernet0/0/4
ipv6 enable
ipv6 address 2408:861A:A0EE:6::1/64
#
ipv6 route-static :: 0 2408:861A:A0EE:6::2
#

AR:GE5口为连接运营商网关设备的WAN口,GE6口为连接内网设备并为内网设备分配地址的LAN口

#
interface GigabitEthernet0/0/5
 undo portswitch
 description IPS
 ipv6 enable
 ipv6 address 2408:861A:A0EE:6::2/64
#
interface GigabitEthernet0/0/6
undo portswitch
description LAN
ipv6 enable
ipv6 address 240E:640:E840:2::1/64
ipv6 nd ra prefix default no-advertise
undo ipv6 nd ra halt
ipv6 nd autoconfig managed-address-flag
ipv6 nd autoconfig other-flag
dhcpv6 server pool1
#
ipv6 route-static :: 0 2408:861A:A0EE:6::1
#

用AR模拟被分配地址的PC:

#
interface GigabitEthernet0/0/6
undo portswitch
ipv6 enable
ipv6 address auto link-local
ipv6 address auto global default
ipv6 address auto dhcp
#

配置效果:

  1. 模拟PC设备可以ping通AR和IPS网关
    模拟PC状态:
    Alt text
    Ping AR LAN侧地址:
    Alt text
    Ping AR WAN侧地址:
    Alt text
    PING IPS网关地址:
    Alt text
  2. AR上可以查看到对应的DHCPv6状态
    Alt text
  3. AR可以ping通备分配地址的设备
    Alt text