你是哪国人? --> ni shi na guo ren? --> referring to which country are you from?
你是哪里人? --> ni shi na li ren? ---> referring to which city/province are you from?
Not too hard to remember because 国 (guo) means country.
So the first sentence literally is: "You are which country person?"