P
P
podust2015-04-10 11:23:37
linux
podust, 2015-04-10 11:23:37

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

5 answer(s)
V
Vladimir Martyanov, 2015-04-10
@vilgeforce

https://ru.wikipedia.org/wiki/Ifconfig

L
ldv, 2015-04-10
@ldvldv

ping -R

V
Vlad Zhivotnev, 2015-04-10
@inkvizitor68sl

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.

M
mikes, 2015-04-10
@mikes

curl ifconfig.me
:)

S
Sharov Dmitry, 2015-04-10
@vlom88

try wget -O - -q icanhazip.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question