虚拟私有云 VPC-通过VPC快速搭建IPv4/IPv6双栈网络:步骤五:验证IPv4和IPv6网络通信情况

时间:2024-11-26 11:39:50

步骤五:验证IPv4和IPv6网络通信情况

  1. 分别验证使用E CS -A01的IPv4地址(EIP)和IPv6地址是否可以登录ECS-A01。

    弹性云服务器有多种登录方法,具体请参见登录弹性云服务器

    以使用PuTTY工具远程登录ECS-A01为例:
    • 验证IPv4地址登录:Host Name (or IP address)中输入ECS-A01的EIP地址,本示例为1.95.44.XX。
    • 验证IPv6地址登录:Host Name (or IP address)中输入ECS-A01的IPv6地址,本示例为2407:XXX:e857。
    图12 PuTTY配置
  2. 执行以下命令,分别验证ECS-A01的IPv4和IPv6公网通信情况。
    • 验证IPv4公网访问情况:

      ping IPv4公网IP地址或者 域名

      命令示例:

      ping support.huaweicloud.com

      回显类似如下信息,表示ECS-A01的IPv4公网通信正常。
      [root@ecs-a01 ~]# ping support.huaweicloud.com
      PING hcdnw.cbg-notzj.c.cdnhwc2.com (203.193.226.103) 56(84) bytes of data.
      64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=1 ttl=51 time=2.17 ms
      64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=2 ttl=51 time=2.13 ms
      64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=3 ttl=51 time=2.10 ms
      64 bytes from 203.193.226.103 (203.193.226.103): icmp_seq=4 ttl=51 time=2.09 ms
      ...
      --- hcdnw.cbg-notzj.c.cdnhwc2.com ping statistics ---
      4 packets transmitted, 4 received, 0% packet loss, time 3004ms
      rtt min/avg/max/mdev = 2.092/2.119/2.165/0.063 ms
    • 验证IPv6公网通信情况:

      ping6 IPv6公网地址

      假设2002:20::45是一个公网IP地址,命令示例如下:

      ping6 2002:20::45

      回显类似如下信息,表示ECS-A01的IPv6公网通信正常。
      [root@ecs-a01 ~]# ping6 2002:20::45
      PING 2002:20::45(2002:20::45) from 2002:20::45 : 56 data bytes
      64 bytes from 2002:20::45: icmp_seq=1 ttl=64 time=0.770 ms
      64 bytes from 2002:20::45: icmp_seq=2 ttl=64 time=0.295 ms
      64 bytes from 2002:20::45: icmp_seq=3 ttl=64 time=0.245 ms
      ^C
      --- 2002:20::45 ping statistics ---
      3 packets transmitted, 3 received, 0% packet loss, time 2080ms
      rtt min/avg/max/mdev = 0.245/0.436/0.770/0.237 ms
support.huaweicloud.com/qs-vpc/qs_ipv6.html