Configure IPv6 in CentOS
We are about to start testing IPv6 devices recently. After the network is deployed, pay attention to the following host configurations, so record how to enable and configure IPv6 for the host (the Principles and network device settings are not described here)
1. Enable IPv6 in CentOS
Static configuration is used as an example.
1. Original IPv4 static Configuration
[Root @ rs102 network-scripts] # vi ifcfg-Auto_eth2
HWADDR = 00: 0C: 29: 67: DA: 22
TYPE = Ethernet
BOOTPROTO = none
IPADDR = 192.168.202.102
PREFIX = 24
GATEWAY = 192.168.202.1
DNS1 = 202.102.192.68
DEFROUTE = yes
20174_failure_fatal = yes
IPV6INIT = no
NAME = "Auto eth2"
UUID = 14d9f144-8c38-4dab-a918-028b94255c2
ONBOOT = yes
~
2. Static IPv6 Configuration (add IPv6 addresses based on IPv4 addresses)
[Root @ 20211 network-scripts] # vi ifcfg-Auto_eth2
TYPE = Ethernet
BOOTPROTO = none
IPADDR = 192.168.202.11
PREFIX = 24
GATEWAY = 192.168.202.1
DNS1 = 202.102.192.68
DEFROUTE = yes
20174_failure_fatal = yes
IPV6INIT = yes # Here, *** changes no in the original static mode to yes, which indicates enabling IPv6 initialization.
IPVADDR = fc00: 0: 0: 202: 11 # All the rows and the following green sections are manually added. The ipv6 private network address to be configured in this behavior
20176_defaultgw = fc00: 0: 0: 202: 1 # configure ipv6 Gateway
NAME = "Auto eth2"
UUID = 96511ae6-4616-432e-be2c-rjf3dc7c0000
ONBOOT = yes
HWADDR = 00: 50: 56: A5: 4D: 4F
IPV6_AUTOCONF = no # disable automatic IPv6 Configuration
IPV6ADDR = fc00: 0: 0: 202: 11/64 # Set an IPv6 address with a mask, which is different from the mongoaddr above.
IPV6_DEFROUTE = yes # enable the default route
20176_failure_fatal = no
~
Ii. Enabling ipv6 for windows xp and windows server 2003
1. Install the ipv6 protocol
C: \ Documents ents and Settings \ Administrator> netsh interface ipv6 install
2. Add IPv6 addresses
C: \ Documents ents and Settings \ Administrator> netsh inter ipv6 add address "Local Connection" fc00: 0: 0: 216: 195
Note: fc00: 0: 0: 216: 195 must be modified as needed. Double quotation marks in "Local Connection" are English half-width double quotation marks. Local connection is the NIC command for configuring an ipv6 Nic. Enter the double quotation marks based on your actual needs.
3. Add an IPv6 route
C: \ Documents ents and Settings \ Administrator> netsh interface ipv6 add route:/0 "Local Connection" fc00: 0: 0: 216: 1
Note: The double quotation marks in "Local Connection" are English half-width double quotation marks. Local connection is the NIC command for configuring the ipv6 Nic. Enter the double quotation marks based on your actual needs.
4. Enable mstsc Remote Desktop
C: \ Documents ents and Settings \ Administrator> netsh interface portproxy add v6tov4 listenport = 3389 connectport = 3389
Note: If you have modified the Remote Desktop port, replace 3389 with the modified port number.
5. Related command reference
C: \ Documents ents and Settings \ Administrator> netsh interface?
The following commands are valid:
Commands in this context:
? -Display the command list.
Add-add a configuration item to the table.
Delete-delete a configuration item from the table.
Dump-displays a configuration script.
Help-display the command list.
Ip-changed to the 'netsh interface ip' context.
Ipv6-changed to the 'netsh interface ipv6 'context.
Portproxy-changed to the 'netsh interface portproxy' context.
Reset-reset information.
Set-set configuration information.
Show-display information.
The following sub-contexts are available:
Ip ipv6 portproxy
If you need more help information for the command, enter the command, followed by a space,
Followed ?.