Pinging Error Message - ping: unknown host

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

# traceroute Name or service not known
Cannot handle "host" cmdline arg `' 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

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 via 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-
They will give
-Public IP Address and Gateway(eth0).
-Private IP Address and Gateway(eth1)
-DNS entry

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

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 via dev ens34
$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