How to configure an IPv4 GRE tunnel to carry IPv6 traffic
Continuing the review of the TSHOOT Topology, on the IPv6 network map there is a GRE tunnel that is configured between Router 3 and Router 4. This tunnel is in place to allow IPv6 traffic to traverse the 10.1.1.8/30 IPv4 network. So, while reviewing the IPv6 tshoot topology, I decided to try out the tunnel configuration.
There are several ways to configure tunnels to allow IPv6 traffic to traverse IPv4 networks (and vice versa). This post will be focusing on a GRE tunnel configuration. If you want to review the other ways to create tunnels, i.e. Automatic IPv4-Compatible IPv6 Tunnels, IPv6 Rapid Deployment Tunnels, and Automatic 6to4 Tunnels, I've included a link below to a great resource on Cisco's website that shows some great examples of other tunnels.
I threw together the following network diagram to provide a visual of what we are configuring:
Not completely pictured is the RIPng zone and OSPFv3 areas, but I've included the configurations for those protocols below for your reference. You also might notice there is no mode configured under the tunnel interfaces. I tried a couple different modes, and they worked fine. However, it doesn't seem to need a mode configured in order to pass IPv6 traffic, so I left it off. Here are the configs:
!R3 interface Tunnel1 no ip address ipv6 address 2026::34:1/122 ipv6 ospf 6 area 34 tunnel source 10.1.1.1 tunnel destination 10.1.1.2 ! interface Serial0/0 ip address 10.1.1.1 255.255.255.252 ! interface Serial0/1 no ip address ipv6 address 2026::1:2/122 ipv6 ospf 6 area 0 ipv6 router ospf 6 router-id 3.3.3.3 log-adjacency-changes !R4 interface Tunnel1 no ip address ipv6 address 2026::34:2/122 ipv6 ospf 6 area 34 tunnel source 10.1.1.2 tunnel destination 10.1.1.1 interface FastEthernet1/0 no ip address duplex full ipv6 address 2026::2:1/122 ipv6 rip RIP_ZONE enable ! interface Serial0/0 ip address 10.1.1.2 255.255.255.252 serial restart-delay 0 ipv6 router ospf 6 router-id 4.4.4.4 log-adjacency-changes redistribute rip RIP_ZONE metric 2 include-connected ! ipv6 router rip RIP_ZONE redistribute ospf 6 metric 2 include-connected
The following show command output shows the OSPFv3 neighbors, the IPv6 routing table, and the tunnel interface statistics.
!R3
R3#show ipv6 ospf nei
Neighbor ID Pri State Dead Time Interface ID Interface
2.2.2.2 1 FULL/ - 00:00:34 4 Serial0/1
4.4.4.4 1 FULL/ - 00:00:38 13 Tunnel1
R3#show ipv route
IPv6 Routing Table - Default - 8 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, M - MIPv6, R - RIP, I1 - ISIS L1
I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
EX - EIGRP external
O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C 2026::1:0/122 [0/0]
via Serial0/1, directly connected
L 2026::1:2/128 [0/0]
via Serial0/1, receive
OE2 2026::2:0/122 [110/2]
via FE80::C824:11FF:FE50:6, Tunnel1
OE2 2026::3:0/122 [110/2]
via FE80::C824:11FF:FE50:6, Tunnel1
OI 2026::12:0/122 [110/128]
via FE80::CE1D:9FF:FE20:10, Serial0/1
C 2026::34:0/122 [0/0]
via Tunnel1, directly connected
L 2026::34:1/128 [0/0]
via Tunnel1, receive
L FF00::/8 [0/0]
via Null0, receive
R3#show int tun 1
Tunnel1 is up, line protocol is up
Hardware is Tunnel
MTU 17916 bytes, BW 100 Kbit/sec, DLY 50000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 10.1.1.1, destination 10.1.1.2
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Tunnel transport MTU 1476 bytes
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:00:01, output 00:00:02, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
162 packets input, 21112 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
172 packets output, 20296 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
!R4
R4#show ipv6 ospf nei
Neighbor ID Pri State Dead Time Interface ID Interface
3.3.3.3 1 FULL/ - 00:00:39 12 Tunnel1
R4#show ipv6 route
IPv6 Routing Table - Default - 8 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, M - MIPv6, R - RIP, I1 - ISIS L1
I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
EX - EIGRP external
O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
OI 2026::1:0/122 [110/1064]
via FE80::C825:11FF:FE50:6, Tunnel1
C 2026::2:0/122 [0/0]
via FastEthernet1/0, directly connected
L 2026::2:1/128 [0/0]
via FastEthernet1/0, receive
R 2026::3:0/122 [120/2]
via FE80::2022:A2FF:FE22:2222, FastEthernet1/0
OI 2026::12:0/122 [110/1128]
via FE80::C825:11FF:FE50:6, Tunnel1
C 2026::34:0/122 [0/0]
via Tunnel1, directly connected
L 2026::34:2/128 [0/0]
via Tunnel1, receive
L FF00::/8 [0/0]
via Null0, receive
R4#show int tun 1
Tunnel1 is up, line protocol is up
Hardware is Tunnel
MTU 17916 bytes, BW 100 Kbit/sec, DLY 50000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive not set
Tunnel source 10.1.1.2, destination 10.1.1.1
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255
Fast tunneling enabled
Tunnel transport MTU 1476 bytes
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:00:08, output 00:00:07, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
184 packets input, 21544 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
188 packets output, 23712 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 output buffer failures, 0 output buffers swapped out
Comments
#tunnel mode [options] cmd
Hi Adam
Great article, although I have a query. I note that the cmd #tunnel mode [options] - is not used. I was wondering if and when you would choose to use this? e.g.-
R4(config)#interface Tunnel1
R4(config-if)#tunnel mode ipv6ip
Or
R4(config-if)#tunnel mode gre
Any thoughts?
Thanks
Jonathan
The default mode if not
The default mode if not specified is gre according to this cisco doc. The example show output in the post is from a functioning tunnel that didn't have the mode specified.
I haven't had to configure too many non-gre tunnels, so I can't really speak from experience on the other available modes. Hope this helps.