this is obsolete doc -- see http://doc.nethence.com/ instead
Configuring the network on HP/UX 11i v1 (part 2)
Do not forget to check and fix your umask, just in case.
umask
umask 022
Note. You could just proceed with with the provided wizards (set_parms ip_address and set_parms addl_netwrk), but lets do it manually.
Define your IP, netmask, gateway and hostname e.g.,
cd /etc/rc.config.d/
mv -i netconf netconf.dist
sed '/^#/d; /^$/d;' netconf.dist | tee netconf.dist.clean > netconf
ll netconf*
note. The ownership for the file now changed from bin:bin to root:sys but that doesn't matter, file permissions 644 should be just fine,
vi netconf
make sure you've got the right values for HOSTNAME, IP_ADDRESS, SUBNET_MASK and ROUTE_GATEWAY (the two last lines below need to be added). Here's a minimal example (11i v1),
HOSTNAME="host"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]="X.X.X.X"
SUBNET_MASK[0]="255.255.255.0"
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
GATED=0
GATED_ARGS=""
RDPD=0
RARP=0
ROUTE_DESTINATION[0]="default"
ROUTE_GATEWAY[0]="X.X.X.X"
note. The OPERATING_SYSTEM variable is required otherwise uname (-s) returns nonsense.
note. On HP/UX 11i v1 the node name must have 8 chars at maximum, but that only applies for the short hostname before the first dot. Otherwise you'll get this error msg when applying the hostname,
Nodename must be less than 9 characters
EXIT CODE: 1
apply,
/sbin/init.d/hostname start
/sbin/init.d/net stop
/sbin/init.d/net start
Note. I find it strange that I am not loosing the network connection while doing 'net stop'...
Note. Use APA (Auto Port Aggregation) for LAN load balancing.
Note. Use AutoPath for LAN multipathing.
Enable the static name resolution,
cd /etc/
ll nsswitch.*
cp nsswitch.files nsswitch.conf
chmod u+w nsswitch.conf
note. file permissions root:sys 644 should be just fine,
vi nsswitch.conf
change that line,
hosts: files dns
note. In case that doesn't work you could try,
hosts: files [NOTFOUND=continue] dns
and reload the software agent,
swagentd -r
Configure the static name resolution,
cd /etc/
mv hosts hosts.dist
sed '/^#/d; /^$/d;' hosts.dist > hosts
note. file permissions root:sys 644 should be just fine,
ll hosts*
vi hosts
change,
127.0.0.1 localhost loopback
IP_ADDRESS host
note. I am simply using short host names here, as I did in the netconf configuration file. I am though adding the domaine parameter to resolv.conf, see below.
Configure the name servers,
cd /etc/
vi resolv.conf
e.g.,
domain example.local
nameserver DNS1
nameserver DNS2
nameserver DNS3
You should now be able to access your HP/UX system remotely either by telnet or by rlogin (OpenSSH will eventually be configured later-on).