Difference between revisions of "Stateless Autoconfiguration IPv6 Cisco IOS"

From Teknologisk videncenter
Jump to: navigation, search
m (Turning off Router Advertisement)
m (Turning off Router Advertisement)
Line 129: Line 129:
 
</source>
 
</source>
  
=Turning off Router Advertisement=
+
=Turning off all Router Advertisements=
 
To turn of Periodically and answers to "Router Solicitation" packets. As seen in the picture below, RA is turned off on three of the interfaces.
 
To turn of Periodically and answers to "Router Solicitation" packets. As seen in the picture below, RA is turned off on three of the interfaces.
 
[[Image:IPv6 Router Advertisement turn off.png|400px|Turning off Router Advertisements on unwanted interfaces]]
 
[[Image:IPv6 Router Advertisement turn off.png|400px|Turning off Router Advertisements on unwanted interfaces]]

Revision as of 15:00, 11 June 2011

See ICMPv6 and IPv6 Stateless Autoconfiguration for background information.

Advertised Prefix

K06_HOT_3030FW#<input>show ipv6 interface fastEthernet 0/1 prefix</input>
IPv6 Prefix Advertisements FastEthernet0/1
Codes: A - Address, P - Prefix-Advertisement, O - Pool
       U - Per-user prefix, D - Default
       N - Not advertised, C - Calendar

PD default [LA] Valid lifetime 2592000, preferred lifetime 604800
AD 2001:16D8:DD85:4::/64 [LA] Valid lifetime 2592000, preferred lifetime 604800

Showing Connected Routers Advertising

Heimdal#<input>show ipv6 routers</input>
Router FE80::128C:CFFF:FE96:F76F on Vlan1, last update 0 min
  Hops 64, Lifetime 1800 sec, AddrFlag=0, OtherFlag=0, MTU=1500
  HomeAgentFlag=0, Preference=Medium
  Reachable time 0 (unspecified), Retransmit time 0 (unspecified)
  Prefix <notice>2001:16D8:DD85:4::/64</notice> onlink autoconfig
    Valid lifetime 2592000, preferred lifetime 604800
Router FE80::218:18FF:FE7C:B440 on Vlan1, last update 0 min
  Hops 64, Lifetime 1800 sec, AddrFlag=0, OtherFlag=0, MTU=1500
  HomeAgentFlag=0, Preference=Medium
  Reachable time 0 (unspecified), Retransmit time 0 (unspecified)
  Prefix <notice>2001:16D8:DD85:4::/64</notice> onlink autoconfig
    Valid lifetime 2592000, preferred lifetime 604800

Router Advertisement Parameters

Router Lifetime

The lifetime of the Default Router when using IPv6 Stateless Autoconfiguration. if this field is set to zero, the Router is not a candidate for Default Router.

  • Lifetime range: 0 - 9000 seconds
IPv6(config)#<input>int fa0/1</input>
IPv6(config-if)#<input>do show ipv6 int fa0/1</input>
FastEthernet0/1 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::21B:D4FF:FE0F:8CA3
  <notice>...OUTPUT OMITTED...</notice>
  ND router advertisements are sent every 200 seconds
  ND router advertisements live for 1800 seconds
  ND advertised default router preference is Medium
  Hosts use stateless autoconfig for addresses.
IPv6(config-if)#<input>ipv6 nd ra lifetime 0</input>
IPv6(config-if)#<input>do show ipv6 int fa0/1</input>
FastEthernet0/1 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::21B:D4FF:FE0F:8CA3
  <notice>...OUTPUT OMITTED...</notice>
  ND router advertisements are sent every 200 seconds
  ND is not advertising as a default router
  Hosts use stateless autoconfig for addresses.

Router Preference

The Preference of a Router can be set as Low, Medium or High. The information is carried in the IPv6 Stateless Autoconfiguration ICMP Type 134 message.

IPv6(config-if)#<input>ipv6 nd router-preference ?</input>
  High    High default router preference
  Low     Low default router preference
  Medium  Medium default router preference

