Article 4Z71D How to get default gateway?

How to get default gateway?

by
ddenial
from LinuxQuestions.org on (#4Z71D)
Hello All,

Assuming all configuration files have been messed-up, but you know an IP address with the subnet mask, is there a way to figure out the default gateway for that IP?

For example, I want to find out the default gateway for 192.168.122.111/24. I know in my case its 192.168.122.1, but is there a command or any other way?

Thankslatest?d=yIl2AUoC8zA latest?i=VAIcTiNmqAU:nLdjMmSZeEY:F7zBnMy latest?i=VAIcTiNmqAU:nLdjMmSZeEY:V_sGLiP latest?d=qj6IDK7rITs latest?i=VAIcTiNmqAU:nLdjMmSZeEY:gIN9vFwVAIcTiNmqAU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments