Two public IPs behind a cable-modem using D-Link DIR-300

1

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?

GetFree

Posted 2009-10-05T01:55:52.200

Reputation: 2 394

1Is it configured as a router and cabled correctly because that sounds weird to me too. – emgee – 2009-10-05T02:06:02.590

1what's the "public ip"? just give us a class A or B netblock (A.B.x.x), we don't need to see any more. – quack quixote – 2009-10-05T02:22:13.687

Both computers get completely different connections to the internet (with different gateway IPs but same DNS IPs). One of the computers gets the IP 190.44.167.xxx and the other 190.46.167.xxx – GetFree – 2009-10-05T06:23:05.060

you're right, those look public. i'd guess NAT is disabled on the DIR-300 and you're getting DHCP addresses from the modem (or further upstream). check tracert to be sure. if there are too many hops, you might want to enable NAT on the DIR-300 so you get nice fast connections on the LAN. – quack quixote – 2009-10-05T21:21:42.273

Answers

1

Depending on your ISP, some will supply you with multiple IP addresses. Mine only allows 1 lease at a time though. Your router is likely configured to allow the use of multiple IPs if available, although you can change it to only use 1 if you'd like.

John T

Posted 2009-10-05T01:55:52.200

Reputation: 149 037

0

It's possible that NAT was disabled on the DIR-300. Is your internet service configured to provide you with more than one public IP address?

regan

Posted 2009-10-05T01:55:52.200

Reputation: 712

I didn't request more than one connection point at home, so whatever the reason I'm getting more than one IP is, it's not something I requested. – GetFree – 2009-10-05T06:27:21.790