the network setting are not corectly configured on SLES sp3

Hi ,

I have an issue with the connectivity of my local host to the server. I followed the steps in the administration guide to connect it the DNS server. When I ping to the IP address of this server, it is working. But when I try this command
ping linux-dnff
this is what I get
islem@linux-dnff:~> ping linux-dnff
ping: unknown host linux-dnff

when I try
host linux-dnff
I get
islem@linux-dnff:~> host linux-dnff
Host linux-dnff not found: 3(NXDOMAIN)

the name of the machine located in etc/hotname is
linux-dnff.suse

and the configurations of my DNS settings are

Please remove (at least) this line when you modify the file!

search jmu.ac.uk enr.jmu.ac.uk ac.uk uk
nameserver 127.0.0.1
nameserver 150.204.20.14

any help will be very mcuh appreciated.

Regards,
islem

Is this SLES 12 SP3, I presume, or might it still be SLES 11 SP3?

You mentioned “connectivity” issue, but this looks more like a name
resolution issue; you mentioning pinging by IP works.

I also presume that “/etc/hotname” is a typo meant to be “/etc/hostname”.

Have you configured the IP to be static or are you using DHCP?

What happens if you try ‘ping’ or ‘host’ with the full name?


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

Hi,

Thank you for your prompt reply,

Yes I this SLES 12 SP3 and I mean /etc/hostname.

I am trying to cinstall a software called Mpcci and after the install I am doing some test and this is the error I am getting

islem@linux-dnff:~> mpcci test

mpcci test:
Can’t resolve the name of the local host “linux-dnff”.
Please make sure the local host is well known within your network
and the name can be resolved by a DNS server or via the hosts file.

Compilation failed in require at /home/islem/MpCCI/4.5.1/perlmod/MpCCICmds/Test.pm line 23.
BEGIN failed–compilation aborted at /home/islem/MpCCI/4.5.1/perlmod/MpCCICmds/Test.pm line 23.
Compilation failed in require at /home/islem/MpCCI/4.5.1/perlmod/MpCCICmds/mpcci.pm line 397.
islem@linux-dnff:~>

I have been told that there is problen with DNS configuration

when I ping with the IP address of the server, I get this
islem@linux-dnff:~> ping 150.204.20.14
PING 150.204.20.14 (150.204.20.14) 56(84) bytes of data.
64 bytes from 150.204.20.14: icmp_seq=1 ttl=128 time=0.465 ms
64 bytes from 150.204.20.14: icmp_seq=2 ttl=128 time=0.555 ms
64 bytes from 150.204.20.14: icmp_seq=3 ttl=128 time=0.538 ms
64 bytes from 150.204.20.14: icmp_seq=4 ttl=128 time=0.770 ms
64 bytes from 150.204.20.14: icmp_seq=5 ttl=128 time=0.523 ms

when I ping with the ip address of the local host, I get this

islem@linux-dnff:~> ping 150.204.20.26
PING 150.204.20.26 (150.204.20.26) 56(84) bytes of data.
64 bytes from 150.204.20.26: icmp_seq=1 ttl=64 time=0.073 ms
64 bytes from 150.204.20.26: icmp_seq=2 ttl=64 time=0.050 ms
64 bytes from 150.204.20.26: icmp_seq=3 ttl=64 time=0.051 ms
64 bytes from 150.204.20.26: icmp_seq=4 ttl=64 time=0.050 ms

When I try this ping and host with linux-dnff
islem@linux-dnff:~> ping linux-dnff
ping: unknown host linux-dnff

and

islem@linux-dnff:~> host linux-dnff
Host linux-dnff not found: 3(NXDOMAIN)

and with the full name in /etc/host

islem@linux-dnff:~> ping linux-dnff.suse
ping: unknown host linux-dnff.suse

islem@linux-dnff:~> host linux-dnff.suse
Host linux-dnff.suse not found: 3(NXDOMAIN)

For the IP I think it is static, but I am not sure because haven’t done myself, but I am attaching here picture that might help to understand

Regards,
islem

Try going into Yast, to where you configure the NIC (third screenshot) and
choose ‘Edit’ to actually modify the network card settings. Within there,
in addition to the ‘Hostname/DNS’ tab you also showed, is a spot to set
the hostname. Try making sure the full name is present in there too in
the field near the top, I think on the right-hand side. Save/Finish and
test again.

