Static IPv6 Routes

This section describes the commands used to configure static IPv6 routes. As with IPv4, the static IPv6 routes are added manually in the router's configuration. The syntax for IPv6 static configurations differs from the equivalent commands in IPv4.

Configuring Static IPv6 Routes

The ipv6 route command adds static IPv6 routes. This command is equivalent to the ip route command in IPv4. As soon as the destination IPv6 network has been specified, the route must point to either a next-hop IPv6 address or a router's interface, as shown in the following:

Router(config)#ipv6 route
							ipv6-prefix/prefix-length {next-hop | interface}
  [distance]

The ipv6-prefix parameter is the destination IPv6 network. The prefix-length is the length of the IPv6 prefix given. The next-hop is an IPv6 address used to reach the destination IPv6 network. The interface can be used to direct the static route out of the interface such as serial links or tunnels. The distance is an optional parameter that sets the administrative distance. By default, the administrative distance of a static route is 1.

NOTE

It is not recommended in the IPv6 specifications to use an aggregatable global unicast or site-local address as a next-hop address. If you do, Internet Control Message Protocol for IPv6 (ICMPv6) redirection messages (Type 137) will not work. Router redirection is discussed in detail in Chapter 3, “IPv6 in Depth.” The next-hop address has to be a link-local address. However, when you configure a link-local address as the next hop, you must identify in the configuration the corresponding network interface on the router. In the Cisco IOS Software technology, the recommended syntax for the ipv6 route command in this situation is ipv6 route ipv6-prefix/prefix-length interface link-local-address.


The destination IPv6 network 2001:410:ffff::/48 is reached through the next-hop address fe80::250:3eff:fee4:4c01 using the corresponding network interface ethernet0, as shown in the following:

Router(config)#ipv6 route 2001:410:ffff::/48 ethernet0 fe80::250:3eff:fee4:4c01
						

The destination IPv6 network 3ffe::/16 is reached through the Tunnel0 interface:

Router(config)#ipv6 route 3ffe::/16 Tunnel0
						

The following is a default IPv6 route configuration that points to the next-hop address fe80::250:3eff:fee4:4c01 using the corresponding network interface ethernet1:

Router(config)#ipv6 route ::/0 ethernet1 fe80::250:3eff:fee4:4c01
						

NOTE

The ipv6 route ::/0 interface next-hop command is equivalent to the ip route 0.0.0.0 0.0.0.0 next-hop command in IPv4. The destination ::/0 means any IPv6 address.


The ipv6 route command is enabled on a global basis.

Displaying IPv6 Routes

The command show ipv6 route displays the current IPv6 routing table in the router. This command is equivalent to the show ip route command in IPv4. As in IPv4, it is possible to display a specific type of IPv6 route such as connected, local, static, rip, bgp, isis, or ospf. However, when an IPv6 prefix is specified with the show ipv6 route command, a single IPv6 route is displayed. The syntax for this command is as follows:

Router#show ipv6 route [connected | local | static | rip | bgp | isis | ospf] |
  [ipv6-prefix/prefix-length | ipv6-address]

If the ipv6-prefix/prefix-length parameter is specified, a single route is displayed. The ipv6-address is optional and can display routing information for a specific IPv6 address.

NOTE

When you configure an IPv6 address on an interface using the ipv6 address command, as discussed in Chapter 2, two entries are inserted into the IPv6 routing table. The first entry is the full 128-bit interface address itself, so this first entry is marked with an L for a local route. The second entry is the prefix entry with the appropriate mask, so this second entry is marked with a C for a connected route. However, if you configure an IPv6 address with 128-bit as the prefix-length, you get only a single entry, flagged as both L for local route and C for connected route. The local route simply indicates an interface address.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.238.226