HP-UX Networking Configuration

Network Configuration in HP-UX

Configuration File :
/etc/rc.config.d/netconf – Contains the hostname, ip address, default route
/etc/hosts – Contains the hsotname to IP address mapping
/etc/resolv.conf – Contains DNS server details
/etc/inetd.conf – Internet daemon configuration file

Configuration Files used for DNS Client:
/etc/nsswitch.compat
/etc/nsswitch.nis
/etc/nsswitch.ldap
/etc/nsswitch.conf
/etc/nsswitch.files
/etc/nsswitch.hp_defaults

Scripts :
/sbin/init.d/net start – To start network services
/sbin/init.d/net stop – To stop network services

Commands :

1. To set the hostname :
# set_parms hostname

2. To set primary ip address :
# set_parms ip_address

3. To set the default gateway, DNS/NIS server details :
# set_parms addl_netwrk

4. To restart inetd daemon :
# inetd -c

5. To display the ip address configuration details :
# netstat -i

6. To set the IP details of lan0 :
# ifconfig lan0

7. To display all the network adapters :
# lanscan

8. To display routing table :
# netstat -rn

9. To add a route :
# route add default 192.168.1.254 1

10. To enable a network interface :
# ifconfig lan0 up

11. To disable a network interface :
# ifconfig lan0 down

12. To change NIC settings like speed, duplex,..
# lanadmin