Tuesday, May 17, 2005

SM new host network setup static

Hi all

I've just got my hands on an Ultra5 and have installed Solaris 10 on it.
I'm very new to sparcs & Solaris, though I am familiar with linux.
Networking seems to be configured partially, except the box doesn't seem to
be seeing our nameservers. I can ping IP addresses, but names are not
getting resolved, and I get "unknown host". I've amended the
/etc/resolv.conf file, but no joy.

Can anyone give me a couple of hints of where I need to look? Or failing
that, any really good online resources for Solaris?

Perhaps try:

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

> Can anyone give me a couple of hints of where I need to look? Or
> failing that, any really good online resources for Solaris?

There's also http://docs.sun.com

Something funny is going on because if I do an ifconfig hme0, it reports my
IP as being 152.57.31.230 and my broadcast addr as being 152.57.255.255.
This is wrong, they should be 152.71.37.230 & 152.71.255.255.
"hostname.hme0" has the correct IP in.

ifconfig hme0 152.71.37.230

route add default 152.71.0.66

Is this a static IP or DHCP'd assignment?

If static, then double check the settings of:

/etc/hosts
/etc/hostname.hme0
/etc/inet/netmasks
/etc/defaultrouter

Could it be you have "071" instead "71" in hostname.hme0?
71 in octal is 57 in decimal...

Static IP. Here's the contents of "hosts" -

#
# Internet host table
#
127.0.0.1 localhost
152.71.37.230 yultra-01 loghost
152.71.0.66

Here's contents of "defaultrouter"

152.71.0.66

Here's contents of "hostname.hme0"

yultra-01

Here's contents of "netmasks"

#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# The term network-number refers to a number obtained from the Internet
Network
# Information Center.
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 128.32.0.0 255.255.255.0
#
152.71.0.0 255.255.000.000

> #
> # Internet host table
> #
> 127.0.0.1 localhost
> 152.71.37.230 yultra-01 loghost
> 152.71.0.66

Hmm, that last line should have a hostname attached to it.

Other than that... if you're still stuck after fixing /etc/hosts:

# find /etc -type f|xargs ls -l|grep ^-|awk '{print $NF}'|xargs grep '152\.'

See if anything mentions unexpected 152.x IPs or subnets.

If none of that pans out, you *could* run sys-unconfig from the console
but that's as a *final* resort and is almost never needed.

(That command undoes a lot of things, mostly relating to networking
configuration... but also includes root password zeroing and a few other
non-networking-related stuff.)

It's probably better to not do sys-unconfig and see if you can figure it
out by fixing /etc/hosts or doing the 'find', or try other suggestions
that others may have.

0 Comments:

Post a Comment

<< Home