Reimpresión autorizada por el autor zhushigeng (Vinsoney)
Experimento 1: Experimento IPv6
1. Topología y requisitos
La topología de la red se muestra en la figura anterior. La puerta de enlace predeterminada de la PC es el switch. Todos los dispositivos están configurados para que la PC pueda hacer ping a la interfaz Loopback0 del enrutador.
2. Configuración e implementación
# Configurar el switch.
[Switch] ipv6
[Switch] vlan batch 10 20
[Switch] interface GigabitEthernet0/0/1
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 10
[Switch] interface GigabitEthernet0/0/24
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 20
[Switch] interface vlanif 10
[Switch-vlanif10] ipv6 enable
[Switch-vlanif10] ipv6 address 2001::FFFF 64
[Switch] interface vlanif 20
[Switch-vlanif10] ipv6 enable
[Switch-vlanif10] ipv6 address 2012::1 64
[Switch] ipv6 route-static :: 0 2012::2// Configure a static IPv6 route. It is a default route.
# Configurar el router.
[Router] ipv6
[Router] interface GigabitEthernet 0/0/0
[Router-GigabitEthernet0/0/0] ipv6 enable
[Router-GigabitEthernet0/0/0] ipv6 address 2012::2 64
[Router] interface loopback0
[Router-Loopback0] ipv6 enable
[Router-Loopback0] ipv6 address 2001:2222::1 64
[Router] ipv6 route-static 2001:: 64 2012::1
# Configurar la PC.
Una vez completada la configuración anterior, la PC puede hacer ping a 2001: 2222 :: 1.
Compruebe la configuración de los parámetros en el router.
[Router] display ipv6 interface brief
*down: administratively down
(l): loopback
(s): spoofing
Interface Physical Protocol
GigabitEthernet0/0/0 up up
[IPv6 Address] 2012::2
LoopBack0 up up(s)
[IPv6 Address] 2001:2222::1
La salida del comando anterior muestra la información de resumen de la interfaz IPv6 del router. Puede ver las direcciones IPv6 de las dos interfaces.
Puede ver los parámetros detallados de una interfaz.
Verifique las rutas estáticas en la tabla de enrutamiento IPv6 del router.
[Router] display ipv6 routing-table protocol static
Public Routing Table : Static
Summary Count : 1
Static Routing Table's Status : < Active >
Summary Count : 1
Destination : 2001:: PrefixLength : 64
NextHop : 2012::1 Preference : 60
Cost : 0 Protocol : Static
RelayNextHop : :: TunnelID : 0x0
Interface : GigabitEthernet0/0/0 Flags : RD
Experimento 2: Autoconfiguración de direcciones sin estado
Topología y Requisitos
La figura anterior muestra la topología de la red. La puerta de enlace predeterminada de la PC es el switch. La PC obtiene su dirección IPv6 unicast global a través de la configuración automática de direcciones sin estado. Configure todos los dispositivos para que la PC pueda hacer ping a la interfaz Loopback0 del router.
Configuración e Implementación
# Configurar el router.
[Router] ipv6
[Router] interface GigabitEthernet 0/0/0
[Router-GigabitEthernet0/0/0] ipv6 enable
[Router-GigabitEthernet0/0/0] ipv6 address 2012::2 64
[Router] interface loopback0
[Router-Loopback0] ipv6 enable
[Router-Loopback0] ipv6 address 2001:2222::1 64
[Router] ipv6 route-static 2001:: 64 2012::1
# Configurar el switche.
[Switch] ipv6
[Switch] vlan batch 10 20
[Switch] interface GigabitEthernet0/0/1
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 10
[Switch] interface GigabitEthernet0/0/24
[Switch-GigabitEthernet0/0/1] port link-type access
[Switch-GigabitEthernet0/0/1] port default vlan 20
[Switch] interface vlanif 10
[Switch-vlanif10] ipv6 enable
[Switch-vlanif10] ipv6 address 2001::FFFF 64
[Switch-vlanif10] undo ipv6 nd ra halt//Enable the RA packet advertisement function of the VLANIF10 interface. That is, cancel the suppression of RA packets. Then, the VLANIF10 interface of the switch starts to send RA packets periodically.
[Switch] interface vlanif 20
[Switch-vlanif10] ipv6 enable
[Switch-vlanif10] ipv6 address 2012::1 64
[Switch] ipv6 route-static :: 0 2012::2//Configure an IPv6 default route.
Configurar la NIC de la PC.
Una vez completadas las configuraciones anteriores, los paquetes RA se envían a la interfaz VLANIF10. Un paquete RA contiene el prefijo de dirección de unidifusión global IPv6 (2001 :: / 64) de VLANIF10. Después de recibir el paquete RA, la NIC de la PC construye la dirección de unicast global de IPv6 basándose en el prefijo y el identificador de la NIC
La dirección IP obtenida por la NIC de la PC:
Ethernet adapter net1:
Connection-specific DNS Suffix
Description . . . . . . . . . . . : Microsoft Ethernet Adapter
Physical Address . . . . . . . . . : 02-00-4C-4F-4F-50
DHCP Enabled . . . . . . . . : Yes
Autoconfiguration Enabled . . . . . . . : Yes
IPv6 Address. . . . . . . . : 2001::d4cf:1c:2649:8f6e(Preferred)
Temporary IPv6 Address. . . . . . . : 2001::ac5a:58c2:3683:2afe(Preferred)
Link-local IPv6 Address . . . . . : fe80::d4cf:1c:2649:8f6e%22(Preferred)
IPv4 Address. . . . : 169.254.143.110(Preferred)
Subnet Mask. . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . : fe80::4e1f:ccff:fe63:5b5e%22
DNS Servers . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip . . . . . . . : Enabled
Nota: Generalmente, la mayoría de los dispositivos terminales usan la especificación EUI-64 para generar identificadores de interfaz. Windows XP y versiones anteriores de Windows también cumplen con esta especificación. Sin embargo, Windows Vista y Windows 7 no usan este modo de forma predeterminada. En su lugar, utilizan un algoritmo para generar aleatoriamente un identificador de interfaz. Este identificador de interfaz se utiliza para configurar automáticamente la dirección IPv6 de la NIC.
Ejecute el siguiente comando para deshabilitar esta función: netsh interface ipv6 set global randomizeidentifiers = disabled
En este caso la PC puede hacer ping 2001:2222::1.