Slackware This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-20-2013, 08:46 PM
|
#1
|
|
Member
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 413
Rep:
|
Command to know dns ?
With what command says dns I am using in slackware?
thanks
|
|
|
|
02-20-2013, 09:11 PM
|
#2
|
|
Member
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 667
Rep:
|
Quote:
Originally Posted by afreitascs
With what command says dns I am using in slackware?
thanks
|
cat /etc/resolv.conf maybe? If I understood your question correctly.
|
|
|
|
02-20-2013, 09:22 PM
|
#3
|
|
Member
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 413
Original Poster
Rep:
|
Quote:
Originally Posted by stormtracknole
cat /etc/resolv.conf maybe? If I understood your question correctly.
|
thanks for the replies
Quote:
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
|
I was wondering, with which command shows me the dns server I use to surf the internet
very thanks
|
|
|
|
02-20-2013, 09:25 PM
|
#4
|
|
Member
Registered: Aug 2005
Location: The Big Easy
Distribution: Slackware, RHEL
Posts: 667
Rep:
|
Your dns in this case would be: 192.168.1.1
|
|
|
|
02-20-2013, 09:35 PM
|
#5
|
|
Member
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 413
Original Poster
Rep:
|
Quote:
Originally Posted by stormtracknole
Your dns in this case would be: 192.168.1.1
|
thanks for the replies and patience
my dns is configured to use Google Public DNS!
I want to know what command tells me this?
thanks
|
|
|
|
02-20-2013, 09:42 PM
|
#6
|
|
LQ Newbie
Registered: Apr 2012
Location: indonesia
Distribution: on the way to slackware
Posts: 8
Rep: 
|
hi, i use dig or nslookup command
|
|
|
|
02-20-2013, 09:53 PM
|
#7
|
|
Member
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 413
Original Poster
Rep:
|
Quote:
Originally Posted by shrourdian
hi, i use dig or nslookup command
|
thanks for the replies
please you care to explicitly better your answer?
thanks
|
|
|
|
02-20-2013, 10:29 PM
|
#8
|
|
Member
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 772
|
Quote:
Originally Posted by afreitascs
thanks for the replies
please you care to explicitly better your answer?
thanks
|
Right here goes.
1) If you're using DHCP, the DHCP server will write the DNS server(s) in your /etc/resolv.conf. On a desktop client in my office, here's how that looks:
Code:
[kikinovak@alphamule:~] $ cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain microlinux.montpezat
search microlinux.montpezat
nameserver 192.168.2.1
# /etc/resolv.conf.tail can replace this line
If you wonder where the magic comes from, it's from the DHCP server which is configured like this:
Code:
# /etc/dhcpd.conf
authoritative;
default-lease-time 86400;
max-lease-time 86400;
option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;
option routers 192.168.2.254;
option domain-name-servers 192.168.2.1;
option domain-name "microlinux.montpezat";
option domain-search "microlinux.montpezat";
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.100 192.168.2.200;
}
host alphamule {
hardware ethernet 00:21:97:4C:37:27;
fixed-address 192.168.2.2;
option host-name "alphamule";
}
...
2) If your setup is static (like on a server, for example), you can edit /etc/resolv.conf manually and put your nameserver(s) in it. The minimal syntax looks like this:
Or:
Code:
nameserver 8.8.8.8
nameserver 4.4.4.4
On my office server (running it's own DNS server), here's how things are configured:
Code:
[root@nestor:~] # cat /etc/resolv.conf
# /etc/resolv.conf
domain microlinux.montpezat
search microlinux.montpezat
nameserver 127.0.0.1
Hope that helps,
Niki
|
|
|
|
02-20-2013, 10:32 PM
|
#9
|
|
Member
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 413
Original Poster
Rep:
|
Quote:
Originally Posted by stormtracknole
Your dns in this case would be: 192.168.1.1
|
you made me discover my mistake!
I did
configured to use Google Public DNS
now
Quote:
base1@base1:~$ cat /etc/resolv.conf
# MADE-BY-RP-PPPOE
nameserver 8.8.8.8
nameserver 8.8.4.4
|
thank you very much
|
|
|
|
02-20-2013, 10:33 PM
|
#10
|
|
Member
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 413
Original Poster
Rep:
|
Quote:
Originally Posted by kikinovak
Right here goes.
1) If you're using DHCP, the DHCP server will write the DNS server(s) in your /etc/resolv.conf. On a desktop client in my office, here's how that looks:
Code:
[kikinovak@alphamule:~] $ cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain microlinux.montpezat
search microlinux.montpezat
nameserver 192.168.2.1
# /etc/resolv.conf.tail can replace this line
If you wonder where the magic comes from, it's from the DHCP server which is configured like this:
Code:
# /etc/dhcpd.conf
authoritative;
default-lease-time 86400;
max-lease-time 86400;
option broadcast-address 192.168.2.255;
option subnet-mask 255.255.255.0;
option routers 192.168.2.254;
option domain-name-servers 192.168.2.1;
option domain-name "microlinux.montpezat";
option domain-search "microlinux.montpezat";
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.100 192.168.2.200;
}
host alphamule {
hardware ethernet 00:21:97:4C:37:27;
fixed-address 192.168.2.2;
option host-name "alphamule";
}
...
2) If your setup is static (like on a server, for example), you can edit /etc/resolv.conf manually and put your nameserver(s) in it. The minimal syntax looks like this:
Or:
Code:
nameserver 8.8.8.8
nameserver 4.4.4.4
On my office server (running it's own DNS server), here's how things are configured:
Code:
[root@nestor:~] # cat /etc/resolv.conf
# /etc/resolv.conf
domain microlinux.montpezat
search microlinux.montpezat
nameserver 127.0.0.1
Hope that helps,
Niki
|
thank you for explanation
|
|
|
|
02-20-2013, 10:35 PM
|
#11
|
|
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 2,749
|
Quote:
$ cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 192.168.1.1
|
NetworkManager has set the DNS name server to point to 192.168.1.1. This is probably a modem/router. When your modem/router connects to the internet, it will be supplied DNS name server IPs. You will need to query your modem/router settings (probably via a web interface; in a browser try going to URL http://192.168.1.1) to find these addresses.
What happens is that when an address cannot be resolved locally (e.g. by an entry in /etc/hosts) then the DNS request is sent to the name server in /etc/resolv.conf. This request is then passed to the DNS name servers in your modem/router.
/edit Too slow!
Last edited by allend; 02-20-2013 at 10:36 PM.
|
|
|
|
02-20-2013, 10:37 PM
|
#12
|
|
Member
Registered: Aug 2004
Location: Brasil
Distribution: Slackware_Cur-64_mult
Posts: 413
Original Poster
Rep:
|
Quote:
Originally Posted by allend
NetworkManager has set the DNS name server to point to 192.168.1.1. This is probably a modem/router. When your modem/router connects to the internet, it will be supplied DNS name server IPs. You will need to query your modem/router settings (probably via a web interface; in a browser try going to URL http://192.168.1.1) to find these addresses.
What happens is that when an address cannot be resolved locally (e.g. by an entry in /etc/hosts) then the DNS request is sent to the name server in /etc/resolv.conf. This request is then passed to the DNS name servers in your modem/router.
/edit Too slow!
|
is ... I understand
thanks
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:11 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|