Difference between revisions of "Quattor and IPv6"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 88: Line 88:
  
 
Finally, the third solution, which is the adopted one, just includes some extra parameters in the types ''structure_network'', ''structure_interface'', and ''structure_interface_alias''. I thought that this solution would be the easiest one to implement, since not all the parameters in a structure would need to be defined, so this would be ideal for sites that wanted only IPv4.  
 
Finally, the third solution, which is the adopted one, just includes some extra parameters in the types ''structure_network'', ''structure_interface'', and ''structure_interface_alias''. I thought that this solution would be the easiest one to implement, since not all the parameters in a structure would need to be defined, so this would be ideal for sites that wanted only IPv4.  
The interface (Also the alias) need to include an extra IP (Only ''type_ipv6''). The interface includes the gateway for '''IPv6''' and a parameter to initialize '''IPv6''' in that interface. I have bolded the new parameters:
+
The interface (Also the alias) need to include an extra IP (Only ''type_ipv6''). The interface includes the gateway for '''IPv6''' and a parameter to initialize '''IPv6''' in that interface. I have added an asterisk after the new parameters:
  
 
  type structure_interface_alias = {
 
  type structure_interface_alias = {
"ip"      ? type_ip
+
"ip"      ? type_ip
"ipv6"    ? type_ipv6
+
"ipv6"    ? type_ipv6           *
"netmask" : type_ip
+
"netmask" : type_ip
"broadcast" ? type_ip
+
"broadcast" ? type_ip
 
  };
 
  };
 
  type structure_interface = {
 
  type structure_interface = {
 
   "ip"          ? type_ip
 
   "ip"          ? type_ip
 
   "gateway"      ? type_ip
 
   "gateway"      ? type_ip
   "ipv6"        ? type_ipv6
+
   "ipv6"        ? type_ipv6             *
   "gateway6"    ? type_ipv6
+
   "gateway6"    ? type_ipv6             *
   "ipv6init"    ? string
+
   "ipv6init"    ? string                 *
 
   "netmask"      ? type_ip
 
   "netmask"      ? type_ip
 
   "broadcast"    ? type_ip
 
   "broadcast"    ? type_ip
Line 125: Line 125:
 
This is for the network in general and a default gateway needs to be defined also for IPv6.
 
This is for the network in general and a default gateway needs to be defined also for IPv6.
  
type structure_network = {
+
type structure_network = {
    "domainname"      : type_fqdn
+
    "domainname"      : type_fqdn
    "hostname"        : type_shorthostname
+
    "hostname"        : type_shorthostname
    "realhostname"    ? type_fqdn
+
    "realhostname"    ? type_fqdn
    "default_gateway"  ? type_ip
+
    "default_gateway"  ? type_ip
    "gatewaydev"      ? string with exists ("/system/network/interfaces/" + SELF)
+
    "gatewaydev"      ? string with exists ("/system/network/interfaces/" + SELF)
    "default_gateway6" ? type_ipv6
+
    "default_gateway6" ? type_ipv6         *
"networking_ipv6"  ? string  
+
    "networking_ipv6"  ? string           *
    "interfaces"      : structure_interface{}
+
    "interfaces"      : structure_interface{}
    "nameserver"      : type_ip[]
+
    "nameserver"      : type_ip[]
    "nisdomain"        ? type_fqdn
+
    "nisdomain"        ? type_fqdn
    "nozeroconf"      ? boolean
+
    "nozeroconf"      ? boolean
    "set_hwaddr"      ? boolean
+
    "set_hwaddr"      ? boolean
};
+
};
2.3.- $L/cfg/sites/ndpf/site/network.tpl
+
 
This is just to give the value to NETWORKING_IPV6 which enables IPv6 in the server.  
+
=== $L/cfg/sites/ndpf/site/network.tpl ===
 +
This is just to give the value to ''NETWORKING_IPV6'' which enables '''IPv6''' in the server.  
 +
 
 +
"/system/network/networking_ipv6" = NETWORKING_IPV6;
  
"/system/network/networking_ipv6" = NETWORKING_IPV6;
+
=== $L/cfg/sites/ndpf/site/global_variables.tpl ===
  
2.4.- $L/cfg/sites/ndpf/site/global_variables.tpl
+
In this template, first I give the real value to ''NETWORKING_IPv6'' (= yes), and then I modify the variable ''NETWORK_PARAMS'' to get the DB in ''myip6'' with the ''HOSTNAME <--> IPv6'' resolution
In this template, first I give the real value to NETWORKING_IPv6 (= yes), and then I modify the variable NETWORK_PARAMS to get the DB in 'myip6' with the HOSTNAME <--> IPv6 resolution
 
 
...
 
...
#IPv6
+
 
final variable NETWORKING_IPV6 = "yes";
+
#IPv6
...
+
final variable NETWORKING_IPV6 = "yes";
variable NETWORK_PARAMS = {
+
...
 +
variable NETWORK_PARAMS = {
 
     myip = DB_IP[escape(FULL_HOSTNAME)];
 
     myip = DB_IP[escape(FULL_HOSTNAME)];
 
     myip6 = DB_IP6[escape(FULL_HOSTNAME)];
 
     myip6 = DB_IP6[escape(FULL_HOSTNAME)];
Line 160: Line 163:
 
     npar["ipv6init"] = ip6init;
 
     npar["ipv6init"] = ip6init;
 
     npar;
 
     npar;
};
+
};
  
 
While I was writing this document, it came to my head that this is going to set to yes NETWORKING_IPV6 and IPV6INIT, either we want it or not; so I need to modify this somehow... I'm thinking of �If myip6 is empty, then don't initialize those two variables�
 
While I was writing this document, it came to my head that this is going to set to yes NETWORKING_IPV6 and IPV6INIT, either we want it or not; so I need to modify this somehow... I'm thinking of �If myip6 is empty, then don't initialize those two variables�

Revision as of 12:06, 10 October 2012