HP-UX networking commands

HP-UX networking commands


Use following command to start HP-UX network service:
/etc/init.d/net start
OR
/sbin/init.d/net start
Please note that your network configuration file is /etc/rc.config.d/netconf . Here is my sample /etc/rc.config.d/netconf file:
# cat /etc/rc.config.d/netconf
Output:
HOSTNAME=deephpux < --change hostname here
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=192.168.1.100 <--change IP address here
SUBNET_MASK[0]=255.255.255.0 <--change subnet mask here
BROADCAST_ADDRESS[0]=""
DHCP_ENABLE[0]="0" <--Do you wanna DHCP? set 1 to use DHCP
You can also set IP address using ifconfig command:
# ifconfig lan0 192.168.1.200 netmask 255.255.255.0 up
See or get current IP address information with ifconfig command:
# ifconfig lan0

As my journey continues to exploring HP-UX I found couple of nice utilities and tools to configure and administrate HP-UX networking subsystem.
FILES
  • /etc/hosts - Hosts configuration file (resolve hosts and IPs)
  • /etc/rc.config.d/netconf – IP address, routeing address and hostname stored in this file
SCRIPTS
  • /etc/init.d/net start – Use to start, stop network service
HPUX Commands
(a) Display lan interface info:
# lanscan
(b) All in one lan configuration utility (lan0 is first Ethernet interface) to configure and view the system IP address:
# ifconfig lan0 - Display IP info such as IP address netmask etc.
# ifconfig lan0 up - Up network interface (allow traffic)
# ifconfig lan0 down - Down network interactive (deny traffc)
# ifconfig lan0 192.168.1.1 netmask 255.255.255.0 up - Setup/change IP adddress
(c) Displaying host name
# hostname
(d) Arp administration (cache)
# arp -a
(e) Display routing table/info:
# netstat -nr
(f) Define new route:
# route add default 192.168.1.254 1
(g) HP's LAN diagnostic tool
# lanadmin
(h) Test a remote host connectivity
ping host.mycorp.com
(i) Setup various lan properties, dns client, NIS client configuration etc using GUI tool:
# sam
# set_parms
(j) Check dns connectivity:
$ nslookup www.google.co.uk
SHARE

sangeethakumar

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment