IPv6 Auto configuration

 

image

In this post we will see how we can use the auto configuration options of IPv6

auto configuration feature built in IPv6 replaces many feature of IPv4 DHCP, although

IPv6 DHCP still exists. with IPv6 auto configuration nodes can determine the Ipv6 prefixes on the link and the default router if required through ICMPv6 ND (Neighbor Discovery)

In our setup we will have R1 configured with static IPv6 address and R2 will acquire its Ipv6 address automatically

ipv6 unicast-routing has been enabled on both routers

(config)#ipv6 unicast-routing 

R1 configuration

R1# sh run interf f0/0 
ipv6 address FE80::1 link-local

 ipv6 address 2001:12::1/64

R2

R2# sh run interf f0/0 
ipv6 address FE80::2 link-local

 ipv6 address auto-config

that’s all on R2, so now let’s check R2

R2#show ipv6 interface f0/0
FastEthernet0/0 is up, line protocol is up

  IPv6 is enabled, link-local address is FE80::2 
  No Virtual link-local address(es):
  Global unicast address(es):
    2001:12::2, subnet is 2001:12::/64 [EUI/CAL/PRE]
      valid lifetime 2591994 preferred lifetime 604794

 

As we can see R2 acquired this IPv6 address 2001:12::2  from R1, we can also see the default validity lifetime

If we need to change the default timers, we can do this on R1

 

interf f0/0
ipv6 nd prefix 2001:12::/64 1500 1400

Now lets’ check that on R2

R2# sh ipv6 interf f0/0 | in life
      valid lifetime 1481 preferred lifetime 1381

we can also use R1 to automatically advertise itself as the defaqult router on that subnet using RA (Route Advertisement)  which is supressed by default

to verify, on R2

R2#show ipv6 router

So by default R2 is not getting any RA from R1, we can change this using the following command under R1 and we will also change the interval/lifetime  of this RA

R1(config-if)#no ipv6 nd ra suppress
R1(config-if)#ipv6 nd ra interval 60
R1(config-if)#ipv6 nd ra lifetime 3600

now let’s check R2

R2#show ipv6 router
Router FE80::1 on FastEthernet0/0, last update 0 min
  Hops 64, Lifetime 3600 sec, AddrFlag=0, OtherFlag=0, MTU=1500
  HomeAgentFlag=0, Preference=Medium
  Reachable time 0 msec, Retransmit time 0 msec
  Prefix 2001:12::/64 onlink autoconfig
    Valid lifetime 1500, preferred lifetime 1400

We can also define the preference of the RA incase we have more than one router on the segment for redundancy, by default the preference is set to medium is as shown above, we can have it configured to high on R1 using this command

R1(config)#interface f0/0
R1(config-if)#ipv6 nd router-preference high

now if we check R2 router output on R2 again

R2(config-if)#do sh ipv6 router
Router FE80::1 on FastEthernet0/0, last update 0 min
  Hops 64, Lifetime 3600 sec, AddrFlag=0, OtherFlag=0, MTU=1500
  HomeAgentFlag=0, Preference=High
  Reachable time 0 msec, Retransmit time 0 msec
  Prefix 2001:12::/64 onlink autoconfig
    Valid lifetime 1500, preferred lifetime 1400

Comments

Popular posts from this blog

BPDU Filter vs BPDU Guard

BGP Weight Attribute

OSPF–Point To Multipoint Non-Broadcast