# At what point does NwkSKey and AppSKey expire?

**URL:** <https://www.thethingsnetwork.org/forum/t/at-what-point-does-nwkskey-and-appskey-expire/59193>\
**Category:** LoRaWAN Discussions\
**Created:** [October 5, 2022, 3:38pm UTC](https://www.thethingsnetwork.org/forum/t/at-what-point-does-nwkskey-and-appskey-expire/59193 "2022-10-05T15:38:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ridgerunnersjw](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ridgerunnersjw/32/35697_2.png) [@ridgerunnersjw](https://www.thethingsnetwork.org/forum/u/ridgerunnersjw)\
**Post date:** [October 5, 2022, 3:38pm UTC](https://www.thethingsnetwork.org/forum/t/at-what-point-does-nwkskey-and-appskey-expire/59193/1 "2022-10-05T15:38:57Z")

</div>

I have been doing much reading regarding Lora / Lorawan but I do not really see what defines a session…Can someone clarify what defines the time length of a session? If end node needs to re-join is this considered the same session or would this be a new session?

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [October 5, 2022, 5:49pm UTC](https://www.thethingsnetwork.org/forum/t/at-what-point-does-nwkskey-and-appskey-expire/59193/2 "2022-10-05T17:49:17Z")

</div>

An OTAA session starts when you join and ends with the next join. An ABP session starts when programming the device id and session keys and ends when you change any of them.  
Keep in mind you need to use incrementing frame counters when a session is active. Resetting the counter results in a ‘replay’ attack and all packets will be dropped until the counter exceeds the value prior to reset.
