IPv6 互 ping

  1. 查看 kvm7 目前只有 eth0 連線。
    [root@kvm7 ~]# nmcli connection 
    NAME  UUID                                  TYPE            DEVICE 
    eth0  2b7d2642-13f3-48aa-a5e1-be77693ea318  802-3-ethernet  eth0
    
  2. kvm7 在 connection eth0 上增加 ipv6 位址 2001:ac18::137/64
    [root@kvm7 ~]# nmcli connection modify eth0 ipv6.addresses 2001:ac18::137/64 ipv6.method manual
    
  3. kvm7 重新啟動網路。
    [root@kvm7 ~]# systemctl restart network.service
    
  4. 查看 kvm7 網路連線 eth0 已加入 ipv6 位址 2001:ac18::137/64
    [root@kvm7 ~]# nmcli connection show eth0 | egrep -i ipv?6
    ipv6.method:                            manual
    ipv6.dns:                               
    ipv6.dns-search:                        
    ipv6.dns-options:                       (default)
    ipv6.dns-priority:                      0
    ipv6.addresses:                         2001:ac18::137/64
    ipv6.gateway:                           --
    ipv6.routes:                            
    ipv6.route-metric:                      -1
    ipv6.ignore-auto-routes:                no
    ipv6.ignore-auto-dns:                   no
    ipv6.never-default:                     no
    ipv6.may-fail:                          yes
    ipv6.ip6-privacy:                       -1 (unknown)
    ipv6.addr-gen-mode:                     stable-privacy
    ipv6.dhcp-send-hostname:                yes
    ipv6.dhcp-hostname:                     --
    ipv6.token:                             --
    IP6.ADDRESS[1]:                         2001:ac18::137/64
    IP6.ADDRESS[2]:                         fe80::9c3a:a9a6:9095:a26e/64
    IP6.GATEWAY:
    
  5. kvm7 成功 ping6 kvm5 2001:ac18::135
    [root@kvm7 ~]# ping6 -c2 2001:ac18::135
    connect: Network is unreachable
    [root@kvm7 ~]# systemctl restart network.service 
    [root@kvm7 ~]# ping6 -c2 2001:ac18::135
    PING 2001:ac18::135(2001:ac18::135) 56 data bytes
    64 bytes from 2001:ac18::135: icmp_seq=1 ttl=64 time=1.10 ms
    64 bytes from 2001:ac18::135: icmp_seq=2 ttl=64 time=0.345 ms
    
  6. kvm5 也成功 ping6 kvm7 2001:ac18::137
    [root@kvm5 ~]# ping6 -c2 2001:ac18::137
    PING 2001:ac18::137(2001:ac18::137) 56 data bytes
    64 bytes from 2001:ac18::137: icmp_seq=1 ttl=64 time=0.362 ms
    64 bytes from 2001:ac18::137: icmp_seq=2 ttl=64 time=0.293 ms
    
    --- 2001:ac18::137 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 999ms
    rtt min/avg/max/mdev = 0.293/0.327/0.362/0.038 ms
    
  7. 如果無法成功 ping6 kvm5 2001:ac18::135,請以 root 權限在 deyu.wang (192.168.122.1) 主機增加 ip6 防火牆的 FORWARD。
    [root@dywnb ~]# ip6tables -I FORWARD -i virbr0 -o virbr0 -j ACCEPT
    
  8. 考試時 kvm5 及 kvm7 都有指定 ipv6 位址,請依題意要求設定,題目要求在那張網卡設定 ipv6 必須看清楚,若有指定 ipv6 gateway 則一併設定。