Instead of going through all this trouble, you can just command line ping a destination on the internet for the same results..