Sponsored Content
Full Discussion: DNS Question
Top Forums UNIX for Dummies Questions & Answers DNS Question Post 302605409 by German Shepherd on Wednesday 7th of March 2012 11:01:42 AM
Old 03-07-2012
DNS Question

I am trying to make a website work without having to type www. If I type www with the sitename it works. But if I type just the site name without the www, it does not work. How do I fix this? Thank you for your help
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Secondary DNS question

I have the primary set up, but cannot get the secondary box to answer a query. Here is the message I get: > nslookup dfwnet1 10.26.38.41 *** Can't find server name for address 10.26.38.41: Non-existent host/domain *** Default servers are not available 10.26.38.41 is the IP of the secondary... (3 Replies)
Discussion started by: 98_1LE
3 Replies

2. UNIX for Dummies Questions & Answers

DNS/BIND question, is it ze germans?

First some back ground info: I am working on a computer running SuSE 7.3 I am still trying to set up a DNS I downloaded BIND 9.2.1 and was following a tutorial about BIND. It said at virtually the start of the tutorial that I should find a file called named.conf in my /etc directory. Yes, I... (1 Reply)
Discussion started by: ignus7
1 Replies

3. IP Networking

DNS question

I manage the mail server (mail.ourcompany.com) at my company. We provide mail services to a number of clients. Today CompanyA calls in and reports that CompanyB tried to send them an email, but they never recieved it. According to CompanyB, the mail left there outbox. The two addresses... (1 Reply)
Discussion started by: phaze1
1 Replies

4. IP Networking

DNS question

The company I work for has me setting up a bind server, this part I am having no issues with my question is we host 2 web-sites on one box using virtual domains in apache. The CEO of the company want it so that he can type this in http://*****.com http://*****.net Instead of ... (7 Replies)
Discussion started by: Acleoma
7 Replies

5. IP Networking

Question on DNS/BIND

I have set up a BIND server running on Redhat AS 3.0 and the question I have is that I can point my laptop to that server and resolve all the hosts I have put in my .zone file but for the life of me I can resolve any outside information. I have verified the server can talk to the world. Any hints... (2 Replies)
Discussion started by: Acleoma
2 Replies

6. UNIX for Advanced & Expert Users

DNS Question

I am new to bind, but I have it installed and working, well I think. I am not getting any errors, but my question is. Lets say I have movie.com, and mov.com, with the same in-addr-arpa zone(10.10.0.0) Is this a problem? movie.com is our main zone and we are trying to get rid of clients that are... (7 Replies)
Discussion started by: rickyt00
7 Replies

7. UNIX for Dummies Questions & Answers

Named (DNS Name Server) question

As suggested by the forum I'm posting in, I'm very new at this, so bear with me please. I'm using a Virtual Dedicated server (Linux) from GoDaddy and using Simple Control Panel. A few days ago, the sites running off of it stopped working, and I did manage to troubleshoot it to some extent where... (1 Reply)
Discussion started by: KevenM
1 Replies

8. IP Networking

DNS SOA Question in regards to @

Okay, I have a question guys... I was given a task to set up a DNS slave server, in addition to our already set up BIND DNS master server. I looked over the one of the zone files, and found something curious. The starting SOA line, reads as: @ IN SOA @ root ( ...etc...etc..) I'm... (1 Reply)
Discussion started by: Lost in Cyberia
1 Replies

9. IP Networking

DNS dummy question

Hello everyone, I have a some doubt about DNS. We have connected to 2 ISPs /ISP#1 and ISP#2/. Our web site's dns zone is located on ISP#1. If connection to ISP#1 is down clients won't find our website. ISP#1 connection went down few times this month. So we are going to create our website's... (0 Replies)
Discussion started by: sembii
0 Replies

10. AIX

Multiple DNS forwarders and syntax question.

Hey Guy's, Is there a limit on the number of forwards that can be used or the syntax and spaces? I noticed I have to put spaces between ; and the IP for at least the first one, then space at the end to work and the rest don't work at all no matter what I try. forward first; ... (1 Reply)
Discussion started by: Devyn
1 Replies
Net::DNS(3pm)						User Contributed Perl Documentation					     Net::DNS(3pm)

