How would I test to see if I'm behind carrier grade or regular NAT?

Inspired by the comments to this answer and its question. Some of my local ISPs are using carrier grade nat, and as someone who occasionally runs his own servers, remote support, it would be highly useful to be able to work out if I, or someone I am trying to help is behind one of these.

How would I detect if I'm behind a nat? What would be some of the techniques that would be useful in determining this? How can I work out whether anomalies in my 'detected' IP address is due to NATting or other processes?


Solution 1:

RFC 6598 states that 100.64.0.0/10 should be assigned to your CPE if you are behind carrier-grade NAT. However I know of at least one CGN that uses 10.100 as their CGN IP range.

If you have access to the CPE, then you should be able to determine CGN by the IP address on the WAN interface. It will either be an RFC1918 or an RFC6598 address.

If you want to determine CGN and you don't have access to the CPE, then your best bet would be to do a tracert and once you leave your local network (which should be just one hop for the vast, vast majority of networks that would be behind CGN). If you see RFC1918 or RFC6598 addresses after leaving your CPE, or your traceroute cannot lookup the 2nd hop, then chances are you're on CGN.