• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C SOHO交换机 典型配置举例(Comware V5)-6W102

14-IPv6基础典型配置举例

本章节下载 14-IPv6基础典型配置举例  (100.18 KB)

14-IPv6基础典型配置举例


1  IPv6基础典型配置举例

1.1  简介

本章介绍了使用IPv6地址实现IPv6设备间通信的典型配置案例。

1.2  IPv6基础典型配置举例

1.2.1  组网需求

图1所示,Switch作为网关设备,在2001::/64网段内发布地址前缀信息,该网段内的主机根据获取的前缀信息自动配置IPv6地址,生成指向Switch A的缺省路由,实现与外部网络的通信。

图1 IPv6基础配置组网图

 

1.2.2  配置步骤

1. Switch的配置

# 使能交换机的IPv6转发功能。

<Switch> system-view

[Switch] ipv6

# 配置VLAN接口1采用EUI-64格式的IPv6地址,并允许其发布RA消息。(缺省情况下,所有的接口不会发布RA消息)

[Switch] interface vlan-interface 1

[Switch-Vlan-interface1] ipv6 address 2001::/64 eui-64

[Switch-Vlan-interface1] undo ipv6 nd ra halt

[Switch-Vlan-interface1] quit

# 配置VLAN接口2的全球单播地址。

[Switch] vlan 2

[Switch-vlan2] port GigabitEthernet 1/0/2

[Switch-vlan2] quit

[Switch] interface vlan-interface 2

[Switch-Vlan-interface2] ipv6 address 3001::1 64 

[Switch-Vlan-interface2] quit

2. Host的配置

进入Host的cmd命令窗口,安装IPv6协议栈。

C:\Documents and Settings\aa>ipv6 install

1.2.3  验证配置

# 在Host上查看IPv6地址,发现生成以2001::/64为前缀的IPv6地址,网关指定为Switch。

# 在Switch上显示接口信息,可以看到接口配置的IPv6地址。

<Switch> display ipv6 interface

Vlan-interface1 current state :UP

Line protocol current state :UP

IPv6 is enabled, link-local address is FE80::223:89FF:FE5F:958C

  Global unicast address(es):

    2001::223:89FF:FE5F:958C, subnet is 2001::/64

  Joined group address(es):

FF02::1:FF00:0

FF02::1:FF00:1

    FF02::1:FF5F:958C

    FF02::2

    FF02::1

  MTU is 1500 bytes

  ND DAD is enabled, number of DAD attempts: 1

  ND reachable time is 30000 milliseconds

  ND retransmit interval is 1000 milliseconds

  ND advertised reachable time is 0 milliseconds

  ND advertised retransmit interval is 0 milliseconds

  ND router advertisements are sent every 600 seconds

  ND router advertisements live for 1800 seconds

  Hosts use stateless autoconfig for addresses

IPv6 Packet statistics:

  InReceives:                    67

  InTooShorts:                   0

  InTruncatedPkts:               0

  InHopLimitExceeds:             0

  InBadHeaders:                  0

  InBadOptions:                  0

  ReasmReqds:                    0

  ReasmOKs:                      0

  InFragDrops:                   0

  InFragTimeouts:                0

  OutFragFails:                  0

  InUnknownProtos:               0

  InDelivers:                    26

  OutRequests:                   36

  OutForwDatagrams:              0

  InNoRoutes:                    0

  InTooBigErrors:                0

  OutFragOKs:                    0

  OutFragCreates:                0

  InMcastPkts:                   22

  InMcastNotMembers:             41

  OutMcastPkts:                  21

  InAddrErrors:                  0

  InDiscards:                    0

  OutDiscards:                   0

Vlan-interface2 current state :UP

Line protocol current state :UP

IPv6 is enabled, link-local address is FE80::223:89FF:FE5F:958C

  Global unicast address(es):

    3001::1, subnet is 3001::/64

  Joined group address(es):

    FF02::1:FF00:0

    FF02::1:FF00:1

    FF02::1:FF5F:958C

    FF02::2

    FF02::1

  MTU is 1500 bytes

  ND DAD is enabled, number of DAD attempts: 1

  ND reachable time is 30000 milliseconds

  ND retransmit interval is 1000 milliseconds

  Hosts use stateless autoconfig for addresses

IPv6 Packet statistics:

  InReceives:                    8

  InTooShorts:                   0

  InTruncatedPkts:               0

  InHopLimitExceeds:             0

  InBadHeaders:                  0

  InBadOptions:                  0

  ReasmReqds:                    0

  ReasmOKs:                      0

  InFragDrops:                   0

  InFragTimeouts:                0

  OutFragFails:                  0

  InUnknownProtos:               0

  InDelivers:                    6

  OutRequests:                   8

  OutForwDatagrams:              0

  InNoRoutes:                    0

  InTooBigErrors:                0

  OutFragOKs:                    0

  OutFragCreates:                0

  InMcastPkts:                   3

  InMcastNotMembers:             2

  OutMcastPkts:                  4

  InAddrErrors:                  0

  InDiscards:                    0

  OutDiscards:                   0 

1.2.4  配置文件

#

 ipv6

#

vlan 1 to 2

#

interface Vlan-interface1

 undo ipv6 nd ra halt

 ipv6 address 2001::/64 eui-64 

#

interface Vlan-interface2

 ipv6 address 3001::1/64

#

interface GigabitEthernet1/0/2

 port access vlan 2

#

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们