NAME
Net::DNS - Perl interface to the DNS resolver SYNOPSIS
"use Net::DNS;" DESCRIPTION
Net::DNS is a collection of Perl modules that act as a Domain Name System (DNS) resolver. It allows the programmer to perform DNS queries that are beyond the capabilities of "gethostbyname" and "gethostbyaddr". The programmer should be somewhat familiar with the format of a DNS packet and its various sections. See RFC 1035 or DNS and BIND (Albitz & Liu) for details. Resolver Objects A resolver object is an instance of the Net::DNS::Resolver class. A program can have multiple resolver objects, each maintaining its own state information such as the nameservers to be queried, whether recursion is desired, etc. Packet Objects Net::DNS::Resolver queries return Net::DNS::Packet objects. Packet objects have five sections: o The header section, a Net::DNS::Header object. o The question section, a list of Net::DNS::Question objects. o The answer section, a list of Net::DNS::RR objects. o The authority section, a list of Net::DNS::RR objects. o The additional section, a list of Net::DNS::RR objects. Update Objects The Net::DNS::Update package is a subclass of Net::DNS::Packet for creating packet objects to be used in dynamic updates. Header Objects Net::DNS::Header objects represent the header section of a DNS packet. Question Objects Net::DNS::Question objects represent the question section of a DNS packet. RR Objects Net::DNS::RR is the base class for DNS resource record (RR) objects in the answer, authority, and additional sections of a DNS packet. Don't assume that RR objects will be of the type you requested -- always check an RR object's type before calling any of its methods. METHODS
See the manual pages listed above for other class-specific methods. version print Net::DNS->version, " "; Returns the version of Net::DNS. mx # Use a default resolver -- can't get an error string this way. use Net::DNS; my @mx = mx("example.com"); # Use your own resolver object. use Net::DNS; my $res = Net::DNS::Resolver->new; my @mx = mx($res, "example.com"); Returns a list of Net::DNS::RR::MX objects representing the MX records for the specified name; the list will be sorted by preference. Returns an empty list if the query failed or no MX records were found. This method does not look up A records -- it only performs MX queries. See "EXAMPLES" for a more complete example. yxrrset Use this method to add an "RRset exists" prerequisite to a dynamic update packet. There are two forms, value-independent and value- dependent: # RRset exists (value-independent) $update->push(pre => yxrrset("host.example.com A")); Meaning: At least one RR with the specified name and type must exist. # RRset exists (value-dependent) $packet->push(pre => yxrrset("host.example.com A 10.1.2.3")); Meaning: At least one RR with the specified name and type must exist and must have matching data. Returns a "Net::DNS::RR" object or "undef" if the object couldn't be created. nxrrset Use this method to add an "RRset does not exist" prerequisite to a dynamic update packet. $packet->push(pre => nxrrset("host.example.com A")); Meaning: No RRs with the specified name and type can exist. Returns a "Net::DNS::RR" object or "undef" if the object couldn't be created. yxdomain Use this method to add a "name is in use" prerequisite to a dynamic update packet. $packet->push(pre => yxdomain("host.example.com")); Meaning: At least one RR with the specified name must exist. Returns a "Net::DNS::RR" object or "undef" if the object couldn't be created. nxdomain Use this method to add a "name is not in use" prerequisite to a dynamic update packet. $packet->push(pre => nxdomain("host.example.com")); Meaning: No RR with the specified name can exist. Returns a "Net::DNS::RR" object or "undef" if the object couldn't be created. rr_add Use this method to add RRs to a zone. $packet->push(update => rr_add("host.example.com A 10.1.2.3")); Meaning: Add this RR to the zone. RR objects created by this method should be added to the "update" section of a dynamic update packet. The TTL defaults to 86400 seconds (24 hours) if not specified. Returns a "Net::DNS::RR" object or "undef" if the object couldn't be created. rr_del Use this method to delete RRs from a zone. There are three forms: delete an RRset, delete all RRsets, and delete an RR. # Delete an RRset. $packet->push(update => rr_del("host.example.com A")); Meaning: Delete all RRs having the specified name and type. # Delete all RRsets. $packet->push(update => rr_del("host.example.com")); Meaning: Delete all RRs having the specified name. # Delete an RR. $packet->push(update => rr_del("host.example.com A 10.1.2.3")); Meaning: Delete all RRs having the specified name, type, and data. RR objects created by this method should be added to the "update" section of a dynamic update packet. Returns a "Net::DNS::RR" object or "undef" if the object couldn't be created. Sorting of RR arrays As of version 0.55 there is functionality to help you sort RR arrays. 'rrsort()' is the function that is available to do the sorting. In most cases rrsort will give you the answer that you want but you can specify your own sorting method by using the Net::DNS::RR::FOO->set_rrsort_func() class method. See Net::DNS::RR for details. rrsort() use Net::DNS qw(rrsort); my @prioritysorted=rrsort("SRV","priority",@rr_array); rrsort() selects all RRs from the input array that are of the type that are defined in the first argument. Those RRs are sorted based on the attribute that is specified as second argument. There are a number of RRs for which the sorting function is specifically defined for certain attributes. If such sorting function is defined in the code (it can be set or overwritten using the set_rrsort_func() class method) that function is used. For instance: my @prioritysorted=rrsort("SRV","priority",@rr_array); returns the SRV records sorted from lowest to heighest priority and for equal priorities from heighes to lowes weight. If the function does not exist then a numerical sort on the attribute value is performed. my @portsorted=rrsort("SRV","port",@rr_array); If the attribute does not exist for a certain RR than the RRs are sorted on string comparrisson of the rdata. If the attribute is not defined than either the default_sort function will be defined or "Canonical sorting" (as defined by DNSSEC) will be used. rrsort() returns a sorted array with only elements of the specified RR type or undef. rrsort() returns undef when arguments are incorrect. EXAMPLES
The following examples show how to use the "Net::DNS" modules. See the other manual pages and the demo scripts included with the source code for additional examples. See the "Net::DNS::Update" manual page for an example of performing dynamic updates. Look up a host's addresses. use Net::DNS; my $res = Net::DNS::Resolver->new; my $query = $res->search("host.example.com"); if ($query) { foreach my $rr ($query->answer) { next unless $rr->type eq "A"; print $rr->address, " "; } } else { warn "query failed: ", $res->errorstring, " "; } Find the nameservers for a domain. use Net::DNS; my $res = Net::DNS::Resolver->new; my $query = $res->query("example.com", "NS"); if ($query) { foreach $rr (grep { $_->type eq 'NS' } $query->answer) { print $rr->nsdname, " "; } } else { warn "query failed: ", $res->errorstring, " "; } Find the MX records for a domain. use Net::DNS; my $name = "example.com"; my $res = Net::DNS::Resolver->new; my @mx = mx($res, $name); if (@mx) { foreach $rr (@mx) { print $rr->preference, " ", $rr->exchange, " "; } } else { warn "Can't find MX records for $name: ", $res->errorstring, " "; } Print a domain's SOA record in zone file format. use Net::DNS; my $res = Net::DNS::Resolver->new; my $query = $res->query("example.com", "SOA"); if ($query) { ($query->answer)[0]->print; } else { print "query failed: ", $res->errorstring, " "; } Perform a zone transfer and print all the records. use Net::DNS; my $res = Net::DNS::Resolver->new; $res->nameservers("ns.example.com"); my @zone = $res->axfr("example.com"); foreach $rr (@zone) { $rr->print; } Perform a background query and do some other work while waiting for the answer. use Net::DNS; my $res = Net::DNS::Resolver->new; my $socket = $res->bgsend("host.example.com"); until ($res->bgisready($socket)) { # do some work here while waiting for the answer # ...and some more here } my $packet = $res->bgread($socket); $packet->print; Send a background query and use select to determine when the answer has arrived. use Net::DNS; use IO::Select; my $timeout = 5; my $res = Net::DNS::Resolver->new; my $bgsock = $res->bgsend("host.example.com"); my $sel = IO::Select->new($bgsock); # Add more sockets to $sel if desired. my @ready = $sel->can_read($timeout); if (@ready) { foreach my $sock (@ready) { if ($sock == $bgsock) { my $packet = $res->bgread($bgsock); $packet->print; $bgsock = undef; } # Check for the other sockets. $sel->remove($sock); $sock = undef; } } else { warn "timed out after $timeout seconds "; } BUGS
"Net::DNS" is slow. For other items to be fixed, please see the TODO file included with the source distribution. COPYRIGHT
Copyright (c) 1997-2002 Michael Fuhr. Portions Copyright (c) 2002-2004 Chris Reinhardt. Portions Copyright (c) 2005 Olaf Kolkman (RIPE NCC) Portions Copyright (c) 2006 Olaf Kolkman (NLnet Labs) All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. AUTHOR INFORMATION
Net::DNS is currently maintained at NLnet Labs (www.nlnetlabs.nl) by: Olaf Kolkman olaf@net-dns.org Between 2002 and 2004 Net::DNS was maintained by: Chris Reinhardt Net::DNS was created by: Michael Fuhr mike@fuhr.org For more information see: http://www.net-dns.org/ Stay tuned and syncicate: http://www.net-dns.org/blog/ SEE ALSO
perl(1), Net::DNS::Resolver, Net::DNS::Packet, Net::DNS::Update, Net::DNS::Header, Net::DNS::Question, Net::DNS::RR, RFC 1035, DNS and BIND by Paul Albitz & Cricket Liu perl v5.14.2 2009-12-30 Net::DNS(3pm)
All times are GMT -4. The time now is 07:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy