Home network is usually flat with only 1 router.
But companies can have multiple layer of routers. It might not be 1st in the traceroute result.
One needs to determine where is the network border; which IP is internal-facing interface IP of the edge-most router.
The required "skill" is in interpreting what comes right after your edge-most router.
Because in IP network, adjacent gateways facing each other need to be in same subnet in order to be able to talk to each other.
If the 1st gateway outside of your network is public IP, then your edge-most external-facing WAN interface have public IP.
If the 1st gateway outside of your network is private IP, then your edge-most external-facing WAN interface have private IP.
And it is almost certain that ISPs will not block/prohibit ICMP Type 11 ("time exceeded") response coming from the gateway that is assigned as your router's gateway.
It will be crazy if their own technician cannot perform troubleshooting with a key tool.
Also note; 10.0.0.0/8 was previously used for internal routing of those internet providers. As seen in the Unifi example, some of those network interconnections are still using it in their internal networks.
So if you see a pattern like public-private-private-private-public IP sequences, ignore them.
Since the intent is to determine whether your WAN interface is on public IP or private IP, interpreting what's next to your network border is sufficient for the scope.
QUOTE(soonwai @ Jun 30 2022, 04:47 AM)
Oltromen Ripot has posted twice already with very good explanations. Perhaps examples will help
westlife. Do a traceroute and see which of the below is closest to yours.
This is private IP. (Digi mobile data) whatismyip: 115.164.213.14
CODE
% traceroute 8.8.8.8 | column -t
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
1 172.20.10.1 (internal interface of my edge-most router)
2 10.138.138.118 (private IP outside my network)
3 * (ICMP blocked/prohibited)
4 10.132.47.46 (private IP outside my network)
5 172.21.20.207 (private IP outside my network)
6 * (ICMP blocked/prohibited)
7 172.21.2.250 (private IP outside my network)
8 72.14.221.20 (public IP outside my network)
9 108.170.250.1 (irrelevant for purpose)
108.170.249.225 (irrelevant for purpose)
108.170.250.1 (irrelevant for purpose)
10 72.14.234.85 (irrelevant for purpose)
142.250.62.57 (irrelevant for purpose)
72.14.234.85 (irrelevant for purpose)
11 dns.google (8.8.8.8)
This is public IP. (Unifi 800) whatismyip: 175.142.125.212 (see how this IP corresponds to #2 below)
CODE
% traceroute 8.8.8.8 | column -t
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
1 router.local (internal interface of my edge-most router)
2 175.142.125.254 (public IP outside my network)
3 10.55.49.3 (irrelevant for purpose)
10.55.49.1 (irrelevant for purpose)
4 10.55.48.14 (irrelevant for purpose)
10.55.48.200 (irrelevant for purpose)
10.55.48.18 (irrelevant for purpose)
5 72.14.214.196 (irrelevant for purpose)
72.14.214.220 (irrelevant for purpose)
72.14.204.208 (irrelevant for purpose)
6 * (ICMP blocked/prohibited)
7 dns.google (8.8.8.8)
* anything beginning with a 10 and 172.16 to 172.31 are private IPs.