Router Advertisment Interval

Router Advertisements are default sent every 200 seconds.

R1(config-if)#<input>do show ipv6 int fa0/0</input>
FastEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::F225:72FF:FE3B:D6D2
  No Virtual link-local address(es):
  Description: Inside: Internal LAN
  Global unicast address(es):
    21:26::1, subnet is 21:26::/64
  Joined group address(es):
    FF02::1
    FF02::2
    FF02::1:FF00:1
    FF02::1:FF3B:D6D2
  MTU is 1500 bytes
  ICMP error messages limited to one every 100 milliseconds
  ICMP redirects are enabled
  ICMP unreachables are sent
  ND DAD is enabled, number of DAD attempts: 1
  ND reachable time is 30000 milliseconds (using 30000)
  ND advertised reachable time is 0 (unspecified)
  ND advertised retransmit interval is 1000 milliseconds
  <notice>ND router advertisements are sent every 200 seconds</notice>
  ND router advertisements live for 1800 seconds
  ND advertised default router preference is Medium
  Hosts use stateless autoconfig for addresses.

Changing Router Advertisement interval

Changing to sending 10 packets pr. second. (Not advisable though - too much traffic generated)

R1(config)#<input>interface fastEthernet 0/0</input>
R1(config-if)#<input>ipv6 nd ra interval msec 100</input>


Router Advertisement bit flags

M-Bit: Using DHCPv6 instead

When using DHCPv6 you send a Router Advertisment with the M-bit (Managed-Config-Flag) set. See ICMPv6. This will tell the host to use DHCPv6.

IPv6(config)#<input>int fa0/1</input>
IPv6(config-if)#<input>ipv6 nd managed-config-flag</input>
IPv6(config-if)#<input>do show ipv6 int fa0/1</input>
FastEthernet0/1 is up, line protocol is up
<notice>...OUTPUT OMITTED...</notice>
  ND advertised default router preference is Medium
  Hosts use DHCP to obtain routable addresses.

O-Bit: Using Autoconfig and DHCPv6 simultaneously

It is possible to use Stateless Autoconfiguration to configure IPv6 address and Default Gateway and using DHCPv6 to configure other configuration fx. DNS server. The Router will send Router Advertisements with the O-Bit (other-config-flag) set.

IPv6(config)#<input>int fa0/1</input>
IPv6(config-if)#<input>ipv6 nd other-config-flag</input>
IPv6(config-if)#<input>do show ipv6 int fa0/1</input>
FastEthernet0/1 is up, line protocol is up
<notice>...OUTPUT OMITTED...</notice>
  ND advertised default router preference is Medium
  Hosts use stateless autoconfig for addresses.
  Hosts use DHCP to obtain other configuration.

Turning off Periodically send Router Advertisement

Notice
The Router will still respond to "Router Solicitation" packets and inform the Node of it's prefix on that link.
R1(config)#<input>int fa0/1</input>
R1(config-if)#<input>ipv6 nd ra suppress</input>

Turning off all Router Advertisements

To turn of Periodically and answers to "Router Solicitation" packets. As seen in the picture below, RA is turned off on three of the interfaces. Turning off Router Advertisements on unwanted interfaces

R1(config)#<input>int fa0/1</input>
R1(config-if)#<input>ipv6 nd ra suppress all</input>

Prefix renumbering

With Autoconfiguration, it's quite easy to change to a new prefix in-flight.

Example

Changing to a new ISP will give you a new prefix

  • Existing network: 2001:1::/64
    • Last Router Advertising is December 12. 2011 at 02:59.
  • New subnet 21:26::1/64 is advertised all along
  • Advertise subnets every 60 seconds during transit to new prefix
interface FastEthernet0/0
 description Inside - Advertise new prefix 21:26::1/64 recommission 2001:1::/64 
 ipv6 address 21:26::1/64
 ipv6 address 2001:1::/64 eui-64
 ipv6 nd prefix 2001:1::/64 at 12 Dec 2011 03:00 12 Dec 2011 02:59
 ipv6 nd ra interval 60