Changes to external ip

Why would you need the External IP to access the internet?
I think you may need to read up on how TCP/IP works.

Your arduino will broadcast that it is on the network. It will look for a DHCP server. It will then be given all the details it needs to connect to the internet. (Internal IP address, DNS servers, Router Address) You NEVER need to know your external IP to access the internet. That will be handled by the router. You cannot even think of getting the external IP before you get all the details from your router. As soon as you have these if it supports UPNP you can just ask it for the external IP.