Configuración de un túnel VPN GRE
La encapsulación de routing genérico (GRE) es un protocolo de tunneling que puede encapsular diversos protocolos de capa de red entre dos ubicaciones a través de una red pública, como Internet.
En este artículo veremos los pasos para la configuración del túnel y al final está el laboratorio resuelto en Cisco Packet Tracer
Topología
Tablas de direccionamiento IP
Equipo | Interfaz | Dirección IP | Máscara de subred | Gateway |
Router1 | Gi0/0 | 192.168.10.1 | 255.255.255.0 | N/A |
Se0/0/0 | 200.200.200.1 | 255.255.255.252 | N/A | |
Tunnel0 | 192.168.100.1 | 255.255.255.0 | N/A | |
Router3 | Gi0/0 | 192.168.20.1 | 255.255.255.0 | N/A |
Se0/0/0 | 200.200.200.6 | 255.255.255.252 | N/A | |
Tunnel0 | 192.168.100.2 | 255.255.255.0 | N/A | |
Router2 | Se0/0/0 | 200.200.200.2 | 255.255.255.252 | N/A |
Se0/0/1 | 200.200.200.5 | 255.255.255.252 | N/A | |
PC1 | Fa0 | 192.168.10.100 | 255.255.255.0 | 192.168.10.1 |
PC2 | Fa0 | 192.168.20.100 | 255.255.255.0 | 192.168.20.1 |
Objetivos
Parte 1: configurar los parámetros básicos de los dispositivos
Parte 2: Configurar un túnel GRE
Parte 3: Habilitar el routing por el túnel GRE
Información básica
La encapsulación de routing genérico (GRE) es un protocolo de tunneling que puede encapsular diversos protocolos de capa de red entre dos ubicaciones a través de una red pública, como Internet.
Parte 1: configurar los parámetros básicos de los dispositivos
- Aplique las direcciones IP a las interfaces Serial y Gigabit Ethernet según la tabla de direccionamiento y active las interfaces físicas. Todavía NO configure las interfaces Tunnel0.
- Configurar las rutas predeterminadas al Router2.
- En Router 1 à ip route 0.0.0.0 0.0.0.0 200.200.200.2
- En Router 3 à ip route 0.0.0.0 0.0.0.0 200.200.200.5
- Configurar las PC.
- Asigne direcciones IP y gateways predeterminados a las computadoras según la tabla de direccionamiento.
- Verificar la conectividad.
- En este momento, las PCs no pueden hacerse ping entre sí. Cada computadora debe poder hacer ping a su gateway predeterminado. Los routers pueden hacer ping a las interfaces seriales de los demás routers en la topología. De lo contrario, lleve a cabo la resolución de problemas hasta que pueda verificar la conectividad.
- Guardar la configuración en ejecución.
Parte 2: Configurar un túnel GRE
- Configurar la interfaz de túnel GRE.
- Configure la interfaz de túnel en Router1. Utilice S0/0/0 en Router1 como interfaz de origen del túnel y 200.200.200.6 como destino del túnel en Router3.
- Router1(config)# interface tunnel 0
- Router1 (config-if)# ip address 168.100.1 255.255.255.0
- Router1 (config-if)# tunnel source s0/0/0
- Router1 (config-if)# tunnel destination 200.200.200.6
- Configure la interfaz de túnel en Router3. Utilice S0/0/0 en el Router3 como interfaz de origen del túnel y 200.200.200.1 como destino del túnel en el Router1.
- Router3(config)# interface tunnel 0
- Router3 (config-if)# ip address 168.100.2 255.255.255.0
- Router3 (config-if)# tunnel source Serial0/0/0
- Router3 (config-if)# tunnel destination 200.200.200.1
- Verificar que el túnel GRE funcione en Router1 y Router3:
Router1#sh ip int brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.10.1 YES manual up up
GigabitEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 200.200.200.1 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
Serial0/1/0 unassigned YES unset administratively down down
Serial0/1/1 unassigned YES unset administratively down down
Tunnel0 192.168.100.1 YES manual up up
Vlan1 unassigned YES unset administratively down down
Router3#sh ip int brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.20.1 YES manual up up
GigabitEthernet0/1 unassigned YES unset administratively down down
Serial0/0/0 200.200.200.6 YES manual up up
Serial0/0/1 unassigned YES unset administratively down down
Serial0/1/0 unassigned YES unset administratively down down
Serial0/1/1 unassigned YES unset administratively down down
Tunnel0 192.168.100.2 YES manual up up
Vlan1 unassigned YES unset administratively down down
Haga ping y tracert a través del túnel entre Router1 y router3 con la dirección IP de la interfaz del túnel, como sigue:
Router1#ping 192.168.100.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/4/13 ms
Router1#traceroute 192.168.100.2
Type escape sequence to abort.
Tracing the route to 192.168.100.2
1 192.168.100.2 8 msec 4 msec 2 msec
Router1#
Router3#ping 192.168.100.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/7/16 ms
Router3#traceroute 192.168.100.1
Type escape sequence to abort.
Tracing the route to 192.168.100.1
1 192.168.100.1 8 msec 2 msec 4 msec
Router3#
Parte 3: Habilitar el routing por el túnel GRE
- En la parte 3, configurará el routing OSPF de modo que las LAN en los routers Router1 y Router3 se puedan comunicar mediante el túnel GRE. El Router2 no participa en este proceso de routing.
- Configurar el routing OSPF para el área 0 a través del túnel.
- Router1(config)# router ospf 1
- Router1 (config-router)# network 192.168.100.0 0.0.0.255 area 0
- Router1 (config-router)# network 192.168.10.0 0.0.0.255 area 0
- Router3(config)# router ospf 1
- Router3 (config-router)# network 192.168.100.0 0.0.0.255 area 0
- Router3 (config-router)# network 192.168.20.0 0.0.0.255 area 0
- Verificar el enrutamiento OSPF.
- Router1#sh ip route ospf
- O 168.20.0 [110/1001] via 192.168.100.2, 01:40:39, Tunnel0
- Router3#sh ip route ospf
- O 168.10.0 [110/1001] via 192.168.100.1, 01:41:25, Tunnel0
- Verificar comunicación entre PC1 y PC2
- Router1#sh ip route ospf
Desde PC1
C:\>ping 192.168.20.100
Pinging 192.168.20.100 with 32 bytes of data:
Reply from 192.168.20.100: bytes=32 time=2ms TTL=126
Reply from 192.168.20.100: bytes=32 time=20ms TTL=126
Reply from 192.168.20.100: bytes=32 time=14ms TTL=126
Reply from 192.168.20.100: bytes=32 time=2ms TTL=126
Ping statistics for 192.168.20.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 20ms, Average = 9ms
C:\>tracert 192.168.20.100
Tracing route to 192.168.20.100 over a maximum of 30 hops:
1 0 ms 0 ms 1 ms 192.168.10.1
2 4 ms 5 ms 11 ms 192.168.100.2
3 2 ms 12 ms 1 ms 192.168.20.100
Trace complete.
Desde PC2
C:\>ping 192.168.10.100
Pinging 192.168.10.100 with 32 bytes of data:
Reply from 192.168.10.100: bytes=32 time=2ms TTL=126
Reply from 192.168.10.100: bytes=32 time=12ms TTL=126
Reply from 192.168.10.100: bytes=32 time=12ms TTL=126
Reply from 192.168.10.100: bytes=32 time=12ms TTL=126
Ping statistics for 192.168.10.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 12ms, Average = 9ms
C:\>tracert 192.168.10.100
Tracing route to 192.168.10.100 over a maximum of 30 hops:
1 0 ms 0 ms 0 ms 192.168.20.1
2 2 ms 10 ms 13 ms 192.168.100.1
3 12 ms 14 ms 12 ms 192.168.10.100
Trace complete.
Les comparto el laboratorio resuelto en Cisco Packet Tracer (Versión 7.1.1.0138)
Muchas gracias por tu post. Saludos.
De nada, saludos
excelente material, cuando podas subite algo de material referente a tunnel gre
multipunto seria excelente
saludos crack
Gracias Josue, saludos
MSS
Como siempre, es un honor aprender de usted. Bendiciones.
Excelente