Mostrando entradas con la etiqueta tunnel. Mostrar todas las entradas
Mostrando entradas con la etiqueta tunnel. Mostrar todas las entradas

Automatic 6to4 Tunel IPv6 Tunel (IV)

Uno de los mecanismos de transición entre IPv4 e IPv6 es el tunel Automatic 6 to 4, nos permite utilizar direccionamiento IPv6 sobre enlaces IPv4.

Estableceremos un tunel automático (sin poner ips destino) entre dos sedes que solo se comunican por IPv4.
Usaremos el ejemplo:





Se suele usar el rango 2002::/16
2002:IP:V4::x

R1
19.19.12.1 podria ser

19 = 13 Hex
12 = 0C Hex
01 = 01 HEX
2002:1313:0C01::1/64


19 = 13 Hex
45 = 2D Hex
05 = 05 HEX
2002:1313:2D05::5/64


R1#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address 2002:1313:0C01::1/64
 tunnel source 19.19.12.1
 tunnel mode ipv6ip 6to4
end

R5#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address 2002:1313:2D05::5/64
 tunnel source 19.19.45.5
 tunnel mode ipv6ip 6to4
end

Verificamos
R5#sh int tun0
Tunnel0 is up, line protocol is up
  Hardware is Tunnel
  MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 19.19.45.5, destination UNKNOWN
  Tunnel protocol/transport IPv6 6to4


Necesitamos obligatoriamente enrutamiento estatico

R1(config)#ipv6 route 2002::/16 tun 0
R5(config)#ipv6 route 2002::/16 tun 0

o bien
R1(config)#ipv route ::/0 tun0
R5(config)#ipv route ::/0 tun0


R5#ping 2002:1313:0C01::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:1313:C01::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/96/112 ms


ISATAP Tunel IPv6 Tunel (III)

Uno de los mecanismos de transición entre IPv4 e IPv6 es el tunel ISATAP , nos permite utilizar direccionamiento IPv6 sobre enlaces IPv4.

Estableceremos un tunel ISATAP entre dos sedes que solo se comunican por IPv4.
Usaremos el ejemplo:




El tunnel se establece entre direcciones IP que se generan de la siguiente manera


64 primeros bits Link local address (aunque funciona cualquiera)
32 siguientes bits 000:5EFE
32 ultimos bitsIPv4 en HEX

R1
19.19.12.1 podria ser

19 = 13 Hex
12 = 0C Hex
01 = 01 HEX
2002:1:2:3:0:5EFE:1313:0C1C/64


19 = 13 Hex
45 = 2D Hex
05 = 05 HEX
2002:1:2:3:0:5EFE:1313:0C1C/64


R1#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address 2002:1:2:3:0:5EFE:1313:0C01/64
 tunnel source 19.19.12.1
 tunnel mode ipv6ip isatap
end

R5#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address 2002:1:2:3:0:5EFE:1313:2D05/64
 tunnel source 19.19.45.5
 tunnel mode ipv6ip isatap
end

Verificamos
R5#sh int tun 0
Tunnel0 is up, line protocol is up
  Hardware is Tunnel
  MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 19.19.45.5, destination UNKNOWN
  Tunnel protocol/transport IPv6 ISATAP


R5#
*Mar  1 02:20:07.515: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to up
R5#ping 2002:1:2:3:0:5EFE:1313:C01

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2002:1:2:3:0:5EFE:1313:C01, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/92/104 ms


R1#ping fec0:15::5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FEC0:15::5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/84/92 ms

Aunque sea una interfaz point-to-point desconoce el vecino así que deberíamos utilizar enrutamiento estático

R1(config)#ipv6 route ::/0 2002:1:2:3:0:5EFE:1313:2D05 
R5(config)#ipv6 route ::/0 2002:1:2:3:0:5EFE:1313:0C01

R5#ping 2013::1 source lo0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2013::1, timeout is 2 seconds:
Packet sent with a source address of 2013::5
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/92/104 ms

IPv6 over IPv4 Tunel IPv6 Tunel (II)

Uno de los mecanismos de transición entre IPv4 e IPv6 es el tunel IPv6 sobre IPv4, nos permite utilizar direccionamiento IPv6 sobre enlaces IPv4.

Estableceremos un tunel IPv6 sobre IPv4 entre dos sedes que solo se comunican por IPv4.
Usaremos el ejemplo:


.
R1#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address FEC0:15::1/64
 tunnel source 19.19.12.1
 tunnel destination 19.19.45.5
 tunnel mode ipv6ip
end

R5#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address FEC0:15::5/64
 tunnel source 19.19.45.5
 tunnel destination 19.19.12.1
 tunnel mode ipv6ip
end

Verificamos

