Bug #242


DNS configuration after an upgrade snv_134 to oi_147

Added by Hervé Riboulot almost 12 years ago. Updated about 11 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:



After the upgrade, the DNS configuration by NWAM of a wireless connection is no longer working:

  • the IP address (DHCP) is still allocated
  • the gateway is correctly identified and can be addressed
  • but /etc/nsswitch.conf presents a 'starting' configuration that comprises:
    hosts: files
    ipnodes: files

Note that the dns/client service is disabled.

Replacing the /etc/nsswitch.conf by the /etc/nwam/loc/Legacy/nsswitch.conf fixes the issue. Legacy/nsswitch.conf comprises the following statements:

#hosts:      files # Commented out by DHCP
hosts: files dns # Added by DHCP
#ipnodes: files # Commented out by DHCP
ipnodes: files dns # Added by DHCP

It seems that the order (legacy - current configuration) is reverted ...

Actions #1

Updated by Albert Lee almost 12 years ago

The start method for svc:/network/service:default will edit nsswitch.conf automatically to include 'dns' if any DNS server addresses have been received via DHCP, or remove it if there were none (or DHCP is disabled). It is what adds the "# Added by DHCP" lines.

I believe NWAM restarts this service each time it connects, so nsswitch.conf should correctly reflect the presence or absense of DNS servers in the current DHCP response.

What does /sbin/dhcpinfo DNSserv return?

Actions #2

Updated by Hervé Riboulot almost 12 years ago

Hello Albert,

Just after the boot:

i- the start method is enabled and on line;
ii- I can ping the router and an IP address has been correctly allocated (through the DHCP session) ;
iii- but no access to the net:

Herve@OpenIndiana:~# dhcpinfo DNSserv (the IP address of the router which also provides DNS services)
iv I then copy the nsswitch.conf saved in the Legacy directory
Herve@OpenIndiana:~# cp /etc/nwam/loc/Legacy/nsswitch.conf /etc/
and I can access the web.