Also, feel free to post some output from your /etc/hosts file:

grep -v -e '^#' /etc/hosts


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

Hi,

I went to the network setting, I removed suse from the domain name, and I checked the assign Hostname to loopback IP,
now the name of host in in etc/hostnames is changed to linux-dnff and when I test the software I don’t get any error.

when I try ping linux-dnff
islem@linux-dnff:~> ping linux-dnff
PING linux-dnff (127.0.0.2) 56(84) bytes of data.
64 bytes from linux-dnff (127.0.0.2): icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from linux-dnff (127.0.0.2): icmp_seq=2 ttl=64 time=0.049 ms
64 bytes from linux-dnff (127.0.0.2): icmp_seq=3 ttl=64 time=0.052 ms
64 bytes from linux-dnff (127.0.0.2): icmp_seq=4 ttl=64 time=0.056 ms

but when I try
islem@linux-dnff:~> host linux-dnff
Host linux-dnff not found: 3(NXDOMAIN)

I don’t know if this is a problem

islem@linux-dnff:~> grep -v -e ‘^#’ /etc/hosts

127.0.0.1 localhost

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
150.204.20.26 jm74690.jmu.ac.uk jm74690
127.0.0.2 linux-dnff linux-dnff

islem@linux-dnff:~>

Regards,
islem

Generally I would not recommend assigning the hostname to lcoalhost as
some applications do not handle that properly.

I would also make sure that you have something DNS-looking wherever you
specify the hostname as that sometimes helps applications that, again, do
not handle non-DNS cases (you are not using DNS).

It may also be worthwhile to setup a non-dynamically-generated-looking
hostname; linux-dnff was probably the default, auto-generated, hostname,
but that’s not exactly meaningful; that other “jm74690” bit looks better,
but is that the right name for the box or is that a second address? What
is that IP address for?

Finally, after making various changes, see if restarting nscd helps:

systemctl restart nscd


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

Hi,

Well I tried to uncheck assigning the hostname to localhost, but I got ping linux-dnff to fail. So, I checked it again.

My local host is conncted to the server, using DNS.

How do I setup a non-dynamically-generated-looking hostname ? jm74690 is the name of computer and 150.204.20.26 is the public ip address of the computer. What is the problem of having linux-dnff as the host name. It is not causing any problem so far.

Regards,
islem

Hi
Should really look at using your DNS server, but would need to use a
FQDN rather than host name.

So for your 127.0.0.2 add a period (a dot) after the first local
hostname;

127.0.0.2 linux-dnff. linux-dnff

Look at your /etc/nsswitch.conf file as well maybe your wanting to look
for the netbios wins etc name? By default the localhost will look
at /etc/hosts first then your DNS (you should not need 127.0.0.1 in DNS
either /etc/resolv.conf).


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.87-18.29-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hi islem,

[QUOTE=islem;39890]Hi,

Well I tried to uncheck assigning the hostname to localhost, but I got ping linux-dnff to fail. So, I checked it again.

My local host is conncted to the server, using DNS[/QUOTE].
unless you haven’t changed your configuration, I wouldn’t fully agree:

[QUOTE=islem;39876]
and the configurations of my DNS settings are

Please remove (at least) this line when you modify the file!

search jmu.ac.uk enr.jmu.ac.uk ac.uk uk
nameserver 127.0.0.1
nameserver 150.204.20.14[/QUOTE]

You’ve especially set up your system to look for a DNS SERVER on your local machine first. And if that one’s not running, your host will contact 150.204.20.14 - is there a DNS service running on that remote machine? Have you or has anybody else entered the required data (forward and reverse resolution) into that DNS entity?

You’ll probably have to take a closer look, you seem to be mixing things:

  • you can configure any host name you like, on the machine

  • name resolution (getting a machine’s IP by specifying a name, or getting a machine’s name when you only have its IP) is an independent issue. For purely local lookups, you can edit /etc/hosts to include the according information (IP and one or more names), but when using this on more machines, you’d typically enter that data into the DNS. Which is done by the administrator running the DNS service, not by you on your local machine.

Earlier on you noticed that despite your entries in /etc/hosts, the “host” command would not allow you to resolve your system name to an IP address - this is because “host” is a DNS client (see “man host”).

Regards,
J