AIX, netsvc

Posted on 2012-09-06
Last Modified: 2012-09-06
I did not have a /etc/netsvc file

So I created one as follows:

# pwd
# cat netsvc
hosts = local,bind4
# ls -la netsvc
-rwxrwxrwx    1 root     system           20 Sep 06 13:27 netsvc

Open in new window

Below is my hosts file:

# 2000:1:1:1:209:6bff:feee:2b7f         ipv6sample      # ipv6 name/address               loopback localhost      # loopback (lo0) name/address
::1                     loopback localhost      # IPv6 loopback (lo0) name/address    lp2
#####       wlpar1  lp2

Open in new window

From smitty mktcpip, I have the following configuration for the adapter

[TOP]                                                   [Entry Fields]
* HOSTNAME                                           [lp2]
* Internet ADDRESS (dotted decimal)                  []
  Network MASK (dotted decimal)                      []
* Network INTERFACE                                   en0
           Internet ADDRESS (dotted decimal)         []
           DOMAIN Name                               []
  Default Gateway
       Address (dotted decimal or symbolic name)     []
       Cost                                          [0]                      #
       Do Active Dead Gateway Detection?              no                     +

Open in new window

However, when I perform an nslookup, I get the following:

# nslookup controller2

Non-authoritative answer:

Where is it getting this strange IP of from ?

What file contains the DNS IP address ?

Question by:Los Angeles1
    1 Comment
    LVL 68

    Accepted Solution

    The actual name is /etc/netsvc.conf

    AIX should ship such a file by default.

    nslookup does not take /etc/netsvc.conf into account! It always queries your nameserver, whose address is in /etc/resolv.conf

    Use the host command instead, which respects /etc/netsvc.conf

    DNS names are not in a local file, but in a central repository residing on the nameserver.

    Address resolution can be done with DNS, /etc/hosts or a NIS hosts map.

    Do you use NIS?
    What do you see with

    ypwhich -m


    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now