R5#sh int tun 0
Tunnel0 is up, line protocol is up
  Hardware is Tunnel
  MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 19.19.45.5 (FastEthernet0/1), destination 19.19.12.1
  Tunnel protocol/transport IPv6/IP


R5#ping FEC0:15::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FEC0:15::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/83/96 ms

R1#ping fec0:15::5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FEC0:15::5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/84/92 ms

Podemos configurar OSPF ya que el tunnel ipv6 sobre ipv4 es considerada por ospf version 3 como interfaz point to point

R5(config)#ipv6 router ospf 10
R5(config-rtr)#int lo 0
R5(config-if)#ipv ospf 10 area 0
R5(config-if)#int tun0
R5(config-if)#ipv ospf 10 area 0

Similar en R1

R1(config)#ipv6 router ospf 10
R1(config-rtr)#int lo 0
R1(config-if)#ipv ospf 10 area 0
R1(config-if)#int tun0
R1(config-if)#ipv ospf 10 area 0

Ospf comienza a funcionar

R1#sh ipv ospf int tun0
Tunnel0 is up, line protocol is up
  Link Local Address FE80::1313:C01, Interface ID 10
  Area 0, Process ID 10, Instance ID 0, Router ID 19.19.12.1
  Network Type POINT_TO_POINT, Cost: 11111
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:01
  Index 1/1/1, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 3
  Last flood scan time is 0 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 19.19.45.5
  Suppress hello for 0 neighbor(s)


R5#sh ipv6 ospf nei

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
19.19.12.1        1   FULL/  -        00:00:34    10              Tunnel0

R5#sh ipv6 route ospf
IPv6 Routing Table - 5 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
O   2013::1/128 [110/11111]
     via FE80::C002:11FF:FE00:0, Tunnel0

Y podemos probar hacer ping de loopback a loopback
R1#ping 2013::5 source lo0 repeat 100

Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 2013::5, timeout is 2 seconds:
Packet sent with a source address of 2013::1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 68/81/96 ms


Gre Tunel IPv6 Tunel (I)

Uno de los mecanismos de transición entre IPv4 e IPv6 es el tunel GRE, nos permite utilizar direccionamiento IPv6 sobre enlaces IPv4.

Estableceremos un tunel gre entre dos sedes que solo se comunican por IPv4.
Usaremos el ejemplo:



Todo el camino es IPv4, podemos establecer un tunel gre entre R1 y R5.

R1#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address FEC0:15::1/64
 tunnel source 19.19.12.1
 tunnel destination 19.19.45.5
 tunnel mode gre ip ! es la encapsulacoin por defecto
end

R5#sh run int tun 0
Building configuration...

Current configuration : 151 bytes
!
interface Tunnel0
 no ip address
 ipv6 address FEC0:15::5/64
 tunnel source 19.19.45.5
 tunnel destination 19.19.12.1
 tunnel mode gre ip ! es la encapsulacoin por defecto
end

Verificamos

R5#sh int tun0
Tunnel0 is up, line protocol is up
  Hardware is Tunnel
  MTU 1514 bytes, BW 9 Kbit/sec, DLY 500000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation TUNNEL, loopback not set
  Keepalive not set
  Tunnel source 19.19.45.5 (FastEthernet0/1), destination 19.19.12.1
  Tunnel protocol/transport GRE/IP


R5#ping FEC0:15::1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FEC0:15::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/83/96 ms

R1#ping fec0:15::5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to FEC0:15::5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/84/92 ms

Como es un tunel gre tenemos la ventaja de que podemos utilizar protocolos de enrutamiento dinámicos sin preocuparnos de que anuncien sus rutas por multicast o broadcast.

R5(config)#ipv6 router ospf 10
R5(config-rtr)#int lo 0
R5(config-if)#ipv ospf 10 area 0
R5(config-if)#int tun0
R5(config-if)#ipv ospf 10 area 0

Similar en R1

R1(config)#ipv6 router ospf 10
R1(config-rtr)#int lo 0
R1(config-if)#ipv ospf 10 area 0
R1(config-if)#int tun0
R1(config-if)#ipv ospf 10 area 0

Ospf comienza a funcionar
R5#sh ipv6 ospf nei

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
19.19.12.1        1   FULL/  -        00:00:34    10              Tunnel0

R5#sh ipv6 route ospf
IPv6 Routing Table - 5 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
O   2013::1/128 [110/11111]
     via FE80::C002:11FF:FE00:0, Tunnel0

Y podemos probar hacer ping de loopback a loopback
R1#ping 2013::5 source lo0 repeat 100

Type escape sequence to abort.
Sending 100, 100-byte ICMP Echos to 2013::5, timeout is 2 seconds:
Packet sent with a source address of 2013::1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/100), round-trip min/avg/max = 68/81/96 ms