# Bug - NTP Klib not working with IPv6 in AWS

**URL:** <https://forums.nanovms.com/t/bug-ntp-klib-not-working-with-ipv6-in-aws/31>\
**Category:** Uncategorized\
**Created:** [December 1, 2023, 1:51pm UTC](https://forums.nanovms.com/t/bug-ntp-klib-not-working-with-ipv6-in-aws/31 "2023-12-01T13:51:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ernestomedina17](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@ernestomedina17](https://forums.nanovms.com/u/ernestomedina17)\
**Post date:** [December 1, 2023, 1:51pm UTC](https://forums.nanovms.com/t/bug-ntp-klib-not-working-with-ipv6-in-aws/31/1 "2023-12-01T13:51:31Z")

</div>

Hello

I discovered a bug while configuring the NTP Klib to use the AWS NTP Server with the IPv6 IP. Using AWS NTP server is recommended for lower latency within the AWS cloud. [Doc Reference](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html#configure-ec2-ntp).

Basically the ipv4 works:

```auto
"ntp_servers": ["169.254.169.123"],

```

And the ipv6 does not:

```auto
"ntp_servers": ["[fd00:ec2::123]"], 

```

I enclosed the ipv6 IP within brackets as mentioned in the [documentation](https://docs.ops.city/ops/klibs#ntp).

The error is:

```auto
NTP: invalid max slew frequency
klib automatic load failed (4)

```

I’m not setting the **ntp\_max\_slew\_ppm** configuration property, therefore should be using the default value of **83333**.

Screenshot:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/nanovms1/original/1X/f3be19566d1b3025cc3f8a468c2d91bd25cdb89d.png)

Even though the ipv4 works, I think this should be fixed at some point.

Thanks and regards,  
Ernesto Medina.

---

<div class="post-metadata">

**Author:** ![eyberg](https://avatars.discourse-cdn.com/v4/letter/e/ea666f/32.png) [@eyberg](https://forums.nanovms.com/u/eyberg)\
**Post date:** [December 1, 2023, 3:39pm UTC](https://forums.nanovms.com/t/bug-ntp-klib-not-working-with-ipv6-in-aws/31/2 "2023-12-01T15:39:26Z")

</div>

Thanks - we’ll take a look.

---

<div class="post-metadata">

**Author:** ![francescolavra](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.nanovms.com/francescolavra/32/33_2.png) [@francescolavra](https://forums.nanovms.com/u/francescolavra)\
**Post date:** [December 4, 2023, 4:57pm UTC](https://forums.nanovms.com/t/bug-ntp-klib-not-working-with-ipv6-in-aws/31/3 "2023-12-04T16:57:55Z")

</div>

I tried to reproduce this issue but was unable to. I deployed a test application to a t4g.nano instance, using the ntp klib configured to query the AWS IPv6 NTP server, and everything works as expected, communication with the server is OK and the local clock gets synchronized with the NTP time. What Nanos release did you use?  
Here are the relevant parts of my Ops configuration:

```auto
{
  "Klibs": ["ntp"],
  "CloudConfig" : {
    "Zone": "us-west-1a",
    "Flavor": "t4g.nano",
    "EnableIPv6": true
  },
  "ManifestPassthrough": {
    "ntp_servers": ["[fd00:ec2::123]"]
  }
}

```

Note that IPv6 networking must be enabled via the “EnableIPv6” option, otherwise the ntp klib won’t be able to contact the ntp server and you will see error messages such as “ntp\_query: failed to send request: -4”

---

<div class="post-metadata">

**Author:** ![ernestomedina17](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@ernestomedina17](https://forums.nanovms.com/u/ernestomedina17)\
**Post date:** [December 4, 2023, 10:06pm UTC](https://forums.nanovms.com/t/bug-ntp-klib-not-working-with-ipv6-in-aws/31/4 "2023-12-04T22:06:49Z")

</div>

Hi Francesco

Upgrading to the latest versions of ops/nanos solved the problem.

```auto
% ~/.ops/bin/ops version
Ops version: 0.1.40
Nanos version: 0.1.48

```

We can close this one.  
Thanks and regards,  
Ernesto.
