SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a typical workgroup with a windows box and a Slackware box. But the Slackware box can't resolve any local names. I can ping windows and Slackware from windows, but I can't ping either Slackware or windows from Slackware.
My router seems to resolve the names fine, as they are both listed in the 192.168.0.100 webapp client list.
I try to add 192.168.0.100 to resolv.conf, but that obviously does not work.
I edited /etc/nsswitch.conf and changed hosts: files dns to hosts: files wins dns, but that didn't work either. I don't think winbind is even running. Should I go through the trouble?
I can ping any website on the internet from Slackware and Windows.
Also, another weird thing, my internet "card" is labelled eth126, instead of the normal eth0.
/etc/rc.d/rc.inet1 restart produces no output and there is nothing to indicate in the start up routine that rc.inet1 executed at all.
I have to run dhcpcd eth126 to get internet working.
Ok, I'm going to sleep now. Thanks for reading. Hopefully, an answer will be provided in the morning.
It appears that you have a router at 192.168.0.100 that is configured to be the DNS server for your LAN.
If 'dhcpcd eth126' is working, then you will likely see your router's IP address in /etc/resolv.conf as the nameserver.
You could also test with 'host <Windows localname> 192.168.0.100' or 'dig @192.168.0.100 <Windows localname>
Quote:
Also, another weird thing, my internet "card" is labelled eth126, instead of the normal eth0.
I suggest checking the contents of /etc/udev/rules.d/70-persistent-net.rules.
You can simply delete that file and reboot, so that it will be automatically regenerated.
If the weird naming is fixed, then an entry to use DHCP for eth0 in /etc/rc.d/rc.inet1.conf should be all that is required.
Code:
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""
Well, eth126 is now eth0, but still no name resolution. I could just put it in hosts, but then that would defeat the purpose of DHCP and I have other devices that connect to other networks that need to access the file share.
The Windows hosts file is empty.
I can SSH into Slackware from Windows with no issue.
If I do winbindd -D then I can resolve Slacware's name, but not Windows' name.
For the Linux and windows system you can use '/etc/hosts' file;
Quote:
From 'man hosts';
hosts - static table lookup for hostnames
SYNOPSIS
/etc/hosts
DESCRIPTION
This manual page describes the format of the /etc/hosts file. This file is a simple text file that associates IP addresses with hostnames, one line
per IP address. For each host a single line should be present with the following information:
IP_address canonical_hostname [aliases...]
Fields of the entry are separated by any number of blanks and/or tab characters. Text from a "#" character until the end of the line is a comment,
and is ignored. Host names may contain only alphanumeric characters, minus signs ("-"), and periods ("."). They must begin with an alphabetic
character and end with an alphanumeric character. Optional aliases provide for name changes, alternate spellings, shorter hostnames, or generic
hostnames (for example, localhost).
The Berkeley Internet Name Domain (BIND) Server implements the Internet name server for UNIX systems. It augments or replaces the /etc/hosts file
or hostname lookup, and frees a host from relying on /etc/hosts being up to date and complete.
In modern systems, even though the host table has been superseded by DNS, it is still widely used for:
bootstrapping
Most systems have a small host table containing the name and address information for important hosts on the local network. This is useful
when DNS is not running, for example during system bootup.
NIS Sites that use NIS use the host table as input to the NIS host database. Even though NIS can be used with DNS, most NIS sites still use the
host table with an entry for all local hosts as a backup.
isolated nodes
Very small sites that are isolated from the network use the host table instead of DNS. If the local information rarely changes, and the net‐
work is not connected to the Internet, DNS offers little advantage.
I have 3 computers on my local network. A Windows 10 laptop (therapist), a Slackware 14.1 desktop/server (craven-moorhead), and a Slackware 14.2 htpc (febtober).
From my laptop, I am able to ping both my htpc and my desktop... but only if samba is running. I didn't have samba running on my htpc initially, and the pings failed. Once I started it, the pings went through.
Code:
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Users\Jeremy Brent Hansen>ping craven-moorhead
Pinging craven-moorhead [10.0.0.152] with 32 bytes of data:
Reply from 10.0.0.152: bytes=32 time=1ms TTL=64
Reply from 10.0.0.152: bytes=32 time=1ms TTL=64
Ping statistics for 10.0.0.152:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Control-C
^C
C:\Users\Jeremy Brent Hansen>ping febtober
Ping request could not find host febtober. Please check the name and try again.
C:\Users\Jeremy Brent Hansen>ping febtober
Pinging febtober [10.0.0.125] with 32 bytes of data:
Reply from 10.0.0.125: bytes=32 time=1ms TTL=64
Reply from 10.0.0.125: bytes=32 time=1ms TTL=64
Reply from 10.0.0.125: bytes=32 time=1ms TTL=64
Ping statistics for 10.0.0.125:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms
Control-C
^C
From either Slackware computer, I could ping the other without samba running, however, none can ping the Windows laptop, although, the correct IP address does get resolved.
Code:
jbhansen@febtober:~$ ping therapist
PING therapist (10.0.0.128) 56(84) bytes of data.
^C
--- therapist ping statistics ---
6 packets transmitted, 0 received, 100% packet loss, time 4999ms
jbhansen@febtober:~$ ping craven-moorhead
PING craven-moorhead (10.0.0.152) 56(84) bytes of data.
64 bytes from craven-moorhead (10.0.0.152): icmp_seq=1 ttl=64 time=0.204 ms
64 bytes from craven-moorhead (10.0.0.152): icmp_seq=2 ttl=64 time=0.225 ms
64 bytes from craven-moorhead (10.0.0.152): icmp_seq=3 ttl=64 time=0.231 ms
64 bytes from craven-moorhead (10.0.0.152): icmp_seq=4 ttl=64 time=0.230 ms
^C
--- craven-moorhead ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.204/0.222/0.231/0.018 ms
I assume the Windows firewall prevents a response to the ping, but I'm too lazy to check since no machines need to contact the laptop. (I have no shares set up on the laptop.)
My hosts file is unused on all machines. My only DNS/nameserver on the network is my router (running DD-WRT).
Code:
jbhansen@febtober:~$ cat /etc/resolv.conf
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
nameserver 10.0.0.1
# /etc/resolv.conf.tail can replace this line
Here is a list of all active services on my htpc (which has many less than my desktop). Most are just the default services that are pre-selected with the installer.
It appears that the OP is still failing to get an address by DHCP. I would suggest stopping any running dhcp processes. then running 'dhcpcd -d eth0' to look for any issues. It is possible that the timeout for dhcpcd in /etc/rc.d/rc.inet1 may need to be increased so that the DHCP negotiation can complete successfully.
Now I see the problem. Windows' ping doesn't differentiate FQDN's from local workgroup names, but linux does. So, I guess everything is in order. nmblookup finds both machines fine.
This problem has come to a head, because I need cups but the only way to get access to my printer on my windows machine is by putting the hostname in cups.conf. But since I cannot resolve local names, I can't access my printer.
Nevermind, I just added allow from 192.168.* in cupsd.conf. I'd prefer names, but w/e.
While Windows can automatically resolve IP addresses via netbios broadcast messaging linux cannot. There are several ways i.e running a local DNS, using winbind/nssswitch.conf, Avahi/mDNS or the hosts file.
cups can use Avahi browsing to find printers if installed and compiled with libdns. I configure my printers to use a static IP address and so it is also defined the same in cups.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.