IPv6

IPv6_OSPFv3.png
# R1:
# IPv6 地址配置
#
ipv6 
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address 2001::1/64 
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ipv6 address 2001:12::1/64 
#

# R2:
#
ipv6 
#
interface GigabitEthernet0/0/1
 ipv6 enable 
 ipv6 address 2001:12::2/64 
#
interface GigabitEthernet0/0/2
 ipv6 enable 
 ipv6 address 2001:23::2/64 
#

# R3:
#
ipv6 
#
interface GigabitEthernet0/0/0
 ipv6 enable 
 ipv6 address 3000::1/64 
#
interface GigabitEthernet0/0/2
 ipv6 enable 
 ipv6 address 2001:23::3/64 
#

# IPv6 路由配置 -- OSPFv3
#
# R1:
#
ospfv3 1
 router-id 1.1.1.1
#
#
interface GigabitEthernet0/0/0
 ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/0/1
 ospfv3 1 area 0.0.0.0
#

# R2:
#
ospfv3 1
 router-id 2.2.2.2
#
interface GigabitEthernet0/0/1
 ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/0/2
 ospfv3 1 area 0.0.0.0
#

# R3:
#
ospfv3 1
 router-id 3.3.3.3
#
interface GigabitEthernet0/0/0
 ospfv3 1 area 0.0.0.0
#
interface GigabitEthernet0/0/2
 ospfv3 1 area 0.0.0.0
#

# IPv6 -- DHCP 配置
# R1:
# 配置地址池
#
dhcpv6 pool ipv6_ar1
 address prefix 2001::/64
 excluded-address 2001::1
 dns-server 4000::1
#
# 在全局启用 DHCP
dhcp enable
#
# 在接口上应用 DHCP
#
interface GigabitEthernet0/0/0
 dhcpv6 server ipv6_ar1
#

# R3:
dhcpv6 pool ipv6_ar3
 address prefix 3000::/64
 excluded-address 3000::1
 dns-server 4000::1
#
#
dhcp enable
#
#
interface GigabitEthernet0/0/0
 dhcpv6 server ipv6_ar3
#

验证

  • PC1 ping PC2
PC_IPv6_DHCP.PNG
  • IPv6 ping: ping ipv6 3000::1
  • 查看接口IPv6地址: display ipv6 interface brief
  • 查看IPv6路由表: display ipv6 routing-table protocol ospfv3

你可能感兴趣的:(IPv6)