0% found this document useful (0 votes)
410 views5 pages

Network Command - HPUX

The document discusses commands for managing network interfaces and configuration on HP-UX systems. It provides details on commands like lanscan, ifconfig, hostname, and nwmgr for viewing and configuring IP addresses, interfaces, routing tables, and other network settings.

Uploaded by

Rashid Nihal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
410 views5 pages

Network Command - HPUX

The document discusses commands for managing network interfaces and configuration on HP-UX systems. It provides details on commands like lanscan, ifconfig, hostname, and nwmgr for viewing and configuring IP addresses, interfaces, routing tables, and other network settings.

Uploaded by

Rashid Nihal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 5

NETWORK RELATED COMMAND - HPUX

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) HPs 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
On 11.31 there is a new command to manage you network interfaces,as jmrey points out:
Regarding lanscan, in 11.31 is deprecated. Use nwmgr instead. It is much more powerfull
than lanscan and as you can see in the example below, you can obtain a lot of more info
about the network interfaces.
host# nwmgr
Name/ Interface Station Sub- Interface Related
ClassInstance State Address system Type Interface
============== ========= ============== ======== ==============
========
lan2 UP 0x001E0B45E09A igelan 1000Base-SX
lan0 UP 0x001E0B45E09C igelan 1000Base-SX
lan1 UP 0x001E0B45E09D igelan 1000Base-SX
lan3 UP 0x001E0B45E09B igelan 1000Base-SX
host# nwmgr -q info -c lan0
lan0:
Interface State =UP
MAC Address = 0x001E0B45E09C
Subsystem = igelan
Interface Type = 1000Base-SX
Hardware Path = 0/1/1/0
NMID = 2
Feature Capabilities = Physical Interface
IPV4 Recv CKO
IPV4 Send CKO
VLAN Tag Offload
64Bit MIB Support
IPV4 TCP Segmentation Offload
UDP Multifrag CKO
Feature Settings = Physical Interface
VLAN Tag Offload
64Bit MIB Support
MTU = 1500
Speed = 1 Gbps Full Duplex (Autonegotiation : On)
lan0 PCI properties:
PCI Sub-System ID = 0x1701
lan0 driver properties:
Driver Version = B.11.31.0803
Driver State = IGELAN_ONLINE


coolcommand

how to show network interface information in HP/UX
Description

To show network interface information in HP/UX:

# landiag

OR

# lanscan

OR

# netstat -in


To display the network interface cards and status
# lanscan Hardware Station Crd Hdw Net-Interface NM MAC HP-DLPI DLPI Path
Address In# State NamePPA ID Type Support Mjr# 0/0/0/0 0x00306E1CC281 0
UP lan0 snap0 1 ETHER Yes 119 1/12/0/0 0x00306E210F32 3 UP lan3 snap3
2 ETHER Yes 119
To configure the NIC cards such as speed, MTU, etc..
# lanadmin (it is a interactive tool)
To find out the speed of duplex setting of lan0
# lanadmin -x 0 Speed = 1000 Full-Duplex. Autonegotiation = On.
To list all the configured interfaces and IP addresses
# netstat -in
To force HP-UX to use specific interface card
# traceroute -i lan2 10.20.30.40
HP-UX stores network interface configuration information on /etc/rc.config.d/netconf file
# cat /etc/rc.config.d/netconf HOSTNAME="it-hp49" OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1 INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="216.131.195.137" SUBNET_MASK[0]="0xffffff00"
BROADCAST_ADDRESS[0]="216.131.195.255" INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0 ROUTE_DESTINATION[0]="default" ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="216.131.195.10" ROUTE_COUNT[0]="1" ROUTE_ARGS[0]=""
To add a alias address to lan0, add the network information to /etc/rc.config.d/netconf file
INTERFACE_NAME[0]=lan0:1 IP_ADDRESS[0]=216.131.195.138
SUBNET_MASK[0]=255.255.255.0 BROADCAST_ADDRESS[0]="" INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0 INTERFACE_MODULES[0]=""
Restart the network service
/sbin/init.d/net start
Network Tracing and Logging
The nettl command is a tool used to capture network events or packets.
Initialize the tracing/logging facility:
# nettl -start
Display the status of the tracing/logging facility.
# nettl -status all
nwmgr (Network Interface Management)
The nwmgr program is the unified command to administer all HP-UX LAN and RDMA interfaces.
This command can be used to:
Display information of an interface
Modify settings of an interface
Reset the interface or its statistics
Diagnose link connectivity
Create and set configuration information for a component simultaneously
Delete or erase components
# nwmgr Name/ Interface Station Sub- Interface Related ClassInstance State
Address system Type Interface ============== ========= ==============
======== ============== ========= lan2 DOWN 0x001A4B096828 iether
1000Base-T lan0 UP 0x001A4B097F9A iether 1000Base-T lan1 DOWN
0x001A4B097F9B iether 1000Base-T
# nwmgr --help -S all # lists all the subsystems # nwmgr --help -S subsystem # display
subsystem specific usage
To View Interface attributes
# nwmgr -A all -c lan0 lan0 current values: Link State = Up Speed = 1 Gbps Full Duplex
(Autonegotiation : On) MTU = 1500 MAC Address = 0x001a4b097f9a Receive Flow Control
= On Transmit Checksum Offload = Off Receive Checksum Offload = Off Virtual MTU = 0
TCP Segmentation Offload is now disabled. Max Send Buffers = 1 Max Send Coalesce Ticks
= 150 Max Recv Buffers = 1 Max Recv Coalesce Ticks = 0 Interrupt Throttle Mode = -1
Diagnostics Threshold = 0 512byte transmit buffer size limit = 0
To get interface statistics for interface lan0
# nwmgr --st all -c lan0
To View interface details
# nwmgr -q info -c lan0
To get interface vital product data
# nwmgr -q vpd -c lan0
To set interface attributes
# nwmgr -s -A attr1-value, attr2=value ... -c lan0
Reset statistics for an interface
# nwmgr -r --st -c lan<instance>
Some nwmgr Syntax and their Equivalent lanadmin and linkloop Syntax are given bellow
nwmgr -S vlan lanadmin -V scan nwmgr -c lan5000
lanadmin -V info

You might also like