Saturday, February 16, 2013

Static IPv6 point-to-point tunnels configuration.

This post is just a refresher, because knowledge that you don't use prone to vanish.
For point-to-point tunnels there are two options available - manual tunnels (RFC 4213) and GRE tunnels (RFC 2784). Both options support IGPs, IPv6 multicast, etc. Besides, GRE tunnels can carry not only IPv6 payload.
Let's consider both options. The topology is as following:
Basic configuration is straightforward using OSPF as IGP for interconnects and loopback interfaces. R1 as example:
ipv6 unicast-routing
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 1 area 0
!
interface FastEthernet0/0
 ip address 10.0.12.1 255.255.255.0
 ip ospf network point-to-point
 ip ospf 1 area 0
!
interface FastEthernet0/1
 no ip address
 ipv6 address 2001::1/64
!
R1#show ip route
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/2] via 10.0.12.2, 00:05:33, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/3] via 10.0.12.2, 00:05:33, FastEthernet0/0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.0.12.0 is directly connected, FastEthernet0/0
O       10.0.23.0 [110/2] via 10.0.12.2, 00:05:33, FastEthernet0/0
R1#show ipv6 route
C   2001::/64 [0/0]
     via ::, FastEthernet0/1
L   2001::1/128 [0/0]
     via ::, FastEthernet0/1
L   FF00::/8 [0/0]
     via ::, Null0
R1#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/52/80 ms
R1#ping 2001::100
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/52 ms

R2 is IPv4-only enabled and can be represented as IPv4-only cloud.

Manual IPv6 point-to-point tunnels.
R1:

interface Tunnel0 #Tunnel number is only locally significant and doesn't have to match on both ends.
 no ip address
 ipv6 address 2013::1/64
#After setting up this interface will be treated as regular interface.
 ipv6 ospf 1 area 0 #To reach remote prefixes you can use static routes instead.
 tunnel source Loopback0 #You can specify source interface or IP address. It only have to be in the up/up state, otherwise tunnel interface won't become up/up.
 tunnel destination 3.3.3.3 #This pair of source and destination have to match on both ends of the tunnel.
 tunnel mode ipv6ip #Default mode is GRE.
!
interface FastEthernet0/1
 no ip address
 ipv6 address 2001::1/64
#Don't forget to add client's prefixes into IPv6 IGP.
 ipv6 ospf 1 area 0
R3:
interface Tunnel1
 no ip address
 ipv6 address 2013::3/64
 ipv6 ospf 1 area 0
 tunnel source 3.3.3.3
#If a network has redundant paths it is better to use logical interfaces for reachability.
 tunnel destination 1.1.1.1
 tunnel mode ipv6ip
!
interface FastEthernet0/0
 no ip address
 ipv6 address 2002::1/64
 ipv6 ospf 1 area 0

So, that's it:
R1#show ipv6 route
C   2001::/64 [0/0]
     via ::, FastEthernet0/1
L   2001::1/128 [0/0]
     via ::, FastEthernet0/1
O   2002::/64 [110/11112]
     via FE80::303:303, Tunnel0
C   2013::/64 [0/0]
     via ::, Tunnel0
L   2013::1/128 [0/0]
     via ::, Tunnel0
L   FF00::/8 [0/0]
     via ::, Null0
   
VPCS[1]> ping 2002::100
2002::100 icmp6_seq=1 ttl=60 time=90.000 ms
2002::100 icmp6_seq=2 ttl=60 time=90.000 ms
2002::100 icmp6_seq=3 ttl=60 time=95.000 ms
2002::100 icmp6_seq=4 ttl=60 time=85.000 ms
2002::100 icmp6_seq=5 ttl=60 time=100.000 ms

VPCS[1]> tracert 2002::100
traceroute to 2002::100, 64 hops max
 1 2001::1   35.000 ms  30.000 ms  25.000 ms
 2 2013::3   65.000 ms  80.000 ms  65.000 ms
 3 2002::100   90.000 ms  85.000 ms  100.000 ms


One thing to mention:
R1#show ipv6 interface tunnel 0 | include FE80
  IPv6 is enabled, link-local address is FE80::101:101
R3#show ipv6 interface tunnel 1 | include FE80
  IPv6 is enabled, link-local address is FE80::303:303

In Link-Local address of manual IPv6 tunnel interfaces last 32 bits represent configured source IPv4 address.

GRE IPv6 point-to-point tunnels.
The only difference in configuration is encapsulation type. And as IOS default to "tunnel mode gre ip" you can just omit command "tunnel mode" (it won't be displayed in the configuration anyway).
R1:
interface Tunnel0
 no ip address
 ipv6 address 2013::1/64
 ipv6 ospf 1 area 0
 tunnel source Loopback0
 tunnel destination 3.3.3.3

R3:
interface Tunnel1
 no ip address
 ipv6 address 2013::3/64
 ipv6 ospf 1 area 0
 tunnel source 3.3.3.3
 tunnel destination 1.1.1.1

And the result is the same:
VPCS[2]> tracert 2001::100
traceroute to 2001::100, 64 hops max
 1 2002::1   35.000 ms  20.000 ms  25.000 ms
 2 2013::1   75.000 ms  75.000 ms  75.000 ms
 3 2001::100   95.000 ms  90.000 ms  90.000 ms

Nevertheless GRE tunnel interfaces are slightly different:
R1#show ipv6 interface tunnel 0 | include FE80
  IPv6 is enabled, link-local address is FE80::C000:13FF:FEA8:0

Link-Local address is derived from first physical interface using EUI-64:
R1#show interfaces fastEthernet 0/0 | include bia
  Hardware is Gt96k FE, address is c200.13a8.0000 (bia c200.13a8.0000)

This is because tunnel interface is a logical interface, thus it doesn't have physical mac-address.
These tunnel types also use different MTU values due to different encapsulation headers.

No comments:

Post a Comment