CentOS 7云虚拟机配置DHCPv6
- 修改
/etc/sysconfig/network-scripts/ifcfg-eth0
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV6INIT="yes"
DHCPV6C=yes
NM_CONTROLLED=no
NAME="eth0"
DEVICE="eth0"
ONBOOT="yes"
- 修改
/etc/sysconfig/network
NETWORKING=yes
NOZEROCONF=yes
NETWORKING_IPV6=yes
sudo service network restart
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 10.10.9.3 netmask 255.255.255.0 broadcast 10.10.9.255
inet6 2001:db8:eed1::5 prefixlen 64 scopeid 0x0<global>
inet6 fe80::f816:3eff:fe0e:cafa prefixlen 64 scopeid 0x20<link>
ether fa:16:3e:0e:ca:fa txqueuelen 1000 (Ethernet)
RX packets 370 bytes 38488 (37.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 266 bytes 47240 (46.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
14:26:44.963685 IP6 fe80::f816:3eff:fe0e:cafa.546 > ff02::1:2.547: dhcp6 solicit
14:26:44.964479 IP6 fe80::f816:3eff:fe34:e53e > ff02::1:ff0e:cafa: ICMP6, neighbor solicitation, who has fe80::f816:3eff:fe0e:cafa, length 32
14:26:44.965648 IP6 fe80::f816:3eff:fe0e:cafa > fe80::f816:3eff:fe34:e53e: ICMP6, neighbor advertisement, tgt is fe80::f816:3eff:fe0e:cafa, length 32
14:26:44.965680 IP6 fe80::f816:3eff:fe34:e53e > fe80::f816:3eff:fe0e:cafa: ICMP6, neighbor solicitation, who has fe80::f816:3eff:fe0e:cafa, length 24
14:26:44.966244 IP6 fe80::f816:3eff:fe0e:cafa > fe80::f816:3eff:fe34:e53e: ICMP6, neighbor advertisement, tgt is fe80::f816:3eff:fe0e:cafa, length 24
14:26:45.064831 IP6 fe80::f816:3eff:fe34:e53e.547 > fe80::f816:3eff:fe0e:cafa.546: dhcp6 advertise
14:26:45.974412 IP6 fe80::f816:3eff:fe0e:cafa.546 > ff02::1:2.547: dhcp6 request
14:26:45.993155 IP6 fe80::f816:3eff:fe34:e53e.547 > fe80::f816:3eff:fe0e:cafa.546: dhcp6 reply
14:26:46.129483 IP6 fe80::f816:3eff:fe0e:cafa > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48