I setup CentOS 7 in an virtual machine of VMware workstation with NAT.
In IPv4, everything works (including ping to other addresses, Internet access etc…). In VMware Virtual Network Editor, for NAT, in IPv4,
the IP range and default gateway are automatically provided. But for IPv6, only the prefix is provided fd15:4ba5:5a2b:/64. So I assign
to the server the static IP fd15:4ba5:5a2b:6/64, but I do not know how to fill the IPv6 default gateway (IPV6_DEFAULTGW directive).
And I cannot ping6 to external IPv6 address like ipv6.google.com.
Code: Select all
#cat /etc/sysconfig/network-scripts/Ifcfg-eth0
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="no"
IPV6ADDR="fd15:4ba5:5a2b:1008::6/64"
#IPV6_DEFAULTGW="fd15:4ba5:5a2b:1008::2" # don't know how to fill the value
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="583c9e4b-5df6-48c6-acf2-4f04a2470d53"
DEVICE="eth0"
ONBOOT="yes"
IPADDR="192.168.145.6"
PREFIX="24"
GATEWAY="192.168.145.2"
DNS1="8.8.8.8"
DNS2="1.1.1.1"
IPV6_PRIVACY="no"
Code: Select all
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:0c:29:4c:b3:e6 brd ff:ff:ff:ff:ff:ff
inet 192.168.145.6/24 brd 192.168.145.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fd15:4ba5:5a2b:1008::6/64 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::8318:1893:112e:ae94/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Code: Select all
# ip route show
default via 192.168.145.2 dev eth0 proto static metric 100
192.168.145.0/24 dev eth0 proto kernel scope link src 192.168.145.6 metric 100
Code: Select all
# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 1.1.1.1
Code: Select all
# ping6 ipv6.google.com
connect: Network is unreachable
Code: Select all
# ping6 ipv6.google.com
PING fd15:4ba5:5a2b:1008::2(fd15:4ba5:5a2b:1008::2) 56 data bytes
From fd15:4ba5:5a2b:1008::6 icmp_seq=1 Destination unreachable: Address unreachable
- Of course I cannot ping6 the Ipv6 gateway with its wrong value fd15:4ba5:5a2b:2.
My question is how to fill the IPV6_DEFAULTGW directive? Is it possible from the prefix to deduce the gateway?
The final objective of course is to be able to do "ping6 ipv6.google.com".
Many thanks in advance.