I have a cable-modem connection to the internet and I bought a router in order to share my internet connection betwen my laptop and my PC.
The router I bought is D-Link DIR-300.
The first weird thing I notice after connecting all the wires and cables was that my laptop had direct connection to the internet (public IP) even though it was connected to the router (not the cable modem).
After that I connected my PC to the router, and to my surprise my PC got a public IP as well (a new IP, different from that of my laptop).
If I ping from my laptop to my PC (and vice versa) I get a successful response, meaning my PC and laptop can reach each other, but not through a private LAN (which doesn't exist in my case because both computers were given public IPs) but through the internet.
The ping between the two computers takes about 20 ms which is clearly a ping through the internet given that a ping through a private LAN takes 1 ms or less.
I also tried a D-Link DI-604 for testing, but that didn't happen. With the DI-604 my two computers were given private IPs as normal, so clearly the DIR-300 router is making the difference here.
So my question is... How is it possible to have two different public IPs behind a cable-modem and a router?
Is it some weird feature in DIR-300 that allows that?