diff --git a/cloud-init-22.1/cloudinit/distros/aix.py b/cloud-init-22.1/cloudinit/distros/aix.py
index e63765e..fd5dd7f 100644
--- a/cloud-init-22.1/cloudinit/distros/aix.py
+++ b/cloud-init-22.1/cloudinit/distros/aix.py
@@ -83,7 +83,7 @@ class Distro(distros.Distro):
         # Remove the chdev ipv6 entries present in the /etc/rc.tcpip from earlier runs.
         # Read the content of the file and filter out lines containing both words
         with open('/etc/rc.tcpip', "r") as infile:
-            lines = [line for line in infile if "chdev" not in line and "anetaddr6" not in line]
+            lines = [line for line in infile if "chdev" not in line and "anetaddr6" not in line and "cloud-init" not in line]
 
         # Write the filtered lines back to the file
         with open('/etc/rc.tcpip', "w") as outfile:
@@ -158,7 +158,11 @@ class Distro(distros.Distro):
                             time.sleep(2)
                         if aix_dev == "en0":
                             if run_autoconf6 is True:
-                                aix_util.add_route("ipv6", info.get('gateway'))
+                                aix_util.add_route("ipv6", ipv6_info.get('gateway'))
+                                #aix_util.disable_ndpd_host()
+                                #aix_util.enable_ndpd_host()
+                                util.append_file("/etc/rc.tcpip", "%s\n" % ("stopsrc -s ndpd-host ; sleep 3 ; startsrc -s ndpd-host ; #To remove default gateway for cloud-init "))
+                                util.append_file("/etc/rc.tcpip", "%s\n" % (" ".join(chdev_cmd)))
                             else:
                                 aix_util.add_route("ipv4", info.get('gateway'))
 
diff --git a/cloud-init-22.1/cloudinit/distros/aix_util.py b/cloud-init-22.1/cloudinit/distros/aix_util.py
index 9497544..7625475 100644
--- a/cloud-init-22.1/cloudinit/distros/aix_util.py
+++ b/cloud-init-22.1/cloudinit/distros/aix_util.py
@@ -48,6 +48,13 @@ def logical_adpt_name(devname):
 def add_route(network, route):
     # First, delete the route if it exists on the system
     del_route(network, route)
+    if network == 'ipv6':
+       command = "/usr/sbin/autoconf6 -i en0"
+       output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+       time.sleep(2)
+       command = "stopsrc -s ndpd-host ; sleep 3 ; startsrc -s ndpd-host ;"
+       output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+
 
     # Add the route if there isn't already a default route
     cmd = ['/usr/sbin/chdev', '-l', 'inet0']
@@ -57,10 +64,59 @@ def add_route(network, route):
             cmd.extend(["-aroute=" + "net,-hopcount,0,,0," + route])
         elif network == 'ipv6':
             cmd.extend(["-arout6=" + "net,-hopcount,0,,,::," + route])
-
+    cmd_string=' '.join(cmd)
     subp.subp(cmd, capture=False, rcs=[0, 1])
     time.sleep(2)
 
+    util.append_file("/etc/rc.tcpip", "%s\n" % (" ".join(cmd)))
+    if network == 'ipv6':
+       print("netstat -rn")
+       command = "/usr/bin/netstat -rn | grep default"
+       output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+       print(output)
+       print("netstat -in")
+       command = "/usr/bin/netstat -in "
+       output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+       print(output)
+       cmd_out = subprocess.check_output(cmd_string, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+
+       try:
+          print(cmd_string)
+          cmd_out = subprocess.check_output(cmd_string, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+          print(cmd_out)
+          time.sleep(2)
+          command = "/usr/bin/netstat -rn | grep default"
+          output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+          print(output)
+          # Run the command and capture its output
+          command = "netstat -rn | grep -v link | grep default"
+          output = subprocess.check_output(command, shell=True, text=True)
+
+
+       except subprocess.CalledProcessError as e:
+          cmd_out= subprocess.check_output(cmd_string, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+          print(cmd_out)
+          time.sleep(2)
+       else:
+          # Split the output into lines and count them
+          lines = output.split('\n')
+          non_empty_lines = [line for line in lines if line.strip() != ""]
+          line_count = len(non_empty_lines)
+          print("line_count :", line_count)
+          # Check if there are more than one line
+          if line_count > 1:
+             print("stopsrc -s ndpd-host ; sleep 3 ; startsrc -s ndpd-host ;")
+             command = "stopsrc -s ndpd-host ; sleep 3 ; startsrc -s ndpd-host ;"
+             output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+          else:
+             cmd_out= subprocess.check_output(cmd_string, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+             print(cmd_out)
+             time.sleep(2)
+    command = "/usr/bin/netstat -rn | grep default"
+    output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, universal_newlines=True)
+    print(output)
+
+
 
 # Call chdev to delete default route
 def del_route(network, route):
