The routing is quite different. When you are using the local address, the router just passes the packets back and forth with no translation. This would work if you just wired the two computers together with a crossover cable. You need the router for the external IP address to work.
If you use external address, the router will translate the destination before forwarding the packet. This is known as NAT (Network Address Translation). In this case you would be using DNAT (Destination NAT). Unless the router the router supports hairpin NAT you won't be able to connect to the external IP address from inside your local network. When you are using NAT the router needs to do more work and there may be a noticeable decrease in the speed of the connection.
Assuming your source computer is on 192.168.2.8 and your router is 192.168.2.1 you get:
Computer 1 Computer 2
Source IP Destination IP Source IP Destiantion IP
192.168.2.8 -> 192.168.2.2 192.168.2.8 -> 192.168.2.2 Local address (Direct)
192.168.2.8 -> 71.177.17.58 192.168.2.1 -> 192.168.2.2 External Address (NAT)
Source IP Destination IP
Router
For returning packets the source and destination IP addresses get reversed.
For connections from the Internet, the type of NAT used depends on the where the connection originates.
Local Computer Internet
Source IP Destination IP Source IP Destination IP
192.168.2.2 -> xxx.xxx.xxx.xxx 72.177.17.58 -> xxx.xxx.xxx.xxx Outgoing (SNAT)
xxx.xxx.xxx.xxx -> 192.168.2.2 xxx.xxx.xxx.xxx -> 72.177.17.58 Incoming (DNAT)
Source IP Destination IP
Router
What router? most routers do recognize that the destination address is on the same network and route directly, on other hand I've personally seen the traffic being routed out one hop and back in. – Tyson – 2014-08-02T18:42:00.383
I was referring to an average home router. I thought they'd all operate similarly. – sudo – 2014-08-02T19:03:29.030