WIFI connected but no internet for Ubuntu

As title, the connection is okay after reboot but suddenly no internet connection but still has a wifi connection. This happens often after some wifi signal hiccup. It turns out that it seems to be ipv6 problems. After setting ipv6 to “ignore” and disable and enable connection, the internet is back nicely.