Scenario: I have a Centos 6.x VM which gets an IP address via DHCP. I could not get any external access so I wanted to start troubleshooting. The first step was making sure I had the correct gateway and could ping it.
route -n
This should display
The IP address highlighted in red is the gateway. The green U flag indicates its UP and G indicates it is the gateway.
Note: from the man page the (route) -n flag means:
“show numerical addresses instead of trying to determine symbolic host names. This is useful if you are trying to determine why the
route to your nameserver has vanished”
You must be logged in to post a comment.