Note that the connexion (workstation - router/GW is relying on a wireless link (ath0).

Best regards,


Actions #3

Updated by Albert Lee almost 12 years ago

Does 'svcadm restart svc:/network/service:default' correct the nsswitch.conf contents?

Actions #4

Updated by Petri Kunnari almost 12 years ago


Same kind if finding.
When system boot up . nis , dns , etc does not work until log in once.
This is when not use automatic location/configuration/profile.
Setting everything using GUI make that it is required to log on one time to activate settings.

Actions #5

Updated by Hervé Riboulot almost 12 years ago

Additional elements:

1- same situation:

Two links: yge (ethernet -> not active); ath (wifi -> active)

  • nwam activated
  • IP address properly allocated through a DHCP session
  • but no DNS service really delivered (nsswitch.conf comprises no mention of dns)

2- details:

2.1- nwan is enabled and in working order

mri svc:/network/physical:nwam
name physical network interface autoconfiguration
enabled true
state online
next_state none
state_time 27 septembre 2010 20:49:36 CEST
logfile /var/svc/log/network-physical:nwam.log
restarter svc:/system/svc/restarter:default
contract_id 11
dependency require_all/none svc:/network/netcfg (online)
dependency require_all/none svc:/network/loopback (online)
dependency require_all/none svc:/network/datalink-management (online)
dependency require_all/none svc:/network/ip-interface-management (online)

2.2- network-service:defaut:

[ sept. 27 20:35:44 Executing start method ("/lib/svc/method/net-svc start"). ]
[ sept. 27 20:35:44 Timeout override by svc.startd. Using infinite timeout. ]
[ sept. 27 20:35:44 Method "start" exited with status 0. ]

2.3- network-netcfg:

[ sept. 27 20:17:32 Enabled. ]
[ sept. 27 20:17:32 Executing start method ("/lib/inet/netcfgd"). ]
[ sept. 27 20:17:32 Method "start" exited with status 0. ]


Sep 27 20:49:12 OpenIndiana mii: [ID 427086 kern.notice] yge0: Using 1000BASE-T Ethernet PHY at 0: Marvell 88E1149
Sep 27 20:49:36 OpenIndiana mac: [ID 486395] NOTICE: ath0 link down
Sep 27 20:49:36 OpenIndiana in.routed897: [ID 238047 daemon.warning] interface ath0 to turned off
Sep 27 20:49:36 OpenIndiana in.routed897: [ID 970160 daemon.notice] unable to get interface flags for ath0: No such device or address
Sep 27 20:49:40 OpenIndiana mac: [ID 744254] NOTICE: ath0 link up
Sep 27 20:49:40 OpenIndiana in.routed897: [ID 749644 daemon.notice] ath0 has a bad address
Sep 27 20:49:45 OpenIndiana /sbin/dhcpagent1029: [ID 778557 daemon.warning] configure_v4_lease: no IP broadcast specified for ath0, making best guess

Actions #6

Updated by Albert Lee almost 12 years ago

On the main window of nwam-manager, click "Locations...", then select the active location in the list and click "Edit". There is a field for "Custom nsswitch file:".

On my system this is empty for the "Automatic" location. Underneath that line is the text, "Default nsswitch file (in use): /etc/nsswitch.dns". I also have a "User" location which may have been created by default, and it has the same configuration. /etc/nwam/loc/User/nsswitch.conf appears to be a copy of /etc/nsswitch.dns (why does it copy the file?).

Investigating further, this is the contents of /etc/nwam/loc.conf:

Automatic    enabled=boolean,false;activation-mode=uint64,1;nameservices=uint64,0;nameservices-config-file=string,/etc/nsswitch.dns;dns-nameservice-configsrc=uint64,1;
NoNet    enabled=boolean,false;dns-nameservice-configsrc=uint64,1;activation-mode=uint64,1;nameservices=uint64,1;nameservices-config-file=string,/etc/nsswitch.files;ipfilter-config-file=string,/etc/nwam/loc/NoNet/ipf.conf;ipfilter-v6-config-file=string,/etc/nwam/loc/NoNet/ipf6.conf;
User    enabled=boolean,false;activation-mode=uint64,0;nameservices=uint64,0;nameservices-config-file=string,/etc/svc/volatile/nwam/User/nsswitch.conf;dns-nameservice-configsrc=uint64,0;dns-nameservice-servers=string,;
Legacy    enabled=boolean,false;activation-mode=uint64,1;nameservices=uint64,0;nameservices-config-file=string,/etc/svc/volatile/nwam/Legacy/nsswitch.conf;dns-nameservice-configsrc=uint64,0;dns-nameservice-servers=string,;

Could you be using the "NoNet" location (or a strange "User" location) by accident?

Actions #7

Updated by Hervé Riboulot almost 12 years ago


There is no "Locations ..." on my system. The Automatic configuration is active ('Switch Locations Automatically'). An IP address has been properly delivered but accessing the wlan remains impossible (note that I can browse my local network).

/etc/nwam comprises 3 subdirectories (Legacy, User and NoNet). Legacy and User store the same nsswitch.conf file.

I've copied your /etc/nwam/loc.conf, copy nsswitch.conf (which includes the correct directives for dns usage) into nsswitch.dns and restart the system.

The resulting situation still remains as it was : IP address is delivered but no dns service can be used. Note that the /etc/nsswitch.conf is reverted to an old version (with regard to the save date) which does not carry any "dns directive":

hosts: files
ipnodes: files

Quite weird.

Anyway, copying a proper nsswitch.conf (including 'hosts: files dns & ipnodes: files dns') in the /etc directory fixes the issue...

Actions #8

Updated by Julian Wiesener about 11 years ago

  • Status changed from New to Closed
  • Assignee set to Julian Wiesener

you will need to enable svc:/network/dns/client:default

nwam is under heavy development, a bit manual configuration is expected when upgrading from 134


Also available in: Atom PDF