02-02-2001
The network information is all stored in text files in the /etc directory. The installer should have prompted you for this information during the install and written all this information to disk.
/etc/defaultrouter contains the IP (or hostname if it's in the hosts file) of the gateway
/etc/hosts contains the IP and hostname of hosts known to the computer including the hosts own IP
/etc/nodename contains the hostname
/etc/resolv.conf contains DNS info in the format of:
nameserver {DNS_server_IP}
If this gets you on the Internet but you are unable to resolve hostnames (DNS), you need to edit the /etc/nsswitch.conf file and add dns into the hosts line.
There should be man pages on these filenames defining the exact format. Information plugged into the system with ifconfig is only temporary and is flushed when you reboot.
[Edited by 98_1LE on 02-02-2001 at 09:32 AM]
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
WEe have installed Intel version of Solaris 8 in a machine .we skipped the network configuration at the begning.we selected unnetworked.Now we need to connect the same machine to a network.
We configured the Card using ifconfig but its taking the ip address itself as the Default G/W.
I need help... (4 Replies)
Discussion started by: premkumar
4 Replies
2. HP-UX
Hi,
I have installed a HP-UX B.11.00 U 9000/800 Server in one of the domain. And I'm also able to telnet/ping into this server from systems in the same domain.
But I'm not able to telnet/ping into this server from a different domain.
So, what shoud need to do to achieve this... (6 Replies)
Discussion started by: S.Vishwanath
6 Replies
3. IP Networking
I have solaris 2.8 on an ultra 1 and just configured the following files:
defautrouter
resolv.conf
nsswitch.conf
netmasks
hosts
but when I reboot, my NIC still is not configured. Which file do I need to configure to keep the NIC configured after reboot? (3 Replies)
Discussion started by: DarkLord
3 Replies
4. Solaris
hi again...
i configured my network settings sometiime ago using the sys-unconfig command.the active link was rtls0.
there was some problem with the network so i changed the ISP. now when im trying to reconfigure the system wit sys-unconfig, it tries to configure the network on rtls1 (and shows... (1 Reply)
Discussion started by: strider
1 Replies
5. Solaris
I am seeking help from the gurus in this forum and hope that I can find answers soon. Anyone who provide the answers will be greatly appreciated.
I have a sparc box with Solaris 10 on it. We install Solaris with zone structure. One global zone and two other zone. I installed Oracle DB on global... (6 Replies)
Discussion started by: duke0001
6 Replies
6. SCO
I have a SCO 5.07 Server and I am trying to get it on my network. I have edited the /etc/hosts file and /etc/rc2.d/s99route . I has connectivity on the NIC card but not sure if I am forgetting another file. Thanks! (2 Replies)
Discussion started by: andrewd
2 Replies
7. UNIX for Dummies Questions & Answers
I am using solaris 10, my internet works alright but each time i reboot i keep loosing my connection. I will have to use the
ifconfig iprb0 192.168.1.xx netmask 255.255.255.0 up and
Route add default 192.168.1.xxx command to gain back my internet.
I know there is a better way of addressing... (1 Reply)
Discussion started by: seyiisq
1 Replies
8. Solaris
Hi
I have installed Solaris 5.10 on Intel x86 machine (standalone).
I want to access internet through solaris. How should I configure the network? Is static IP or DHCP advisable? (5 Replies)
Discussion started by: johnl
5 Replies
9. Solaris
Hi
How do I configure a network card in Solaris 10? using the command ifconfig, and also please advise me for persisting this ip address what are the files newly created and modify.
I am a new baby in solaris:) (4 Replies)
Discussion started by: vipinmurali
4 Replies
10. Solaris
Hi, I am new in Solaris 11. I can't even make the NIC work. Here is the issue:
Any help will be greatly appreciated. (6 Replies)
Discussion started by: aixlover
6 Replies
LEARN ABOUT CENTOS
nss-myhostname
NSS-MYHOSTNAME(8) nss-myhostname NSS-MYHOSTNAME(8)
NAME
nss-myhostname - Provide hostname resolution for the locally configured system hostname.
SYNOPSIS
nss-myhostname.la
DESCRIPTION
nss-myhostname is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing hostname resolution
for the locally configured system hostname as returned by gethostname(2). Various software relies on an always-resolvable local hostname.
When using dynamic hostnames, this is usually achieved by patching /etc/hosts at the same time as changing the host name. This however is
not ideal since it requires a writable /etc file system and is fragile because the file might be edited by the administrator at the same
time. nss-myhostname simply returns all locally configured public IP addresses, or, if none are configured, the IPv4 address 127.0.0.2
(which is on the local loopback) and the IPv6 address ::1 (which is the local host) for whatever system hostname is configured locally.
Patching /etc/hosts is thus no longer necessary.
To activate the NSS modules, myhostname has to be added to the line starting with "hosts:" in /etc/nsswitch.conf
It is recommended to put myhostname last in the nsswitch.conf line to make sure that this mapping is only used as fallback, and any DNS or
/etc/hosts based mapping takes precedence.
EXAMPLE
# /etc/nsswitch.conf
passwd: compat
group: compat
shadow: compat
hosts: files dns myhostname
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
To test, use glibc's getent tool:
$ getent ahosts `hostname`
::1 STREAM omega
::1 DGRAM
::1 RAW
127.0.0.2 STREAM
127.0.0.2 DGRAM
127.0.0.2 RAW
In this case the local hostname is omega.
SEE ALSO
systemd(1), systemd-logind.service(8), logind.conf(5), loginctl(1), pam.conf(5), pam.d(5), pam(8), pam_loginuid(8)
systemd 208 NSS-MYHOSTNAME(8)