Discovery for internet access in NodeMCU

Hello every one!

I am connecting my NodeMCU to my Router. It connects to Router finely. but after that I wanna know that NodeMCU should inform me about net connection means I have to investigate that whether I am confined to LAN or I have access to internet. Is it possible in arduino IDE? kindly help me. thanks in advance.

Hello, I have a Nodedmcu too. How do you connect it to your router? I myself have only used it with the android BLYNK app.