Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
userdoc:tt-dhcpv6-prefix-delegation [2017/06/03 14:24]
abelbeck [DHCPv6 Client Configuration]
userdoc:tt-dhcpv6-prefix-delegation [2017/06/07 10:20] (current)
abelbeck [DHCPv6 Client Action Script]
Line 27: Line 27:
  
 Internal Interfaces: -> Interface: -> IPv6 Autoconfig:​\\ Internal Interfaces: -> Interface: -> IPv6 Autoconfig:​\\
 +!!Version ->!! AstLinux 1.2.5 to AstLinux 1.2.10 - ''​IPv6/​nn''​ must be empty\\
 {{:​userdoc:​dhcpv6-internal-interface.jpg?​nolink|DHCPv6 Internal Interface}} {{:​userdoc:​dhcpv6-internal-interface.jpg?​nolink|DHCPv6 Internal Interface}}
  
 +!!Version ->!! AstLinux 1.3.0 and later - ''​IPv6/​nn''​ may define a ULA/64 address, or be empty\\
 {{:​userdoc:​ipv6-ula-nptv6-assign-gua.jpg?​nolink|DHCPv6 Internal Interface}} {{:​userdoc:​ipv6-ula-nptv6-assign-gua.jpg?​nolink|DHCPv6 Internal Interface}}
  
Line 36: Line 38:
 !!Note: AstLinux 1.2.10 or later is required!! !!Note: AstLinux 1.2.10 or later is required!!
  
-!!Note: AstLinux 1.3.0 or later!! executes a default action if a custom script is not defined.+!!Note: AstLinux 1.3.0 or later!! executes a default action, additional custom actions can enabled ​if a custom script is defined.
  
 If an executable script exists at ''/​mnt/​kd/​dhcp6c.script''​ the dhcp6c daemon will call the script after a DHCPv6 request is processed. If an executable script exists at ''/​mnt/​kd/​dhcp6c.script''​ the dhcp6c daemon will call the script after a DHCPv6 request is processed.
Line 72: Line 74:
 The ''​dhcp6c_changed''​ variable can be empty if there was no previous ''​dhcp6c_cache''​ file to compare, ''"​yes"''​ if different from previous, and ''"​no"''​ if the same as previous. ​ The most common use case would be to compare ''​dhcp6c_changed''​ with ''"​no"''​ to skip operations that have been previously performed. The ''​dhcp6c_changed''​ variable can be empty if there was no previous ''​dhcp6c_cache''​ file to compare, ''"​yes"''​ if different from previous, and ''"​no"''​ if the same as previous. ​ The most common use case would be to compare ''​dhcp6c_changed''​ with ''"​no"''​ to skip operations that have been previously performed.
  
-As an example, a simple script to log when the DHCPv6 lease is updated and whether it changed:+As an example, a simple script to log when the DHCPv6 lease is updated and whether it changed:\\ 
 +!!Note ->!! Occurs by default with AstLinux 1.3.0 or later
  
   #!/bin/bash   #!/bin/bash
   ​   ​
-  ​if [ -n "​$dhcp6c_prefix"​ ]; then +  case "​$dhcp6c_changed"​ in 
-    ​case "​$dhcp6c_changed"​ in +    yes) changed="​ (changed)"​ ;; 
-      yes) changed="​ (changed)"​ ;; +     ​no) changed="​ (no change)"​ ;; 
-       ​no) changed="​ (no change)"​ ;; +      *) changed=""​ ;; 
-        *) changed=""​ ;; +  esac 
-    esac +  logger -t dhcp6c -p kern.info "IPv6 Prefix$changed:​ $dhcp6c_prefix"​ 
-    logger -t dhcp6c -p kern.info "IPv6 Prefix$changed:​ $dhcp6c_prefix"​ +
-  fi+
 ===== Debugging DHCPv6 ===== ===== Debugging DHCPv6 =====