Answer the question
In order to leave comments, you need to log in
How to find out your IP in the provider's internal network using ping in Linux?
The Windws ping utility has the -r switch, which allows you to find out your IP inside the provider's network (if you ping one of the resources on this network). For example, the command ping 172.xxx -r 1 -n 1 gives the usual information about the ping, plus below it is the line "Route: 172.given_to_you.provider.ip"
How to do the same with the linux version of ping? (Or maybe another utility).
Answer the question
In order to leave comments, you need to log in
ip -4 addr sh | awk '/inet / {print $2}' - addresses with mask
ip -4 addr sh | awk '/inet/{gsub("/*",""); print $2}' - no mask.
You can add the dev parameter to ip.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question