Can't connect to Internet

Dear freinds...

I downloaded solaris for x86 and was able to configure the lan correctly.. I can ping and share with other destops through lan... but still I can't connect to internet ? can you please help..

I put my default gateway which is 192.168.1.1 to /etc/defaultrouter but with no use..

My ip is 192.168.1.100

please advise

if you use the search function, you should find tons of information for this topic...

the key should be the dns configuration. edit the files
/etc/resolv.conf
and
/etc/nsswitch.conf
with the correct settings!

best,
DN2

thank you for your response...

Yes, I read about these files, but I still dont know how should I configure the /etc/nsswitch.conf file... ?

----

cat /etc/resolv.conf
server1 192.168.1.1

is this ok also ? my hostname is server1

thank you

/etc/resolv.conf should contain line like that:

nameserver 192.168.1.100

where 192.168.1.100 is the IP address of your DNS server.

edit the nsswitch.conf file. look for the line with:

hosts: files

add dns at the end of this line to enable dns lookup for hosts on your machine.

more information can be found here: Enabling a Machine to Use DNS (Solaris Naming Setup and Configuration Guide) - Sun Microsystems

Simply, run the command:

#cp /etc/nsswitch.dns   /etc/nsswitch.conf

Thanks,
Deepak

Many many thanks...

It works now :slight_smile: ....

But now every time I restart my solaris I have to run "ifconfig gani0 192.168.1.100 netmask 255.255.255.0 ...

where can I insert this command so that it runs automatically each time I restart my pc ??

Many thanks again

In /etc/hostname.gani0:

192.168.1.100

Netmask will be automatically set to /24.

create a hostname.gani0 file on /etc with the hostname or IP of the host.

# echo `hostname` > /etc/hostname.gani0

this will make the ip configuration persist across reboots.

I already made this... still the routing table disappear when I reboot. .

make sure that there is no /etc/dhcp.gani0 file.
check the file /etc/nodename. it should only contain the hostname of your host.
check the file /etc/inet/hosts file. make sure there is a line there that contain like this:

192.168.1.100       <hostname of your computer as it is in /etc/nodename>

add to the /etc/inet/netmask the appropriate network and netmask, ie:

192.168.1.0      255.255.255.0

run the command:

ifconfig gani0 <hostname> netmask + broadcast + up 

edit

/etc/defaultrouter

with IP address of your router... And next time you should RTFM :wink:

Edit two files, /etc/inet/ipnodes and /etc/inet/hosts and put the below entry in both:

192.168.1.100    gani0

Thanks,
Deepak

gani0 is name of his network interface not hostname... and to make route configuration persist across reboots he needs to edit /etc/defaultrouter not hosts databases.