Pinging Error Message - ping: unknown host

Problem Definition:
# ping google.com
ping: unknown host google.com
(if the ping answer is unknown host mean dns is not able to transulate ip)


# traceroute google.com
google.com: Name or service not known
Cannot handle "host" cmdline arg `google.com' on position 1 (argc 1)


PROBLEM: Host contains public ip address from outside network we are able to connect(or)ping it.But from inside we are not able to ping it outside(try ping google.com)

Image 1) showing eth1 interface with default gateway
Image 2) Adding gateway to private ip address
Image 3) See the result how is it respond to the route command

About the eth1 interface Details.

Troubleshooting Method
1)check both interface eth0,eth1 is configured with proper gateway and netmask,
2)confirm /etc/resolve.conf file has the proper nameserver ip address.
nameserver ip is pingable from the local network. if it is not while adding to the route we will get the below error message.
# ip route add 10.0.0.0/8 via 10.64.155.193 dev eth1
RTNETLINK answers: Network is unreachable
Reason is /etc/resolve.conf file nameserver IP is unable to ping it.

How To configure Public IP address on Softlayer Account-
----------------------------------------------------------------------------------------------
Given
They will give
-Public IP Address and Gateway(eth0).
-Private IP Address and Gateway(eth1)
-DNS entry
10.0.80.11
10.0.80.12


NOTE: By default softlayer dns entry will be 10.0.80.11 and 12.

Procedure
-----------------
1)First thing is we need to configure Public/Private IP address.
Verification : Gateway ip address should be pin gable both private-public
2)we needs to configure route.
$ip route add 10.0.0.0/8 via 10.112.223.65 dev ens34
syntax
$ip route add private-ip-network via private-ip-gateway dev Private-IP-device-name
Note:if it is virtual machine check device name(eth0(public) eth1(private)) whether is it connected properly.first one should be public,second one is private.

Related post