Search My Techie Guy

Wednesday, February 10, 2016

Adding Static DNS - LINUX OpenSUSE 13.2 error "ping:unknown host yahoo.com"


Problem:

Ping a domain name for example yahoo.com from the CLI and it returns the message below:

Server1:~ # ping yahoo.com
ping: unknown host yahoo.com


Server1:~ # cat /etc/*release
openSUSE 13.2 (x86_64)
VERSION = 13.2
CODENAME = Harlequin
# /etc/SuSE-release is deprecated and will be removed in the future, use /etc/os-release instead
NAME=openSUSE
VERSION="13.2 (Harlequin)"
VERSION_ID="13.2"
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"

ID_LIKE="suse"

Solution:

This means that my server has no DNS set to resolve host names!

1. open YAST

Server1:~ # yast



2. Use up/down arrow keys to select "Network Devices"
3. Use right arrow key to select "Network Settings" and press Enter Key
4. Hit the "Tab" key once to highlight "Overview" on the top menu

5. Now use the right arrow key on your keyboard to select "Hostname/DNS"
6. Use the TAB key to navigate through and modify the DNS config according to your DNS servers for your network.

7. Use TAB to navigate to "OK" and hit Enter
8. Quit
9. Now test again:

Server1:~ # ping yahoo.com
PING yahoo.com (206.190.36.45) 56(84) bytes of data.
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=1 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=2 ttl=45 time=345 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=3 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=4 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=5 ttl=45 time=344 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=6 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=7 ttl=45 time=343 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=8 ttl=45 time=345 ms
64 bytes from ir1.fp.vip.gq1.yahoo.com (206.190.36.45): icmp_seq=9 ttl=45 time=343 ms

Cheers :-)
Post a Comment